Audio Video Sync issues v20.02.17

I interpret this as saying the “sync offset” is getting greater over time. As in, a simple one-second offset at the beginning wouldn’t fix it because the offset becomes 2 seconds and then probably longer as the clip goes on. Is that what you’re noticing? Because if the amount of sync-drift is not a fixed amount, that kinda implies the audio is sped up or slowed down in order to make the drift get worse. Do you notice a pitch shift in the exported audio compared to the original audio, or in comparison to the GoPro audio (if they recorded the same thing)? As in, do voices sound lower and deeper compared to the original? Do any of your clips have speed or pitch alterations applied on the clips’ Properties panel, for slow-motion work for example?

Your assumptions are correct. But remember I did complete 4 videos today without issue as long as I offset the audio by 6 frames on every project. So the absolute part is that there is a work around, but what is causing myself and the other two users to have to use it is all the question. I want to get to the bottom of it as I plan on using shotcut a lot. All the audio .wav or .ogg has these affects applied to them in Audacity. First is the de-noise effect. Then there is the EQ effect applied to remove the bass out of my voice and then lastly the normalize effect reducing by 10 db. Let me try from a baseline of nothing done to the audio or video just to start eliminating variables and then I will do one thing at a time to see what if any has an affect on the outcome. The audio recordings were done with a Windows 10 machine. All the editing is being done on my linux machine.

That error code is FFmpeg saying “unexpected end of file”. I assume the batteries didn’t run out while the GoPro was recording? Also, that error can mask an underlying error of “specified stream not found”, such as a Handbrake conversion where stream IDs were not preserved.

This error is pointing to a corrupt source file. Did this error happen with the original files or with the Handbrake conversions?

Let’s see if I’m tracking this right…
If the audio is offset by 6 frames, it stays in sync the entire time.
But if the audio is not offset, it can drift by over two seconds?
That’s a head-scratcher, because the audio would need to play back at different speeds for that to happen.

Thanks Austin for your diligence. The batteries were charged in between shooting and never once did the camera die unexpectedly. These log files are with the original source file from the go-pro. I will re-export my long video project that has the 6 frames offset, and get that log file. That one is using the handbrake material. SO, my next question is for future: Is there a recommended camera as I don’t like the go-pro quality anyway, that is hobbyist grade and is one that can take a balanced microphone input, We are looking for future as to use something better. $1500 price range.

Also something I have noticed is that the audio duration is longer than the video duration value even though on the timeline they are both starting at 0 and then end of the two files are trimmed at the exact same spot so they cut off together. is there something I am not resetting after trimming and aligning?? Maybe it is the frame rates being used and there is a rounding issue by the end.

Do not worry about this error. It is not in the source file decoder. It is in the encoder when using PCM for audio and at the end of the file. There is a technical detail that I will spare you.

I tried to reproduce this by working with a 30 minute video with lots of talking head dialog. I extracted audio to WAV in both 48 and 44.1 Khz to test each. Then, I put the video on the timeline, muted it, and added the audio to an audio track and exported as ProRes 4:2:2.

There are some other bug reports claiming the audio in Shotcut preview is delayed by a few hundred milliseconds. I have not seen that either, but it is system dependent. If you have this problem and use preview to sync a distinct audio with a video, then it is going to cause a problem with a constant offset throughout.

I’m running low on ideas, but one other comes to mind… How are you viewing the exported video? Using VLC? If so, what happens if you export the project without offsets using the YouTube preset and view it with any media player besides VLC? Or what if you bring a ProRes export into the Shotcut preview window and play it back there? I have experienced VLC lose audio sync on perfectly good files because of playback problems specific to that program, so there could be a chance your exports are fine if viewed in another player.

There are several great options. The setup I personally use is a Panasonic G85 ($700) which gets you fantastic 4K with unlimited record time. (Most DSLR/mirrorless options are capped at 30 minutes.) Pair it with a Beachtek DXA-Micro-Pro audio adapter ($140) which accepts two 3.5mm plugs (from wireless mic receivers or a hot shoe mic) or one XLR mic. It outputs a 3.5mm signal that can plug into any camera’s 3.5mm mic input port. This would leave a lot of money left over for lenses, since it looks like your video is indoors where it’s dark and a fast prime lens may be needed for good video quality. There are other audio adapters similar to the Beachtek if you need two or more XLR inputs, like the Zoom F6 ($650).

