Avidemux Forum

Avidemux => Windows => Topic started by: mads on June 23, 2017, 01:05:50 PM

Title: Since version 2.6.13 merged mp4 files has artifacts on clip change
Post by: mads on June 23, 2017, 01:05:50 PM
Hi,

I have a workflow which involves using avidemux to merge several videoclips into one.

Source is mp4 files taken with my phone. It has been working fine for a long time, but lately it seems to create digital artifacts where the videos are stiched.

I did actually recently upgrade avidemux because I had some other problems with files being upside down, can't quite remember.

However, i did some testing and it boils down to:

version 2.6.12 is the last version not generating these artifacts.
version 2.6.13 and above creates artifacts.

merge command used is this:
avidemux.exe --load file1.mp4 --append file2.mp4 --append file3.mp4 --output-format MP4v2 --video-codec Copy --audio-codec Copy --save output.mp4 --quit

example:
https://postimg.org/image/eob2y99np/ (https://postimg.org/image/eob2y99np/)

Anyone know if I need some other settings in 2.6.13 and beyond to prevent this or if it is a bug...

Best regards,
Mads
Title: Re: Since version 2.6.13 merged mp4 files has artifacts on clip change
Post by: eumagga0x2a on June 23, 2017, 05:33:03 PM
Is the issue specific to the MP4v2 muxer? Have you tried the latest nightly build?

http://avidemux.org/nightly

If the issue persists with the nightly, please provide a minimal testcase (two short videos shot with your phone).
Title: Re: Since version 2.6.13 merged mp4 files has artifacts on clip change
Post by: mads on June 24, 2017, 10:58:44 PM
Okay.

Using this : avidemux_2.7.0_r170623_win64.exe

command:

avidemux.exe --load 20170618_082246.mp4 --append 20170618_082253.mp4 --output-format MP4v2 --video-codec Copy --audio-codec Copy --save merged-MP4v2.mp4 --quit
avidemux.exe --load 20170618_082246.mp4 --append 20170618_082253.mp4 --output-format MP4 --video-codec Copy --audio-codec Copy --save merged-MP4.mp4 --quit

artifacts in both :(

sample files here:
https://www.dropbox.com/sh/wr14hgqv6so3vwc/AACsN_ohdDR2_5_5eZGj1M1Sa?dl=0

Title: Re: Since version 2.6.13 merged mp4 files has artifacts on clip change
Post by: eumagga0x2a on June 25, 2017, 10:08:19 PM
Thank you for the samples, I can reproduce the issue. It doesn't depend on muxer. The artifacts result from the first I-frame of the appended video being dropped due to decoding timestamp (dts) going back in time.

The workaround in this particular case is to delete the last frame (it is an I-frame) of the first video prior to appending the second one:

Title: Re: Since version 2.6.13 merged mp4 files has artifacts on clip change
Post by: mads on June 25, 2017, 11:49:12 PM
Thank you for looking into this. I suspected something like that was the cause.

As for the workaround. I merge all my content via a script, so I'm not sure how to automate frame deletion from outside.

For now I just rolled back and use avidemux version 2.6.12 which does not produce the artifacts at all.