This video contains B-frames, but presentation time stamps (PTS) are either...

Started by Fozzie Bear, October 03, 2025, 02:22:34 PM

Previous topic - Next topic

Fozzie Bear

Hi I have the same issue as @gekht posted in the OSX forum.
I am using 2.8.1 on Windows 10 64 bit. The videos are 720p downloads from BBC iPlayer via get_iplayer app. (I am reducing the file size simply by selecting Bilinear in SWsResize Filter leaving all other settings alone. I find this reduces a 720P Mp4 from iPlayer to an Mp4 half the original size whilst retaining quality).

If I choose yes to the prompt it converts the file but the video is disjointed and the sound track out of sync. If I say no/cancel it converts the file and the video appears to be OK but the soundtrack is well out of sync.
I have tried downloading and installing the latest 2.8.2 nightly build and get the same error.

You asked @gekht for a 300Mb clip of the video. do you want the video before or after conversion or both. How do create a 300mb preview from the whole file and what does Head or dd mean please?

eumagga0x2a

Quote from: Fozzie Bear on October 03, 2025, 02:22:34 PMdo you want the video before or after conversion or both.

Please provide only the source video as output by that app (please choose the smallest sample enough to reproduce the issue, it would be lovely if the file size were well below 1 GiB, better below 300 MiB).

Quote from: Fozzie Bear on October 03, 2025, 02:22:34 PMHow do create a 300mb preview from the whole file

This depends from the container format the app outputs. If it is anything other than MPEG-TS: you simply don't (and use the file as a whole) as only MPEG-TS allows to cut a part out of the file without rendering it invalid.

Quote from: Fozzie Bear on October 03, 2025, 02:22:34 PMwhat does Head or dd mean please?

head (case-sensitive lowercase) and dd are basic Unix command-line tools (on Linux, they belong to the package coreutils) to operate on data streams / files. They can be used on a console (in a terminal) to write the specified number of units (lines, bytes, MiB etc.) from a file to a new file in a content-agnostic way.





Fozzie Bear

I've finally got round to uploading a segment of one of the videos that causes the error This video contains B-frames, but presentation time stamps (PTS) are either .......
I had to work out how to reduce the file in windows without editing it. I finally found Lossless cut which reduced the video length.
As I said before I am running 2.8.2 nightly build and the error only seems to happen with files downloaded using get_iplayer from the BBC iplayer website.

I downloaded another file today to see if it still had the same issue and it does. I belive get_iplayer uses ffmpeg to remux the raw file (.ts??) to mp4
Here is the link to the file shared on Onedrive
Let me know if you have issues accessing the file

Fozzie Bear


eumagga0x2a

Quote from: Fozzie Bear on Today at 03:41:00 PMHave you managed to view the file segment I shared?

Just got the sample, thank you for reminding me. Indeed, timing in the file is a mess, with roughly a half of frames having duration of 1 in 90 kHz units while the remainder is oscillating between approx. 20 ms and approx. 60 ms:

[MP4Header::indexify] Histogram map has 7 elements.
Frame duration 1 count: 10236
Frame duration 1798 count: 3412
Frame duration 1799 count: 3269
Frame duration 1800 count: 3555
Frame duration 3599 count: 142
Frame duration 3600 count: 3269
Frame duration 5400 count: 3412

We should have got just all frame duration being equal 1800, maybe with a few gaps (duration 3600 and 5400).

Apparently, each 5th picture produces by the decoder ends up with presentation timestamp going backward by exactly 1 unit (1/90000 of a second – approx. 11 microseconds), so it gets dropped and the warning about wrong frame order is shown. Accepting the dialog makes the mess complete, need to investigate why this happens.

The best strategy to deal with such files for now is to reject the dialog and to re-encode the video with the "Resample" filter with PAL50 as target fps in the filter chain.