No video from rtp stream using ffmpeg/libav

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
dcweber
New Cone
New Cone
Posts: 2
Joined: 06 Dec 2011 01:28

No video from rtp stream using ffmpeg/libav

Postby dcweber » 06 Dec 2011 01:40

Kind of a cross post, but I am trying to debug using VLC, but not having any luck with the output. Hoping that someone could shed some light on it.

I am attempting to write a mpeg-ts application using libav/ffmpeg. Step one would be getting an existing application working, so I can dissect the code.

So, I first took libav's output-example (and the latest release), and modified the av_guess_format to:

fmt = av_guess_format("mpegts", NULL, NULL);


I also modify the STREAM_DURATION to be very long (500000) or so. I know this will be an issue, but I'm trying to get it working.



I compile and run it, wishing to write to the network, and then read it on the same system using ffplay/vlc via the network socket.


[root@sl6 src]# ./output-example rtp://192.168.1.2:9778
Output #0, mpegts, to 'rtp://192.168.1.2:9778':
Stream #0.0: Video: mpeg2video, yuv420p, 352x288, q=2-31, 400 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: mp2, 44100 Hz, 2 channels, s16, 64 kb/s
[mpegts @ 0x8324020] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts



I then try VLC, where I play network stream "rtp://192.168.1.2:9778" (this is on the same machine as the sender).

No output. Under messages, it says "rtp warning: too many RTP sessions".


So, I check wireshark, and when VLC is not running, I am getting icmp port not open messages, and those go away when I start VLC.


Any thoughts? Something not quite set up right in the TS options?

Thanks,




Here is my version info:

[root@sl6 bin]# ./ffplay
ffplay version 0.7.2, Copyright (c) 2003-2011 the Libav developers
built on Dec 5 2011 15:47:53 with gcc 4.4.4 20100726 (Red Hat 4.4.4-13)
configuration: --disable-yasm --prefix=../libav --enable-shared
libavutil 51. 7. 0 / 51. 7. 0
libavcodec 53. 5. 0 / 53. 5. 0
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 4. 0 / 2. 4. 0
libswscale 2. 0. 0 / 2. 0. 0
Simple media player
usage: ffplay [options] input_file

dcweber
New Cone
New Cone
Posts: 2
Joined: 06 Dec 2011 01:28

Re: No video from rtp stream using ffmpeg/libav

Postby dcweber » 06 Dec 2011 01:40

FYI, here are the VLC messages:

main debug: processing request item rtp://192.168.1.2:9778 node Playlist skip 0
main debug: resyncing on rtp://192.168.1.2:9778
main debug: rtp://192.168.1.2:9778 is at 1
main debug: starting new item
main debug: creating new input thread
main debug: Creating an input for 'rtp://192.168.1.2:9778'
main debug: thread (input) created at priority 10 (input/input.c:220)
qt4 debug: IM: Setting an input
main debug: thread started
main debug: using timeshift granularity of 50 MiB
main debug: using timeshift path '/tmp'
main debug: `rtp://192.168.1.2:9778' gives access `rtp' demux `' path `192.168.1.2:9778'
main debug: creating demux: access='rtp' demux='' path='192.168.1.2:9778'
main debug: looking for access_demux module: 1 candidate
main debug: net: opening 192.168.1.2 datagram port 9778
main debug: using access_demux module "rtp"
main debug: TIMER module_need() : 0.305 ms - Total 0.305 ms / 1 intvls (Avg 0.305 ms)
main debug: looking for meta reader module: 2 candidates
lua debug: Trying Lua scripts in /home/pcig/.local/share/vlc/lua/meta/reader
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
main debug: no meta reader module matching "any" could be loaded
main debug: TIMER module_need() : 0.628 ms - Total 0.628 ms / 1 intvls (Avg 0.628 ms)
main debug: `rtp://192.168.1.2:9778' successfully opened
rtp debug: detected MPEG2 TS
rtp debug: added payload type 33 (f = 90000 Hz)
main debug: thread (stream out) created at priority 10 (input/stream_demux.c:100)
rtp debug: added RTP source (c0140028)
rtp debug: unknown payload (23)
rtp warning: too many RTP sessions
main debug: thread started
main debug: creating demux: access='' demux='ts' path=''
rtp warning: too many RTP sessions
rtp warning: too many RTP sessions

---------------------<snip a lot of lines!> ---------------------

rtp warning: too many RTP sessions
rtp warning: too many RTP sessions
main debug: incoming request - stopping current input
main debug: waitpipe: object killed
main debug: dying input
main debug: socket 20 polling interrupted
rtp error: RTP flow stopped
main debug: control type=0
main debug: control: stopping input
rtp debug: removing RTP source (c0140028)
main debug: dying input
main debug: looking for demux module: 1 candidate
main debug: no demux module matching "ts" could be loaded
main debug: TIMER module_need() : 19.802 ms - Total 19.802 ms / 1 intvls (Avg 19.802 ms)
main debug: thread ended
main debug: removing module "rtp"
main debug: thread ended
main debug: dead input
qt4 debug: IM: Deleting the input

Rémi Denis-Courmont
Developer
Developer
Posts: 15324
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: No video from rtp stream using ffmpeg/libav

Postby Rémi Denis-Courmont » 06 Dec 2011 10:00

Payload type 23 is unknown. You need a SDP if you want to open this. In any case, it looks like your stream is quite broken. There should not be multiple sessions.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 88 guests