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