Output files corrupted in Avidemux 2.7.2 and 2.7.1 on Mojave. Please help!

Started by katya, March 29, 2019, 02:09:32 AM

Previous topic - Next topic

katya

Please help!
I need to stitch some GoPro mp4 videos for work. At first, when I discovered Avidemux it was going fine, but then some of the videos come out corrupted, even though I did not change anything!

I need them very urgently to have the project finished in a week, and I can't figure out what I am doing wrong. I need the output format to be the same as input (mp4) so below in the attachment are the settings that I use. Also, some screenshots of the issues with the output stitched video - it blinks through grey screen intermittent with the corrupted top part of the video.

I would really appreciate if someone could share some thoughts on how it can be fixed... I am using 2.7.2 (at the moment) on Mojave, BUT this issue was the same before I upgraded from 2.7.1. As I said, at first, everything worked.

Thanks a lot!

eumagga0x2a

Does corrupted picture occur only at the boundaries between individual videos? If not, does it occur just by saving an individual video in copy mode?

By all means I would suggest using the MP4 muxer, the MP4v2 is an old dead-end, it was helpful back then because of in some aspects better compatibility with early smartphones, now completely irrelevant.

The copy mode for saving appended videos is never guaranteed to succeed as codec settings used by the device or software which generated the files must perfectly match. If a very slight loss of visual quality is acceptable, re-encode with the x264 encoder (HEVC should be used only if you know for sure that the target device supports it).

To investigate the reason for problems, could you please launch Avidemux from the Terminal

/Applications/Avidemux_2.7.2.app/Contents/MacOS/Avidemux2.7 > ~/Desktop/admlog.txt 2>&1

reproduce the issue from scratch, then compress and attach the generated admlog.txt from the desktop to your reply?

katya

Thank you for a quick response. No, corruption is all through the video. I tried to export the original video and it is fine, encoding is not necessary. But when I stitch the problems arise... I tried in many different ways. Here is the log file using MP4 muxer

eumagga0x2a

The log shows that you appended probably the same GoPro video twice to another, previously loaded video. The codec parameters of that first video doesn't match codec parameters of the GoPro video, so that if you get to see anything starting with approx. 1 minute into the saved video then by pure luck. However, I would expect that within that time the video should be decoded fine.

QuoteNo, corruption is all through the video.

Is it really so? Even during the first minute?

As explained before, you can't merge videos with not identical codec parameters in copy mode, you must re-encode.

edit: In other words: if you load just the GoPro video alone and append it to itself, the result, saved in copy mode, should be fine. If it is not, there is a (serious) bug.

katya

Thank you for the response. We need to append 1min of blank footage onto our videos, but the piece was also filmed on GoPro, so I am not sure why is there a discrepancy. Also, it worked for the first few rounds. So you think if I used x264 encoder if would stop the problem from happening? But I suppose it would then take much longer to process, right?

eumagga0x2a

Quote from: katya on April 09, 2019, 01:17:02 AM
We need to append 1min of blank footage onto our videos, but the piece was also filmed on GoPro, so I am not sure why is there a discrepancy.

Was it shot with the very same GoPro model with an identical firmware version and identical settings? Here is the extradata (decoder settings required to decode H.264 data) for the blank footage, dumped by the editor component of Avidemux at line 439:


The video codec has some extradata (63 bytes)

0000 : .M.(...0'M.(.b..   01 4d 00 28 ff e1 00 30 27 4d 00 28 9a 62 80 f0
0010 : .O......H....C..   04 4f cb 80 88 00 00 1f 48 00 05 dc 07 43 00 06
0020 : .......\h`.....Z   b4 a0 00 1a d2 8d de 5c 68 60 00 d6 94 00 03 5a
0030 : Q....!.X...(.<.    51 bb cb 87 c2 21 14 58 01 00 04 28 ee 3c 80


And this is for the appended video at line 739:


The video codec has some extradata (68 bytes)

0000 : .d.)...5'd.).4..   01 64 00 29 ff e1 00 35 27 64 00 29 ac 34 c8 07
0010 : ."~\...........w   80 22 7e 5c 05 b8 08 08 0a 00 00 07 d2 00 01 77
0020 : ...........yq...   01 d0 c0 00 e4 e0 00 00 e4 e1 d7 79 71 a1 80 01
0030 : ...........E....   c9 c0 00 01 c9 c3 ae f2 e1 f0 88 45 16 01 00 04
0040 : (.80               28 ee 38 30


They clearly don't match.

QuoteAlso, it worked for the first few rounds.

It would be interesting to examine the extradata of the appended files which were compatible then. It should be also checked whether "worked" amounted to decoder error concealment working really hard (the log will tell :-)).

QuoteSo you think if I used x264 encoder if would stop the problem from happening?

Yes, it should.

QuoteBut I suppose it would then take much longer to process, right?

Of course, it would also diminish quality.

Who knows, maybe the blank footage could be decoded okay using the decoder config from other videos? You could try it other way round: first load a payload video, then append the blank footage, then append again the first payload video. Delete the part of the video before the blank footage. Save in copy mode.

This would use the decoder configuration from the payload also for the blank footage. Most likely, this will result in inability to decode that 1 minute long part properly or even in complete inability to play the video. If this unexpectedly turns out to be working, please check admlog.txt from playing the result in Avidemux. An apparently successful decoding may be just a result of error concealment.

By the way, I would recommend using the latest 2.7.3 nightly (190404) from https://avidemux.org/nightly/osx_mojave/ While not related to this particular topic, it contains quite a lot of fixes and is surely better than the 2.7.2 release.

katya

Thank you so much for your comments! I will re-shoot the blanks and try again with the updated software. Thanks for your help!