Avidemux Forum

Avidemux => Windows => Topic started by: Bearbear on January 26, 2020, 12:36:04 PM

Title: Problem re-encoding Reddit videos
Post by: Bearbear on January 26, 2020, 12:36:04 PM
Avidemux seems to have problems with Reddit videos, it encodes what appears to be only the first second of the video. I've tried various codecs to encode to such as x264, x265, xvid4 and also tried using mp4 and mkv containers, but they all result in the same thing.

Example original video: https://v.redd.it/v1ks7kkvjga41/DASH_720?source=fallback

Is it something to do with the way dash/HLS videos are made?
Title: Re: Problem re-encoding Reddit videos
Post by: eumagga0x2a on January 26, 2020, 03:10:13 PM
I'll look later into the particular sample, but yes, your assumption is most probably correct as for now we support only fragmented mp4 (dash) with an empty moov box. If it is not empty, Avidemux sees just the first fragment.

Apart from that, the log shows a massively broken file (duplicated pts).
Title: Re: Problem re-encoding Reddit videos
Post by: eumagga0x2a on January 26, 2020, 03:38:19 PM
Well, no, we correctly detect dash here but then due to duplicated pts and maybe other issues with the file things go terribly wrong, especially after recent improvements in time base handling.

Thank you very much for the sample, but is it just a rare exception or is everything on reddit of this kind?
Title: Re: Problem re-encoding Reddit videos
Post by: Bearbear on January 26, 2020, 06:06:38 PM
It's all of them from what I've tried. I can't seem to post the links because this forum thinks it's spam.

Hopefully this works: https://paste.ee/p/PnLRU
Title: Re: Problem re-encoding Reddit videos
Post by: eumagga0x2a on January 26, 2020, 08:12:55 PM
Thanks for heads up, will look into the issue with the mp4 demuxer once the current work on copy mode related modifications in the editor is either completed or discarded.
Title: Re: Problem re-encoding Reddit videos
Post by: Bearbear on January 26, 2020, 11:48:53 PM
Thanks eumagga0x2a, no rush at all, you can consider this super low priority ;D
Title: Re: Problem re-encoding Reddit videos
Post by: eumagga0x2a on March 13, 2020, 06:42:31 PM
Should be fixed for provided samples by  [demuxers/Mp4] Support fragmented mp4 with default dts increment specified in trex box only (https://github.com/mean00/avidemux2/commit/3581d6a8edbb284856dda9b12cb669086db9c150), please try a future nightly.
Title: Re: Problem re-encoding Reddit videos
Post by: eumagga0x2a on March 18, 2020, 03:06:34 PM
Nightly builds (200318) with a followup fix (https://github.com/mean00/avidemux2/commit/f2a12b5334b16529ffd96382fc0ac24dd45ad8f1) on top of the first rough take are now available --> https://avidemux.org/nightly/
Title: Re: Problem re-encoding Reddit videos
Post by: Bearbear on March 21, 2020, 10:35:22 PM
Thanks a lot eumagga0x2a, really appreciate the fix!

Hope you (and everyone else) are doing well and staying safe :)