Hi,

Ricardo Pinto wrote:
[...]
>> Try something like
>> ffmpeg -re -i test.avi -vcodec copy -an -f rtp rtp://127.0.0.1:10000 
>> -vn -acodec copy -f rtp rtp://127.0.0.1:20000 -newaudio
>>
>> Yes, I know this is not documented very well, and people must extrapolate
>> this command line from the documentation of all the command line 
>> options...
>> But I never had time to write a better document about streaming with
>> ffmpeg; if anyone has time and is willing to write such document, patches
>> are welcome :)
> Maybe i'll do that! So right i have to open streams sending to two 
> different ports.

Yes. This is what the RTP standard requires.


> As you can see that's a problem.

Sorry, I do not understand the problem here...


> The solution will be what? Catch the video on the other side and repack 
> it in one stream? Because if i try to play the rtp connection i can only 
> do one thing at the time! Or listen to the sound or see the movie!
Maybe you are trying to receive the streams in the wrong way.
This is what you should do:
1) run ffmpeg as shown above

2) ffmpeg will print an SDP. Something like
v=0
o=- 0 0 IN IPV4 127.0.0.1
t=0 0
s=No Name
a=tool:libavformat
m=video 10000 RTP/AVP 96
c=IN IP4 127.0.0.1
b=AS:0
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1; 
config=000001B001000001B58913000001000000012000C48D8800CD0A041E1463000001B24C61766335312E34312E30
m=audio 20000 RTP/AVP 14
c=IN IP4 127.0.0.1
b=AS:64

Get the SDP printed by ffmpeg (not the one pasted above), and copy it in
a text file called "test.sdp"

3) Now you can play the streams by using the SDP file. Using videolan client,
you can do "vlc test.sdp". If you try to use ffplay or ffmpeg to receive
the streams, you can have troubles unless you use a multicast destination
address, getting a "setsockopt(IP_ADD_MEMBERSHIP): Invalid argument" error.
This is due to a bug in libavformat: as a quick hack, comment out line 77
in libavformat/udp.c.


                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to