News:

--

Main Menu

MP4 Video Freeze During playback after export...

Started by Exorcist, December 31, 2018, 02:45:59 AM

Previous topic - Next topic

Exorcist

Hello, I've been using Avidemux to stitch together video clips from my action cam. Once that's done I run it through MS Hyperlapse and then import the file created by Hyperlapse into Avidemux, add an audio track to it and post it for some associates to view.

The past few days I've tried this, the final file always freezes up at the 10:15 mark or so. I've used different video clips, same thing happens. Is there a way to troubleshoot to see what (if any errors) occur that may be causing this? The file by itself before I re-save it with Avidemux works fine. Also, if I try to re-save it without adding an audio track the same thing happens.

I don't recall the last time I saved a 10+min file so it may have been a few versions back. I'm currently attempting it with 2.7.

Thanks.

Win7 X64/Core i5 - 6500/16GB RAM

Log file snippet of the final file when I open it up in Avidemux and attempt to seek past the 10:15 error.
[HandleAction] 03:44:15-474 ************ Scale **************
[HandleAction_Navigate] 03:44:15-474 Scale :5472
[HandleAction_Navigate] 03:44:15-474 Scale Time:615490 ms (total=1124791 ms)
[HandleAction_Navigate] 03:44:15-474 Scale Time:00:10:15,490 ms
[HandleAction_Navigate] 03:44:15-475 Seeking to  Time:00:10:14,614 ms
[DecodePictureUpToIntra] 03:44:15-475 Decoding up to intra frame 18420, ref: 0
[edCache] Flush
[canSupportThis] 03:44:15-476 DXVA2 not enabled
[lookup] 03:44:15-476 No Matching Hw accel
[ADM_FFgetFormat] 03:44:15-476 No Hw Accel for that
Paint event
[HandleAction] 03:44:15-493 ************ Scale **************
[HandleAction_Navigate] 03:44:15-493 Scale :5497
[HandleAction_Navigate] 03:44:15-493 Scale Time:618302 ms (total=1124791 ms)
[HandleAction_Navigate] 03:44:15-494 Scale Time:00:10:18,302 ms
[HandleAction_Navigate] 03:44:15-494 Seeking to  Time:00:10:17,617 ms
[DecodePictureUpToIntra] 03:44:15-494 Decoding up to intra frame 18510, ref: 0
[edCache] Flush
[adm_lavLogCallback] 03:44:15-495 [lavc] Invalid NAL unit size (-1868205882 > 90186).
[adm_lavLogCallback] 03:44:15-495 [lavc] Error splitting the input into NAL units.
[decodeErrorHandler] 03:44:15-495 [lavc] The decoder expects more input before output can be produced
[decompressImage] uncompress failed
[DecodePictureUpToIntra] 03:44:15-496  decode error for frame 18510, not necessarily a problem
[adm_lavLogCallback] 03:44:15-497 [lavc] Invalid NAL unit size (165708257 > 88456).
[adm_lavLogCallback] 03:44:15-497 [lavc] Error splitting the input into NAL units.
[decodeErrorHandler] 03:44:15-497 [lavc] The decoder expects more input before output can be produced
[decompressImage] uncompress failed
[DecodePictureUpToIntra] 03:44:15-498  decode error for frame 18511, not necessarily a problem
[adm_lavLogCallback] 03:44:15-498 [lavc] Invalid NAL unit size (1203709438 > 92310).
[adm_lavLogCallback] 03:44:15-499 [lavc] Error splitting the input into NAL units.
[decodeErrorHandler] 03:44:15-499 [lavc] The decoder expects more input before output can be produced
[decompressImage] uncompress failed

eumagga0x2a

Does the file exported by Hyperlapse play fine throughout the video? What format is it in? Did you try both of the two mp4 muxers in Avidemux to save the result?

But please try latest nigthly builds first: win64 cross-compiled and a few days older MS Visual Studio native. The steps are always to load the Hyperlapse exported file and to save it in copy mode to mp4 using the MP4 muxer (please preserve the admlog.txt from this phase). Then load the resulting file in Avidemux, check whether it is not broken.

Exorcist

