[FFmpeg-devel] [PATCH] Use the SDP generator in ffmpeg and ffserver
Michael Niedermayer
michaelni
Fri Aug 10 23:39:51 CEST 2007
Hi
On Fri, Aug 10, 2007 at 11:14:48AM +0200, Luca Abeni wrote:
> Hi all,
>
> here are two patches for using the SDP generator in ffserver and ffmpeg.
>
> The first patch removes the code for SDP generation from ffserver (using
> avf_sdp_create() to generate the SDP), and should not introduce any
> functional change in ffserver.
>
> The second patch modifies ffmpeg to print an SDP to stdout when all the
> outputs are on RTP. It can be tested by using something like
> ffmpeg -re -i test.avi -vcodec copy -an -f rtp
> rtp://224.10.10.10:10000?multicast=1 -vn -acodec copy -f rtp
> rtp://224.10.10.10:20000?multicast=1 -newaudio
>
> The streams can be received by using the SDP printed to stdout (tested with
> vlc, and works without problems).
>
> Is the behaviour of ffmpeg_use_sdp_generator.diff ok? (would it be better
> to introduce a new command line option for generating an SDP? Would it be
> useful to generate an SDP even if the output is not RTP? ...) I implemented
> the behaviour that is more useful to me, but if anyone has suggestions I'll
> happily modify the patch.
no clue, id say a command line option which takes a file name and uses '-'
for stdout might be best
[...]
> + if (stream->title[0] != 0) {
> + strcpy(avc->title, stream->title);
av_strlcpy()
[...]
> Index: ffmpeg/ffmpeg.c
> ===================================================================
> --- ffmpeg.orig/ffmpeg.c 2007-08-10 10:30:24.000000000 +0200
> +++ ffmpeg/ffmpeg.c 2007-08-10 11:13:36.000000000 +0200
> @@ -1339,6 +1339,15 @@
> return -1;
> }
>
> +static void print_sdp(AVFormatContext **avc, int n)
> +{
> + char *sdp;
> +
> + sdp = av_mallocz(2048);
char sdp[2048];
> + avf_sdp_create(avc, n, sdp, 2048);
s/2048/sizeof(sdp)/
besides these iam fine with the patches though you should wait a day or 2
before commiting so the ffserver maintainer can comment
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070810/4e928086/attachment.pgp>
More information about the ffmpeg-devel
mailing list