Opened 5 years ago

Last modified 5 years ago

#8406 new defect

Audio and subtitle streams are with incorrect duration when demux UHDs with multi m2ts

Reported by: zqslzwzw Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: wb518168@163.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I am trying to demux some uhd blu-rays disk, which are produced by pixer and feature multi m2ts in the main .mpls file. However, take toy story 4 as example, the duration of all the extracted audio and subtitle streams is about 2s longer (1:40:05) than the one original movie (1:40:03), such that the they are out of synchronous with video after remux.

During the whole demux time, ffmpeg keeps issuing thousands of such warnings for every stream.

By contrast, I also have tried some other software, such as eac3to, tsmuxer and mkvtoolnix. According to the test results, only tsmuxer built with the latest code at github can demux these UHDs correctly (For the exemplified UHD, all the extracted audio stream with the duration 1:40:03 are obtained), and it keeps showing the information as below:
AC3 stream (track 3): overlapped frame detected at position 00:00:48,607. Remove frame.
AC3 stream (track 4): overlapped frame detected at position 00:00:48,607. Remove frame.
Maybe this problem arises from the overlapped frame at the seam between m2ts files.
How to reproduce:

% ffmpeg -i bluray:..\Toy.Story.4.2019.ULTRAHD.Blu-ray.2160p.HEVC.TrueHD.Atmos.7.1-xxx -playlist 4 -map 0:2 -c copy  2.eac3 -map 0:3 -c copy  3.eac3 -map 0:4 -c copy  4.eac3 -map 0:5 -c copy  5.eac3 -map 0:6 -c copy  6.eac3 -map 0:7 -c copy  7.eac3 -map 0:8 -c copy  8.eac3 -map 0:9 -c copy  9.sup -map 0:10 -c copy  10.sup -map 0:11 -c copy  11.sup -map 0:12 -c copy  12.sup -map 0:13 -c copy  13.sup

The whole log file is too large (171 MB) to paste, so only the header is included as attachment.

The probable relevant warning lines in the log are :

[sup @ 000001f2919b06c0] Non-monotonous DTS in output stream 8:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a1 pes_code=0x1bd
[sup @ 000001f2919b06c0] Non-monotonous DTS in output stream 8:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a1 pes_code=0x1bd
[sup @ 000001f2919b06c0] Non-monotonous DTS in output stream 8:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a1 pes_code=0x1bd
[sup @ 000001f2919b06c0] Non-monotonous DTS in output stream 8:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a1 pes_code=0x1bd
[sup @ 000001f2919b06c0] Non-monotonous DTS in output stream 8:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a1 pes_code=0x1bd
[sup @ 000001f2919b06c0] Non-monotonous DTS in output stream 8:0; previous: 497132820, current: 497131662; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a2 pes_code=0x1bd
    Last message repeated 1 times
[sup @ 000001f2919262c0] Non-monotonous DTS in output stream 9:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a2 pes_code=0x1bd
[sup @ 000001f2919262c0] Non-monotonous DTS in output stream 9:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a2 pes_code=0x1bd
[sup @ 000001f2919262c0] Non-monotonous DTS in output stream 9:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a2 pes_code=0x1bd
[sup @ 000001f2919262c0] Non-monotonous DTS in output stream 9:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a2 pes_code=0x1bd
[sup @ 000001f2919262c0] Non-monotonous DTS in output stream 9:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a2 pes_code=0x1bd
[sup @ 000001f2919262c0] Non-monotonous DTS in output stream 9:0; previous: 497132820, current: 497131662; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a3 pes_code=0x1bd
    Last message repeated 1 times
[sup @ 000001f291926900] Non-monotonous DTS in output stream 10:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a3 pes_code=0x1bd
[sup @ 000001f291926900] Non-monotonous DTS in output stream 10:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a3 pes_code=0x1bd
[sup @ 000001f291926900] Non-monotonous DTS in output stream 10:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a3 pes_code=0x1bd
[sup @ 000001f291926900] Non-monotonous DTS in output stream 10:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a3 pes_code=0x1bd
[sup @ 000001f291926900] Non-monotonous DTS in output stream 10:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a3 pes_code=0x1bd
[sup @ 000001f291926900] Non-monotonous DTS in output stream 10:0; previous: 497132820, current: 497131662; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a4 pes_code=0x1bd
    Last message repeated 1 times