Yes, the Hyperlapse file plays fine all the way through. It is in MP4, the same format the original clips are saved in by the camera. Just tried the second MP4 muxer(MP4V2) and the same error occurred.

(On a side note, I threw the Hyperlapse file into Windows Movie Maker, added the audio track in, exported it and it played fine all the way through. Looked crappier and took far longer than Avidemux though. Heh!)

I will do the rest later today. Thank you for your time and response.

Exorcist

Quote from: eumagga0x2a on December 31, 2018, 08:59:38 AM
Does the file exported by Hyperlapse play fine throughout the video? What format is it in? Did you try both of the two mp4 muxers in Avidemux to save the result?

But please try latest nigthly builds first: win64 cross-compiled and a few days older MS Visual Studio native. The steps are always to load the Hyperlapse exported file and to save it in copy mode to mp4 using the MP4 muxer (please preserve the admlog.txt from this phase). Then load the resulting file in Avidemux, check whether it is not broken.

No change, same error. Log Files attached. Each zip file contains two log files, one is the export and the second the playback wherein I just drag the seekbar across until the video freezes.

eumagga0x2a

Would you please just load the original file using any of the nightlies, open the scripting shell (Tools --> Scripting Shell), execute

ed = Editor()
for frame in range(18476,18484):
    ed.hexDumpFrame(frame)


and attach the resulting admlog.txt? Please repeat the very same steps with the exported file then (in a new Avidemux session).

Exorcist

#5
Quote from: eumagga0x2a on January 01, 2019, 10:50:21 AM
Would you please just load the original file using any of the nightlies, open the scripting shell (Tools --> Scripting Shell), execute

ed = Editor()
for frame in range(18476,18484):
    ed.hexDumpFrame(frame)


and attach the resulting admlog.txt? Please repeat the very same steps with the exported file then (in a new Avidemux session).

Will do shortly though I'm not sure if I'm pasting the code in the proper format or not. (I get a pop up window with errors)

Just a quick update. I see now that when I load the Hyperlapse video into AVIDEMUX if I try to play it through it freezes at the same spot. Though I recall doing so, perhaps I did not bother checking this before as it has always worked flawlessly and I just opened the file, added a track and then saved it. I can't recall. My apologies.

The same video file plays back fine in VLC or MPC-HC. If I load it into AVIDEMUX and attempt to play it through it will freeze up. It's not an export issue as I first thought as the error occurs before the export. (Naturally, the exported file would have the same flaw.)

Exorcist

Quote from: eumagga0x2a on January 01, 2019, 10:50:21 AM
Would you please just load the original file using any of the nightlies, open the scripting shell (Tools --> Scripting Shell), execute

ed = Editor()
for frame in range(18476,18484):
    ed.hexDumpFrame(frame)


and attach the resulting admlog.txt? Please repeat the very same steps with the exported file then (in a new Avidemux session).

This is what I get if I copy and paste the code (click on "select" then right click, select "copy" and then paste it into the shell box).

If I am entering it incorrectly, kindly let me know. My apologies in advance.

eumagga0x2a

Copypasting on Windows has destroyed the line break between assignment of Editor() to ed and the following loop where ed is used, invalidating the code.

If Avidemux fails to parse the source file's container correctly, then ultimately only providing this source file as a sample might help to identify the cause and to develop a fix, but let us start with the frame dump.

dosdan

Quote from: eumagga0x2a on January 04, 2019, 07:03:56 AM
Copypasting on Windows has destroyed the line break between assignment of Editor() to ed and the following loop where ed is used, invalidating the code.


With Windows don't paste the script straight from a web browser into ADM. Instead, paste it first into Notepad. Then highlight it there and then copy-and-paste it into ADM from Notepad. This will ensure that [CR][LF] is at the end of each line.   

Here is my attempt with this script but a different MP4 which has sufficient frames.

https://dl.dropbox.com/s/mdyj2yjhkidnl4g/admlog.zip

Dan.

Exorcist

#9
Quote from: eumagga0x2a on January 04, 2019, 07:03:56 AM
Copypasting on Windows has destroyed the line break between assignment of Editor() to ed and the following loop where ed is used, invalidating the code.

