Wrong PTS when streaming an Mpeg2 stream with B-Frames

About encoding, codec settings, muxers and filter usage
eyal.bthl
New Cone
New Cone
Posts: 1
Joined: 17 Feb 2015 07:50

Wrong PTS when streaming an Mpeg2 stream with B-Frames

Postby eyal.bthl » 17 Feb 2015 08:10

When streaming Mpeg-2 stream that has B-Frames, the PTS that is set for the I and P frames is wrong.
With version 2.0.8, these PTS values were not set at all, and with the 2.1.x (2.1.2 and 2.1.5-latest), the PTS is set as the DTS, which is wrong!
With a stream with B-Frames, the decoding order is different than the presentation(display) order. IBBPBBPBB are displayed BBIBBPBBP.
This can be seen by the "temporal reference" mpeg2 header field which carry the actual timing-order of the frames.
This is how it should be:
Stream frames: I B B P B B P B B P B B
Temp. Ref: 1 2 0 4 5 3 7 8 6 10 11 9
DTS(ms): 0 33 66 100 133 166 200 233 266 300 333 366
PTS(ms): 66 0 33 166 100 133 266 200 233 366 300 333

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Wrong PTS when streaming an Mpeg2 stream with B-Frames

Postby InTheWings » 10 Feb 2017 16:34

You realize that in your example your PTS comes before DTS, dont you ?
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 31 guests