Author Topic: Doesn't trim selection  (Read 783 times)

LordMaster316

  • Newbie
  • *
  • Posts: 5
Doesn't trim selection
« on: March 17, 2019, 04:17:23 PM »
when I trim a file in the 2.7 - 64 version it renders large amounts outside of the selection. 6 minute trim turns into 40+ after rendering

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #1 on: March 17, 2019, 07:11:35 PM »
Please reproduce the issue, then compress and attach admlog.txt from %localappdata%\avidemux\ to your reply.

LordMaster316

  • Newbie
  • *
  • Posts: 5
Re: Doesn't trim selection
« Reply #2 on: March 17, 2019, 07:52:40 PM »
hopefully, this helps

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #3 on: March 17, 2019, 08:17:37 PM »
Thank you, things start to go wrong at the line 1659 of the log:

Code: [Select]
[ADM_videoStreamCopy::ADM_videoStreamCopy] 19:13:27-748 PTS/DTS delta=2271430737 us
We detect a delay of almost 38 minutes between the decode (DTS) and the presentation (PTS) timestamps in the video – this is why the saved duration is vastly different from the expected one. Was the index file (the loaded .mp4 file is not a MP4 but a MPEG TS) generated with 2.7.2 or with an older Avidemux version?

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #4 on: March 17, 2019, 08:24:46 PM »
Actually, the reason for the anomaly is

Code: [Select]
[tsHeader::getVideoDuration] 19:11:59-527 Found maxDts =00:00:00,000, 966332 frames from the end
DTS are unset in the stream (apart from the default DTS = 0 for the first frame), so all checks based on the assumption that we can do anything meaningful based on DTS produce unexpected results.

LordMaster316

  • Newbie
  • *
  • Posts: 5
Re: Doesn't trim selection
« Reply #5 on: March 17, 2019, 08:35:12 PM »
Thank you, things start to go wrong at the line 1659 of the log:

Code: [Select]
[ADM_videoStreamCopy::ADM_videoStreamCopy] 19:13:27-748 PTS/DTS delta=2271430737 us
We detect a delay of almost 38 minutes between the decode (DTS) and the presentation (PTS) timestamps in the video – this is why the saved duration is vastly different from the expected one. Was the index file (the loaded .mp4 file is not a MP4 but a MPEG TS) generated with 2.7.2 or with an older Avidemux version?

Yes, it first started to occur with 2.6. Although the issue is fairly recent, 2-3 months recent

Actually, the reason for the anomaly is

Code: [Select]
[tsHeader::getVideoDuration] 19:11:59-527 Found maxDts =00:00:00,000, 966332 frames from the end
DTS are unset in the stream (apart from the default DTS = 0 for the first frame), so all checks based on the assumption that we can do anything meaningful based on DTS produce unexpected results.

How should we proceed?
« Last Edit: March 17, 2019, 08:36:57 PM by LordMaster316 »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #6 on: March 17, 2019, 08:49:49 PM »
Did you reindex the stream with 2.7.2 by deleting the corresponding .idx2 file?

LordMaster316

  • Newbie
  • *
  • Posts: 5
Re: Doesn't trim selection
« Reply #7 on: March 17, 2019, 09:13:43 PM »
Did you reindex the stream with 2.7.2 by deleting the corresponding .idx2 file?

I have results remain the same

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #8 on: March 17, 2019, 09:21:19 PM »
Thanks, could you please provide a sample ~200 MiB in size of the source video using a binary cutter / file splitter (e.g. HJSplit) and a service like WeTransfer, Mega, Dropbox or Google Drive? Of course, only if the video is innocuous enough :-)


LordMaster316

  • Newbie
  • *
  • Posts: 5
Re: Doesn't trim selection
« Reply #9 on: March 18, 2019, 12:22:19 PM »
Thanks, could you please provide a sample ~200 MiB in size of the source video using a binary cutter / file splitter (e.g. HJSplit) and a service like WeTransfer, Mega, Dropbox or Google Drive? Of course, only if the video is innocuous enough :-)



The source file is 6GB+ so I couldn't sync every file, but hopefully, what's there will help.

https://www.dropbox.com/sh/1mlopj0s6g7hxmw/AAC4KxnjvEEz3UuLz3EXNVw-a?dl=0

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #10 on: March 18, 2019, 07:48:02 PM »
Thank you very much, I needed just the first chunk.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #11 on: March 19, 2019, 01:07:32 PM »
I pushed a patch to the ffmpeg4x branch tailored for the specific brokenness (dts missing AND time increment wrong) and codec features (H.264 without B-frames) of the sample. Future nightlies should handle this source video fine. A more generic solution likely to follow.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3404
Re: Doesn't trim selection
« Reply #12 on: March 19, 2019, 06:45:48 PM »
Please try the 190319 nightly from https://avidemux.org/nightly/vsWin64/