If Avidemux fails to parse the source file's container correctly, then ultimately only providing this source file as a sample might help to identify the cause and to develop a fix, but let us start with the frame dump.

I figured I messed up. When I did it manually, I got a different error as well. Thanks Dan for the notepad tip, I'm used to doing from other sources i.e. webpages and what not. I'm clueless when it comes to standard coding/programming syntax.

Anyway, attached is what I believe is a proper logfile. Dropbox link is https://www.dropbox.com/s/au24076lgtckw4w/admlog.zip?dl=0

Many thanks.

eumagga0x2a

Thank you, all the 9 dumped frames are corrupted (I hoped to see the boundary between good and bad frames). Anyway, I fear that it would be impossible to locate the problem without a sample. I also don't want to raise hopes even if you make the sample available, but it might improve the chances.

Exorcist

#11
Quote from: eumagga0x2a on January 04, 2019, 07:42:22 PM
Thank you, all the 9 dumped frames are corrupted (I hoped to see the boundary between good and bad frames). Anyway, I fear that it would be impossible to locate the problem without a sample. I also don't want to raise hopes even if you make the sample available, but it might improve the chances.

Thank you for your time and effort. I have some older hyperlapse files that I'll take a look at and see if the same issue occurs. I'll attempt to download them from the work computer after hours.
In the meantime, here is the dropbox link to the hyperlapse file. https://www.dropbox.com/s/whjb8yy97y1vgyu/Gran%20Fondo%20Route%20Solo_hyperlapse_8x_std.mp4?dl=0

If you play it in a regular player it should work fine. When it is imported to AVIDEMUX and then played/seek you'll notice the freeze.

Thank you once again.

eumagga0x2a

Thank you very much for the sample. This is a very interesting issue. First of all, linear playback works fine throughout the video. Decoding of isolated keyframes begins to fail at frame 18480.

Now for the best part:

ed=Editor()
frame=18450
ed.printTiming(frame)
ed.hexDumpFrame(frame)
frame=18480
ed.printTiming(frame)
ed.hexDumpFrame(frame)


Note that frame data begins with "00 00" sequence. Now repeat the last two calls:
ed.printTiming(frame)
ed.hexDumpFrame(frame)


The frame data changes erratically. The first frame which exhibits this anomaly is frame 18474.

By the way, such a time-lapse is easily achievable with Avidemux alone using a combination of the "Resample FPS" and "Change FPS" filters. Unless you need crossfading, Avidemux is sufficient while the x264 encoder would allow a much better quality and compression rate (or the NVENC-based one a very high encoding speed at the cost of low compression rate and mediocre quality).

Exorcist

One of the theoretical benefits of using MS HYPERLAPSE as opposed to a standard hyperlapse function is it's ability to create a more clean path (so to speak) and result in less choppy imagery. "Smooth and stabilized" is their term. :)

I will attempt to run the hyperlapse via AVIDEMUX. I think I may also have some older files that did work with AVIDEMUX. I wonder what has changed that would make the previous files usable and the current ones not. Computer hardware change? OS update? It baffles me quite a bit. I've made a followup video and the result is the same.

The initial clips are all stitched together with AVIDEMUX, then it's run through HYPERLAPSE and then back again to AVIDEMUX to add the audio track.

Thanks for your time and effort.

Exorcist

I got a hold of two old hyperlapse files I had created at the office computer back in 2016. Interesting to note, one of the files exhibits the same issue on the office computer, the second file does not. The version of AVIDEMUX at the office computer is 2.6.13.

However, when I download them at home and use either the nightly (desktop and main machine for processing the video) or 2.6.15 on a different computer (laptop) both files exhibit the same freeze issue.

I then downloaded the portable version of AVIDEMUX 2.6.13 onto the laptop and still both files refuse to play through properly.

Any thoughts as to why -at the very least- one file would behave properly in AVIDEMUX on the office computer but won't on the other computers? Is this something you'd care to look into? (Though it seems that MS HYPERLAPSE file seems to be the main issue, ehhh?)

Once again, thanks for your time and effort.