[sup @ 000001f291918880] Non-monotonous DTS in output stream 11:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a4 pes_code=0x1bd
[sup @ 000001f291918880] Non-monotonous DTS in output stream 11:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a4 pes_code=0x1bd
[sup @ 000001f291918880] Non-monotonous DTS in output stream 11:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a4 pes_code=0x1bd
[sup @ 000001f291918880] Non-monotonous DTS in output stream 11:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a4 pes_code=0x1bd
[sup @ 000001f291918880] Non-monotonous DTS in output stream 11:0; previous: 497132820, current: 497130742; changing to 497132820. This may result in incorrect timestamps in the output file.
[mpegts @ 000001f28faabc00] pid=12a4 pes_code=0x1bd
[sup @ 000001f291918880] Non-monotonous DTS in output stream 11:0; previous: 497132820, current: 497131662; changing to 497132820. This may result in incorrect timestamps in the output file.
...

Attachments (2)

ffmpeg_demux_2&_header.txt (113.6 KB ) - added by zqslzwzw 5 years ago.
the header of the long log
ffmpeg_demux_2&_tail.txt (72.8 KB ) - added by zqslzwzw 5 years ago.
the tail of the long log

Download all attachments as: .zip

Change History (5)

by zqslzwzw, 5 years ago

Attachment: ffmpeg_demux_2&_header.txt added

the header of the long log

by zqslzwzw, 5 years ago

Attachment: ffmpeg_demux_2&_tail.txt added

the tail of the long log

in reply to:  description ; comment:1 by Carl Eugen Hoyos, 5 years ago

Component: ffmpegundetermined
Keywords: demux incorrect duration removed

Replying to zqslzwzw:

% ffmpeg -i bluray:..\Toy.Story.4.2019.ULTRAHD.Blu-ray.2160p.HEVC.TrueHD.Atmos.7.1-xxx -playlist 4 -map 0:2 -c copy  2.eac3 -map 0:3 -c copy  3.eac3 -map 0:4 -c copy  4.eac3 -map 0:5 -c copy  5.eac3 -map 0:6 -c copy  6.eac3 -map 0:7 -c copy  7.eac3 -map 0:8 -c copy  8.eac3 -map 0:9 -c copy  9.sup -map 0:10 -c copy  10.sup -map 0:11 -c copy  11.sup -map 0:12 -c copy  12.sup -map 0:13 -c copy  13.sup

The whole log file is too large (171 MB) to paste, so only the header is included as attachment.

Why can't you provide the console output of the command line pasted above?
It's hard to believe that it's too big to be shown here.

What is your actual use-case and how is extracting raw files supposed to make the output file longer (as you claim)?

comment:2 by zqslzwzw, 5 years ago

Cc: wb518168@163.com added
Summary: Incorrect duration of audio and subtitle streams when demux UHDs with multi m2tsAudio and subtitle streams are with incorrect duration when demux UHDs with multi m2ts

in reply to:  1 comment:3 by zqslzwzw, 5 years ago

Replying to cehoyos:

Replying to zqslzwzw:

% ffmpeg -i bluray:..\Toy.Story.4.2019.ULTRAHD.Blu-ray.2160p.HEVC.TrueHD.Atmos.7.1-xxx -playlist 4 -map 0:2 -c copy  2.eac3 -map 0:3 -c copy  3.eac3 -map 0:4 -c copy  4.eac3 -map 0:5 -c copy  5.eac3 -map 0:6 -c copy  6.eac3 -map 0:7 -c copy  7.eac3 -map 0:8 -c copy  8.eac3 -map 0:9 -c copy  9.sup -map 0:10 -c copy  10.sup -map 0:11 -c copy  11.sup -map 0:12 -c copy  12.sup -map 0:13 -c copy  13.sup

The whole log file is too large (171 MB) to paste, so only the header is included as attachment.

Why can't you provide the console output of the command line pasted above?
It's hard to believe that it's too big to be shown here.

What is your actual use-case and how is extracting raw files supposed to make the output file longer (as you claim)?

I would like to appreciate you for your attention. I will try my best to provide useful information further.

With regard to the first question, indeed the console output of the command line I used is very very long, such that it rapidly exceeds the length limitation of console screen buffer. I have to redirect this output to file (by append '1> stdout.txt 2> stderr.txt' to the command line) to see the whole output. So, actually the log file whose size is 171 MB I mentioned above is exactly what the console output for the command line I used. So I picked the first 2000 lines and the last 2000 lines. If this is not sufficient to judge the case, I am glad to pick more or upload it to some location at your instruction.

The second question. I demux this uhd as I would like to use the extracted audio and subtitle stream to mux encoded video stream, for my own interest other than commercial purpose. So if the duration of the extracted audio stream varies from the original value, the mux version will behave imperfect as the audio and video are not synchronous.

When it comes to the last question, I am sorry but I feel that I do not quite catch it (English is not my native language). Actually I know litter about audio and video. In my opinion, since the duration of audio should be equal to the value of the video as they are synchronous in original movie, the extracted audio streams should hold the same duration as the packaged one.

Note: See TracTickets for help on using tickets.