Removing segments from video - loss of audio/image synchronization

Started by Mariano, March 10, 2022, 09:07:33 PM

Previous topic - Next topic

Mariano

Hi all,

Today is my first day in this forum.
I've been using Avidemux for quite awhile but I must be missing something: Any time I want to remove a sector from a video, using the A and B markers and then selecting "Delete" or even "Cut", it does it beautifully but only with the image; so when I save the work, there is no synchronization between image and audio.

Does it happen to anyone else? Am I missing something with the settings?

Your help will be most appreciated.

eumagga0x2a

Quote from: Mariano on March 10, 2022, 09:07:33 PMI've been using Avidemux for quite awhile

Which version? Nothing older than 2.8.0 is supported, reported issues should be verified against the most recent 2.8.1 nightly build. If you use an older version: please update it.

Quote from: Mariano on March 10, 2022, 09:07:33 PMAny time I want to remove a sector from a video, using the A and B markers and then selecting "Delete" or even "Cut", it does it beautifully but only with the image; so when I save the work, there is no synchronization between image and audio.

This is the expected behaviour when using an external audio track. Such an audio track must be muxed into the video (which turns the former into an internal audio track) prior to performing any editing steps.

If you observe such an issue with an internal audio track, please provide first of all the textual output of MediaInfo for the file which exhibits such a problem.

Mariano

I am using now version 2.8.0. Same problem that I had with previous versions.

"This is the expected behavior when using an external audio track. Such an audio track must be muxed into the video (which turns the former into an internal audio track) prior to performing any editing steps."

I think that's the reason, eumagga0x2a. Thanks a lot, I will try that.

Thanks again.

Mariano

Unfortunately, I still have the same problem with Avidemux. I tried with several videos, including some that I downloaded from YouTube. When I cut off the beginning, for instance, the image/sound syncronization is messed up, which is more obvious when there is someone talking on the screen and the lips don't move according the the words the subject is saying.

What could be the problem?

eumagga0x2a

Quote from: Mariano on March 11, 2022, 12:19:11 AMI am using now version 2.8.0

When reporting issues, it makes much more sense to skip to the latest available nightly build because all testing on my part and all potential fixes target only the current git master, not the last release, obviously.

Quote from: Mariano on March 16, 2022, 05:11:47 PMUnfortunately, I still have the same problem with Avidemux.

Please provide a sample video (preferably short) via WeTransfer, Mega, Dropbox or Google Drive along with exact steps how to reproduce the problem you experience.

Mariano

"...all potential fixes target only the current git master, not the last release, obviously."

It's good to know, eumagga0x2a, it makes sense. I just uninstalled Avidemux, including previous version, and reinstalled it. So I tried again this morning with the very latest nightly build, and I will do so from now on.

Then I tried again Avidemux with 3 different videos, one from YouTube and two screen captures that I had made myself, both in high definition (13 GB, 48 minutes and 29 GB, 1 hour 43 minutes, respectively). In all 3 cases (mp4 format) I edited out the announcements and commercials at the beginning (using markers A and B, delete and save, as I did before). For the first time, the synchronization went perfect!

I don't know what to say but it seems to me that the problem was caused by a previous version of Avidemux  in the background, despite the fact that I was using the newest version.

Now that the problem seems to be gone, would removing sections of a video show lack of synchronization if I do the same not at the beginning and at the end of the video but with segments in between?


eumagga0x2a

Quote from: Mariano on March 17, 2022, 05:02:32 PMIn all 3 cases (mp4 format) I edited out the announcements and commercials at the beginning (using markers A and B, delete and save, as I did before). For

To skip a part of video at the start, you don't need to use the delete operation. Just place the A marker where you want to start the output (of course, the usual requirement to start a segment at a keyframe when in copy mode applies).

Quote from: Mariano on March 17, 2022, 05:02:32 PMI don't know what to say but it seems to me that the problem was caused by a previous version of Avidemux  in the background

If you mean by background "running simultaneously", then you just learned the hard way to never execute multiple instances of Avidemux concurrently.

In general, having multiple versions of Avidemux installed in a separate directory each is absolutely fine (except of good chances to mess up the configuration when running an older version after a newer one, unless each one is run as a portable app = the configuration is stored in the respective program directory, which implies write permissions there). Just never, never run them at the same time.

Quote from: Mariano on March 17, 2022, 05:02:32 PMNow that the problem seems to be gone, would removing sections of a video show lack of synchronization if I do the same not at the beginning and at the end of the video but with segments in between?

A/V sync should not be affected, but you might need to re-encode the video stream as modern open-GOP H.264 and HEVC streams usually don't allow clean deletions in the middle of the video. Avidemux tries to detect cases of especially bad combinations of start/end points, but even when no warning is shown, some damage may be visible when in copy mode.

Mariano

Thanks, eumagga0x2a, for all your help. You clarified a lot of issues for me.