Failure to play MPEG2-TS from ffmpeg

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
ykori
New Cone
New Cone
Posts: 3
Joined: 15 Mar 2010 22:54

Failure to play MPEG2-TS from ffmpeg

Postby ykori » 15 Mar 2010 23:07

I am using ffmpeg with the -muxrate enabled to stream a MPEG2-TS (H264+AAC) file to VLC and VLC fails to play the stream It dumps a bunch of errors on the messages screen. muxrate with a CBR produces the stream with a lot of null packets. Does VLC not handle the nullpackets?

Thanks in advance.

The following are the messages:
avcodec error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
main warning: PTS is out of range (1636737), dropping buffer
main warning: PTS is out of range (1613526), dropping buffer
main warning: PTS is out of range (1591304), dropping buffer
...
...
main warning: PTS is out of range (1568082), dropping buffer
main warning: PTS is out of range (1545860), dropping buffer
main warning: PTS is out of range (1522637), dropping buffer
main warning: PTS is out of range (1501426), dropping buffer
main warning: PTS is out of range (1634204), dropping buffer
main warning: PTS is out of range (1930843), dropping buffer
avcodec error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
main warning: PTS is out of range (1908621), dropping buffer
main warning: PTS is out of range (1885410), dropping buffer
main warning: PTS is out of range (1863188), dropping buffer
main warning: PTS is out of range (1839965), dropping buffer
main warning: PTS is out of range (1817743), dropping buffer
...
main warning: PTS is out of range (1864833), dropping buffer
main warning: PTS is out of range (1846610), dropping buffer
main warning: late picture skipped (1893144 > 0)
main warning: PTS is out of range (2002828), dropping buffer
main warning: PTS is out of range (1979606), dropping buffer
main warning: PTS is out of range (1957395), dropping buffer
main warning: PTS is out of range (1934173), dropping buffer
main warning: PTS is out of range (1911950), dropping buffer
main warning: PTS is out of range (1888728), dropping buffer
main warning: late picture skipped (2042251 > 0)
main warning: PTS is out of range (1867506), dropping buffer
main warning: late picture skipped (2049250 > 0)
main warning: late picture skipped (2015917 > 0)
main warning: late picture skipped (2015917 > 0)
main warning: PTS is out of range (1991295), dropping buffer
main warning: PTS is out of range (1969073), dropping buffer
main warning: PTS is out of range (1945850), dropping buffer
main warning: PTS is out of range (1923628), dropping buffer
...

ykori
New Cone
New Cone
Posts: 3
Joined: 15 Mar 2010 22:54

Re: Failure to play MPEG2-TS from ffmpeg

Postby ykori » 17 Mar 2010 21:33

I Have now found the real cause of the problem. It is not the null packets, but the packets that contain just PCR data. In the new ffmpeg, if you enable the muxrate option, it introduces null packets or PCR only packets to make the constant bit rate. these PCR only TS packets are causing the above problems with the VLC, do anyone know why?
I changed to ffmpeg to not send these and now my playback is smooth without any errors.

kaps
New Cone
New Cone
Posts: 1
Joined: 15 Nov 2010 07:10

Re: Failure to play MPEG2-TS from ffmpeg

Postby kaps » 15 Nov 2010 07:17

I Have now found the real cause of the problem. It is not the null packets, but the packets that contain just PCR data. In the new ffmpeg, if you enable the muxrate option, it introduces null packets or PCR only packets to make the constant bit rate. these PCR only TS packets are causing the above problems with the VLC, do anyone know why?
I changed to ffmpeg to not send these and now my playback is smooth without any errors.
Can you please put somewhere a snippet to your code changes in ffmpeg ?

ykori
New Cone
New Cone
Posts: 3
Joined: 15 Mar 2010 22:54

Re: Failure to play MPEG2-TS from ffmpeg

Postby ykori » 19 May 2011 21:10

In ffmpeg (libavformat/mpegtsenc.c), I had manually replaced the call to the function mpegts_insert_pcr_only with mpegts_insert_null_packet. This had fixed the problem for me at that time. Later I reverted to the original code in ffmpeg and the current version of VLC does not have a problem with it.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 57 guests