[FFmpeg-devel] [PATCH] Implement an option in ffmpeg to make it print the output SDP and exit

Stefano Sabatini stefano.sabatini-lala
Wed Nov 12 00:01:14 CET 2008


On date Tuesday 2008-07-22 02:25:37 +0200, Michael Niedermayer encoded:
> On Tue, Jul 22, 2008 at 01:49:02AM +0200, Stefano Sabatini wrote:
[...]

Ehm, sorry for the slow reply...

> > On the other hand I'm not sure it is possible to implement an SDP
> > muxer.
> > Indeed the SDP issued by ffmpeg has to know *all* the RTP output
> > streams:
> > 
> > stefano at geppetto ~/s/ffmpeg> 
> > ffmpeg -t 0 -i ~/test.flv -sdp -f rtp rtp://localhost:5008 -f rtp -acodec libmp3lame rtp://localhost:5004 2> /dev/null
> > v=0
> > o=- 0 0 IN IPV4 127.0.0.1
> > t=0 0
> > s=No Name
> > a=tool:libavformat 52.17.0
> > m=audio 5008 RTP/AVP 0
> > c=IN IP4 localhost
> > b=AS:64
> > m=audio 5004 RTP/AVP 14
> > c=IN IP4 localhost
> > b=AS:64
> > 
> > so it's not possible to write a muxer, because this for definition
> > only knows one output file.
> > 
> > Any idea? Otherwise I propose to implement the already proposed -sdp
> > option.
> 
> make rtp support multiple streams
> 
> something like:
> -f rtp rtp://localhost:5008,localhost:5004

So what about something like this:
ffmpeg -i audio1.mp2 -i audio2.vorbis -acodec pcm_mulaw -acodec libmp3lame -f rtp rtp://localhost:5004,localhost:5008 -newaudio
?

In order to print the sdp we could do something like:
ffmpeg -i audio1.mp2 -i audio2.vorbis -acodec pcm_mulaw -acodec libmp3lame -f sdp rtp://localhost:5004,localhost:5008 -newaudio

The problem with this approach is that we can't specify the SDP
output.

Maybe a better solution could be:
ffmpeg -dest localhost:5004 -i audio1.mp2 \
       -dest localhost:5008 -i audio2.ogg \
       -acodec pcm_mulaw -acodec libmp3lame \
       -f sdp test.sdp -newaudio

which would need another field (for example "dest") in AVCodecContext.

Ideas are very welcome.

Regards.
-- 
FFmpeg = Faboulous & Frightening Mega Proud Energized Game




More information about the ffmpeg-devel mailing list