I am not sure whether this is a bug or some behavuiour I don’t understand, but I have the problem that shotcut is modifying the length of video and audio slightly when I import a file.
So I demux a video file, do some audio editing (not in length) and mux (and cut etc.) the files again with shotcut. But everytime I have a small delay in audio an video (about 20-40ms), which have to correct manually. On investigating where this problem comes from, I had a look at the video and audio length and noticed that they differ between the original file and what shotcut shows me.
So here is an example without demuxing and muxing to exclude the risk that something is messed up during demuxing or muxing: I have a video file and I get the length with ffprobe.exe, it is 0:27:08.75. When I import the file in shotcut it shows in the playlist window: 0:27:08:45…
The ffmprobe command I used were:
ffprobe.exe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal 20180909_213616.MOV
or
ffprobe.exe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal 20180909_213616.MOV
according to http://trac.ffmpeg.org/wiki/FFprobeTips
The ffprobe time output is in HH:MM:SS where the last field is seconds. Shotcut is HH:MM:SS:FF where the last field is frames. I am sure they are the same based on the frame rate. Shotcut uses FFmpeg and computes the length using FFmpeg in the same manner. If you really doubt me, you can look at the code yourself:
Ah sorry, I didn’t notice your question, but I can answer this now.
I am recording videos of computer games and there are scenes where you see visuals accompanied strict with sounds e.g. clicking through menues etc. And there I can see that the action stopps but the sound is coming later for that action… And then I have to move the video track about 10 frames forward to get it in sync again.
I have still not found a solution to this problem, but I still have the feeling shotcut is somehow involved in it. When I import the original file in shotcut I can see the sound is a little bit delayed. When I just play the file with VLC player the sound is ok. I downloaded also a trial version of Vegas Movie Studio and there it is also ok. If you want I can send you a demo file, but I have to cut something and see if the problem still occurs on a cut video, because I don’t want to upload 8GB.
What is the source file(s) specifications?
What is your Video Mode set at? (Settings/Video Mode)
Is GPU Effects (experimental) turned on? Make sure this is off.
If you record video games, are you converting them to a constant frame rate first before working on them in Shotcut? When I record gameplay, I use Handbreak to convert to a constant 60 FPS, otherwise I had out-off-sync issues too. Though Shotcut should complain if you drop variable frame rate videos into it.
Not sure what you record with, but why not just record at 60FPS?
I’ve been recording at 60FPS for a year with OBS (MP4 video)
(Image is from OBS)
I’ve had audio sync issues before, but it wasn’t Shotcut. My weird theory is when NVIDIA updates, it doesn’t play well with Realtek audio drivers. Twice I’ve had to uninstall and reinstall my audio drivers to correct the issue. The source files had the sync issues. Took me two months to solve this issue. Just Google “video desync”, and you’ll see hundreds if not thousands of forum posts in every software dealing with video.
I record with the Geforce Experience overlay. It has an option to record at either 30 or 60 FPS, but these files are still variable frame rate. That’s even the case if my hardware is powerful enough to actually run the game at a constant 60 FPS (in some games I’m getting more like 40 in-game). I might try out OBS if that saves the conversion step, thank you
OBS is far superior to recording options than Geforce Experience. There is a ton of settings you can set for the best recording. I do suggest looking at “EposVox” on YouTube for his master course on OBS for learning how the settings work. And run test after test until you have it the way you want it. It took me about 5 test trials before I found what I was happy with.
The UI for OBS isn’t exactly pretty, but it’s one very powerful piece of software, and it’s also FOSS (Free Open Source Software). I haven’t even explored all of what OBS can do.
The next version has an A/V sync fix for some files, particularly ones from capture sources, and that might resolve this audio delay problem you are experiencing it. Try with v18.11 coming soon.