News:

--

Main Menu

MP4 Synced in Avidemux, out of sync when played

Started by bowjest, April 10, 2013, 02:42:34 PM

Previous topic - Next topic

bowjest

Hello,

I've been trying for the last couple of hours to figure this out, but so far have been unsuccessful.

I've got an MP4 file that is out of sync: audio ahead of video. If I sync it all up in Avidemux 2.5.4, and watch it for several minutes, all looks good. If, however, It then save the newly-synced file for watching via AppleTV or QT Player, it's out of sync again (audio ahead of video).

I've followed all the steps found here:

http://www.hecticgeek.com/2013/02/fix-audio-video-sync-save-permanently-avidemux/

and this has worked for 2 other similar videos, but not for this one (so far).

Can anyone advise what I might be doing wrong?

Thanks,

Bowjest

fkuebler

Most probably you know that already: there is now finally a more recent release of Avidemux: version 2.6.4 for the Mac: http://www.avidemux.org/nightly/

Perhaps this does better with your problem.

FWIW: Avidemux is a very fine tool, perhaps even the best, but at least with me, it can cause various audio problems. E.g. with one large HD mpv file, I get some audio dropouts after cutting, and in one case even after 10 minutes or so the audio stops altogether. I have not found out why, so I have to check with every file after cutting it with Avidemux, unfortunately...

Jan Gruuthuse

Make sure you load and append video and parts manually.
With same output format and copy for both video/audio create new video. (re-encode afterwards if needed)
Only mark cutting point [A ] and [ B] with up/down arrow keyboard keys: not with left/right key
1st Trim in front of video: Don't use marker [A ], goto begin where new video should start, select [ B] with only up/down key. Cut this block with [Ctrl][X]
Move to next block you want to cut out. Mark start of cut with [A ] goto end of that block, mark [ B]. Cut this block with [Ctrl][X]
When finished removing unwanted blocks
Goto where the new video should stop. Mark this [ B], this is only point where you could also use left and right keyboard arrow.
Now save the new video.
Additional control: check the cuts made by playing some video before/at/after cut. If audio plays, it should be fine in new video.
If there are still audio issues now: this could be by channel increase/decrease in AC3.
I hardly run in to audio issues processing this way.

fkuebler

Quote from: Jan Gruuthuse on May 28, 2013, 08:01:02 AM
Make sure you load and append video and parts manually.
With same output format and copy for both video/audio create new video. (re-encode afterwards if needed)
Only mark cutting point [A ] and [ B] with up/down arrow keyboard keys: not with left/right key
1st Trim in front of video: Don't use marker [A ], goto begin where new video should start, select [ B] with only up/down key. Cut this block with [Ctrl][X]
...
I hardly run in to audio issues processing this way.

I suppose with your procedure you want to say, that one should use only I-Frames for any cutting. But I did do so in my example, and I just repeated it, only cutting the leading 10 seconds from the beginning of the mkv. The result was some very slight audio stuttering, and after 20 minutes a stop of any (audible) audio at all, played with VLC 2.06.

The original mkv contains 2 audio tracks of type DTS, each with 1.5Mbps. In the resulting mkv only the 1st track is distorted as described, unfortunately the German one, which I need. The 2nd track is undistorted.

The MediaInfo doesn't reveal any problems, but keeps telling both audio tracks have the full length and the same size as in the original mkv.

Dealing with media files and media software is not for the faint of heart... <sigh>

mean

Can you share a sample ?
Do you know if anything changes in the track ?

fkuebler

Quote from: mean on May 28, 2013, 10:48:47 AM
Do you know if anything changes in the track ?

AFAIK not.

In my layman's mind the early stuttering might be some sign of something overflowing, which eventually leads to the "disappearing" of the audio playback after 20 minutes. Although an the other side I cannot really explain an "overflow", because the Avidemux parameter for audio is "copy".

Maybe the following additional observations lead to some ideas:
1. when I do not edit the original mkv, but let it be directly encoded with the newest handbrake 0.9.9 (and let the 1.5 Mbps DTS be encode into 640kbps via AC3(ffmpeg)), then I get also some very slight audio stutterings about every minute or so. But with the handbrake encoding, the audio does not stop from some point on, but continues until the end of the video.
2. by chance I found a post, where the handbrake people in 2008 (!) acknowledged some sort of overflow possibility caused by some handbrake-internal loop possibility: https://forum.handbrake.fr/viewtopic.php?f=6&t=6004&p=34109&hilit=audio+stutter#p34316
3. when I convert the original mkv via Remux 1.2, passing through the video and a subtitle track, and converting the German DTS track via the remux-internal encode to AC3 640kbps, then the resulting mkv plays fine without audio stuttering. I assume that the following handbrake step will also work, because the AC3 is passed through.

QuoteCan you share a sample ?

I would love to do anything which supports debugging. Unfortunately:
a) I am a reasonably experienced computer guy, but
b) I don't have deep experience with the art of media packaging and containers
c) everything is so awfully big: The file in question is a 1080p-mkv copy of "3 Burials of Melquiades Estrada" with app. 12 GByte
d) cutting obviously influences the characteristics (sort of an Heisenbergian problem :-)

I've got a dropbox, so I could upload something, even some GBs, but unfortunately not the whole (original or Avidemux-generated) file.

So please tell me: what can I do useful? Avidemux for me is sure worth some effort.