Those durations refer to the base media file, not the individual clips snipped from it.

@Camzl1 Any chance you have an external sound card or audio interface?

Solution: Go by your Markers and wave form alignments and not preview to sync audio.

You guys aren’t going to believe this. Dan nailed it. I am using the preview to sync my audio to video even though I have markers in the audio file and which collates with the cameras audio. The part you aren’t going to believe is that it takes exactly 6 frames advancement of my audio to line up the markers and waveform. There must be some similarity somewhere in the first post I pointed to though. I wasn’t looking at the wave-forms as I thought preview sync would collate into the real thing. How that is consistent between each project squarely lands on the hardware as Dan has stated. So I determined this by aligning the markers and wave forms on each project. This puts the preview audio out sync. Then I measured the space I moved on each project and there it was 6 frames on every one, but, again the wave forms align up. So it’s a preview problem, but now it’s been explained and I will continue on. I will test this on my new projects coming up and keep you posted. Thanks Dan. Thanks Austin for the tips below.

Again if there is a setting in Shotcut that I need to use that you may recommend, that may in the future possibly allow the preview audio to sync up as I align to the waveform, then just point me in the right direction. I believe as Dan has stated and it is system dependent. The same thing was happening in kdenlive and is why i jumped ship. I like Shotcut better but now it all makes sense.

I will mark this as Solved as Solution

Thanks for the follow-up! Very interesting.

Thank you for the feedback.
Yes, audio cards/interfaces add extra latency which varies from card to card.

In final mix we use the Pro Fire 610 and Pro Tools, however Pro Tools has a setting to compensate for this.

@shotcut
Any chance of getting something similar in SC?
Perhaps in the set-up menu, an option to allow the user to add or subtract an offset in milliseconds to compensate?

Yes, I am thinking about how to do it. Typically, I am using audio output though HDMI or whatever is built into my MacBooks.

Thank you for looking at the AV sync issue, it will be really great to have this.

Hi,

I have been having similar issues and am feeling slightly out of my depth (novice in terms of video editing tbh). I see you talking about markers. How do I insert markers? I haven’t been able to find anything on the forums about how to do it.

Thank you in advance!

I added something here (Settings > (Player) Synchronization…) to add/adjust a video delay for the next version 20.06. You can adjust it while something is playing - preferably something known good. We also have in Open Other something called “Blip Flash,” which is a synthesized a/v sync test pattern. You might also find an improved synchronization in preview by default in the next version since I had to tweak the timing system in the process.

Markers are what we refer to as a reference point in the audio such as a loud clap followed by silence. You can do these as often as you want but, the more you do the more you have to split, and then remove them when editing. Same thing in video shooting with the marker boards and why they had that swing arm to smack and create that “Pop” sound so you get a spike on the wave form to visualize your reference point. They are called clapper boards, but I hate that term and call them mark in boards.

Can you explain this further? Because I don’t understand syncing to “something known good”. I’m understanding “known good” as it being synced so if something is already playing in sync why would it need adjusted?

Are there any instructions on how to use “Blip Flash” in Shotcut in order to fix a/v sync issues?

This thread is about a/v synchronization of the playback system because audio and video typically take separate routes out through the computer system (unlike a Blackmagic Design SDI/HDMI peripheral). You even reported about this before. This is not about correcting sync problems in a media asset; that is already in Properties. “Known good” means using a media source with audio and video that are trusted to be in synchronization. That could be a specific test sequence or perhaps something with good talking head dialog. I would include in “trusted” something that does not use temporal compression or suffer codec delay.

Are there any instructions on how to use “Blip Flash” in Shotcut in order to fix a/v sync issues?

No, they are not even released! But basically, Open Other > Blip Flash > OK. Then, watch and listen. Next, if needed, choose Settings > Synchronization… and adjust using the slider or spinbox to make the blip and the flash best coincide.

1 Like

You misunderstood me. :slightly_smiling_face: I know what the thread is about because as you said I had reported on it before. But the a/v sync issues that I have experienced don’t happen with every file. It only happens on some files and those are not sync issues that are inherent in the file because they are not out of sync played outside of Shotcut.

So when I asked about “something known good” that’s what I meant: A file that is having a/v sync issues only in Shotcut not files that have inherent sync issues.

No fixes for that. You can use properties sync to compensate for that.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.