Audio lag in exported video


After adding an audio track and exporting as mp4 video, the audio track lags by about 3/10ths of a second. It is perfectly synchronized in the timeline. Something is wrong with the export process. This happens on all my videos.


Have you tried exporting at 30FPS? 23.976 isn’t something a lot of older systems can properly display.


Thanks for the suggestion.
I don’t have an older system - I have a new 4K TV. It displays 23.976 just fine, as does my PC.
But with both the TV and the PC, videos exported as mp4 from Shotcut have an audio lag as described. (This does not happen with videos exported from Avidemux, so it’s not the system.)


This might be a dumb question but is the source Fixed Frame Rate Video - Shotcut won’t support Variable Frame Rate without conversion to Fixed frame rate first. Variable frame rate video includes things like Shadowplay.


Thanks for the suggestion,
My procedure is:
–shoot video with panasonic camera (various models) at 1080/60p
–process color, contrast, etc., remove native audio - using Avidemux. (Default is Constant rate factor and I don’t change it.)
–save as mp4 at 1080/23.976p (some clips slow motion, others resampled at full speed)
–combine various clips and still images using Shotcut
–add audio track
–export as mp4 at 1080/23.976
So if “constant” is equivalent to “fixed” then that is not the issue.
Avidemux encoding options are Constant Rate, Constant Bitrate, Constant Quantiser, Average Bitrate.
Would any of these solve the problem?


So my dumb question here, why are you using avidemux to do this
–process color, contrast, etc., remove native audio - using Avidemux. (Default is Constant rate factor and I don’t change it.)
instead of doing that in shotcut and removing a re encode step? my hunch(without having your source files to test) is that’s the step that’s causing the problem when shotcut can remove native audio and add new audio in one step as well as adjust your clip speeds/color/contrast


I was using Avidemux because it is much easier to get the correct color, brightness, WB, etc. Although with the recent addition of more precise controls to Shotcut that may not be a factor anymore.
Also I use Avidemux because I am changing speed of video and Shotcut is not well suited to that (as per Shotcut developer).


Could we possibly see a small piece of your video source before any processing is done.

To do this would mean loading it into avidemux going to a point in the video and selecting trim from here to start to select where you want to begin playing. Move to the end of the section you wish to upload trim it to the end and then export it with all modes showing COPY that will give us a small unaltered section of source video to check. Also model numbers of a couple of your cameras wouldn’t hurt, I’m trying to cover every possible angle here.


(Sorry about the huge dark font. I have no idea where this came from or how to change it.)
Can’t upload it. I get this message:
"Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, ico, tiff, tif, zip, pdf, txt, mlt, edl, rpt, log). "
I saved it in Copy mode but the original is MTS (AVCHD) and Avidemux can’t output that. So I used mp4 muxer and generated mp4. Speed of save (under 5 seconds for a 9sec video) indicates that no re-encoding was done.
Cameras are, variously, ZS50, FZ300, GX85, GX7, GX8. Unfortunately the Panny video does not include EXIF data so specific camera (and settings) are not available.
This is all the data I get:


Codec 4CC: H264
Image Size: 1920 x 1080
Aspect Ratio: 1:1 (1:1)
Frame Rate: 59.940 fps
Total Duration: 00:00:09.034

Extra Video Properties

ExtraDataSize: 00


Codec: AC3
Channels: Stereo
Bitrate: 24000 Bps / 192 kbps
Frequency: 48000 Hz
Total Duration: 00:00:08.400