r8897 still crashes when saving after edits on non-keyframes

Started by fkuebler, September 01, 2013, 02:41:59 PM

Previous topic - Next topic

fkuebler

Some while ago, with the (then) newest avidemux 2.6.4 for MacOS X 10.8.4, I could edit an mp4 file also on P- or even B-frames, mostly just simply for cutting the beginning of a video. When saving the result I got a warning message about not using keyframes for the edit, but the saved file was ok and usable.

Since about early August, including the latest build r8897, I can still do this type of edit, and when saving I get the same warning message, but when I now click Ok, then I get a crash-message from Avidemux and the edit is lost:

"Crash
Assert failed: flags & AVI_KEY_FRAME
file
/users/fx/hudson/workspace/2.6_mac/avidemux/qt4/common/ADM_editor/src/ADM_segment.cpp, line 517"

Can anybody help? Or is a bugfix planned?

mean

Very little knowledge of mac over here, cannot be of much assistance


fkuebler

Quote from: mean on September 06, 2013, 08:11:23 AM
Very little knowledge of mac over here, cannot be of much assistance

IMHO somebody doing the Mac-Relasing should be able to get around that bug without too much effort.

It can't be overly complicated, because before August this crash in this situation didn't happen, and possibly it is just sort of a software-internal safety-exit. Apparently it's no OS-level crash, but an emergency exit by Avidemux itself.

And it's a pity because Avidemux is a really valuable tool in the limited MacOS world.


fkuebler

Quote from: mean on September 22, 2013, 02:18:29 PM
Probably fixed in nightly
http://avidemux.org/nightly/osx/Avidemux2.6_r8932.dmg

Yes, the crash is fixed. Thank you.

But just for information: when cutting the start of an mp4 on a B frame, as I just did for testing, then I got a delay of the video relative to the audio of app. 1..2 seconds.

mean


mean


fkuebler

Quote from: mean on September 22, 2013, 03:21:32 PM
If you dont cut at all, do you have the delay ?

No, the uncut version of the mp4 has perfect audio synchronisation


mean


fkuebler

Quote from: mean on September 22, 2013, 06:26:26 PM
cut on keyframe

Ups, of course, sorry for my sillyness...

I tried it, and much to my surprise, when cutting on an intraframe, I get the same video delay of 2.5 seconds with my 30 min mp4.

fkuebler

#11
I ran some tests. First with a second mp4 also coded in the same way with Handbrake (profile: Apple TV3). Both cutting at a B frame and cutting at an I frame did not distort the original audio-video-synchronization.

Then I looked again at the initial mp4 that after any way of cutting led to the reported 2500 ms video delay. MediaInfo gave me the information for both audio tracks: video delay 2500 ms!

So here is my speculative conclusion: although the audio and video synchronization of the uncut original mp4 was perfect, some of the software in the workflow that generated it (mainly Handbrake nightly builds) had - for whatever reason - introduced this video-delay-information into the containers information tables.

And Avidemux apparently felt obliged to output an mp4 with the video delay reduced to 0, by finally "implementing" the video delay of 2500 ms, thus innocently distorting the audio-video-sync.

I cannot blame Avidemux for that. And I have learned to better use MediaInfo in the future, before doing any Avidemux cuts.

mean

Might be that avidemux ignores the side information giving the delay
When you playback the file in avidemux, is the delay already there ?

fkuebler

Quote from: mean on September 25, 2013, 11:46:47 AM
When you playback the file in avidemux, is the delay already there ?

Yes, playing the original uncut mp4 back in Avidemux has the video already delayed by 2500 ms.

To avoid any misunderstandings, I try to make a table: "Uncut" means the original mp4 as I got it from Handbrake, "Cut" means the mp4v2 file output by Avidemux after cutting some part of the beginning either at a B frame or at an I frame.




mp4 file version:                   Uncut                Cut

Audible video playback
delay in VLC, ms                    none              2500

Video delay in MediaInfo,        2500                 47
same for both audio tracks

Audible video playback
delay in Avidemux, ms           2500             2500

I hope this sheds some light onto what happens.

mean

i would be interested in having a small sample file with side information saying the delay is 2500 ms
so that it is taken into account by avidemux