Quicktime loses audio sync then saving

This has gone on for a long time. I may load a YouTube video I downloaded and use QT to edit it. This usually involves a LOT of stuff being cut out. I've never counted how many times I split the clip to do this, but when I play the result in QT but haven't saved it yet, it seems fine. But when I save the file, the further I go through the video, the more the audio is out of sync (audio preceding the video). It seems as if the more cuts, in between, the worse it gets.


I've tried saving as HEVC and .264 using "export" and also just clicking "save". I've also tried sending the file in email. But no matter what I do, it still won't play back properly. I've tried it just hitting space to have it play, loading it into QT, VLC, and MK something or other.


I've seen people talk about sync issues before, but the situations they describe don't seem to match my situation.


Oh, I believe in the past I've also tried just putting the original YouTube file into iMovie and making cuts there, but it still got out of sync as I made many cuts. At least that's what I recall.


I'd try cutting it up in a different app if that would help, but I have no idea that to try. I certainly don't want to have to pay for an app for such a basic capability!

Mac Studio, macOS 14.4

Posted on Apr 30, 2024 2:16 AM

Reply
Question marked as Best reply

Posted on Apr 30, 2024 10:29 PM

You can convert to ProRes with ffmpeg or Final Cut Pro. ProRes is a (almost) lossless editing format unlike H.264 etc which are delivery formats not very well suited for editing. Convert .mp4 to ProRes 422 HQ (ProRes 422 HQ, timecode, PCM little endian):


ffmpeg -i input.mp4 -c:v prores_ks -profile:v 3 -timecode 00:00:00:00 -c:a pcm_s16le output.mov


I use yt-dlp via the Terminal to download YouTube and then often ffmpeg to convert wrappers (.mkv, .webm) and codecs (VP9, opus) to QuickTime compatible formats (.mp4, H.265).

14 replies
Question marked as Best reply

Apr 30, 2024 10:29 PM in response to dbk9999

You can convert to ProRes with ffmpeg or Final Cut Pro. ProRes is a (almost) lossless editing format unlike H.264 etc which are delivery formats not very well suited for editing. Convert .mp4 to ProRes 422 HQ (ProRes 422 HQ, timecode, PCM little endian):


ffmpeg -i input.mp4 -c:v prores_ks -profile:v 3 -timecode 00:00:00:00 -c:a pcm_s16le output.mov


I use yt-dlp via the Terminal to download YouTube and then often ffmpeg to convert wrappers (.mkv, .webm) and codecs (VP9, opus) to QuickTime compatible formats (.mp4, H.265).

Apr 30, 2024 11:31 PM in response to dbk9999

I just tried it: converted a H264.mp4 to ProRes.mov with ffmpeg, opened and trimmed it with macOS 14 QuickTime Player and saved either as ProRes.mov or exported as compressed HEVC.mov.


Delivery formats like H.264 can only edited to the "GOP or Group Of Pictures" i.e. to the I-frames (a.k.a. key frames) which might explain sync problems if there are many cuts. On the other hand, editing ProRes is frame accurate because every frame is independent and does not rely on referenced I-frames. I-frames are usually 1-2 seconds apart but sometimes the GOP is several seconds more than that. Some apps like Avidemux can reveal those IPB frames allowing one to see where the actual trim point and I-frame is and cut to the GOP. When edited with QuickTime Player the cut BP frames outside I-frame trim boundaries are usually hidden so the user might get a false impression that the cuts are frame accurate (some apps re-encode those BP frames so the edit is frame accurate but with some lossy re-encoding for those frames).

May 1, 2024 12:33 AM in response to dbk9999

> to ProRez, you were able to edit in QT and after saving, the audio still works?


Yes. Editing in QT Player is somewhat limited because it can only trim from the ends. Avidemux can also cut from the middle of the movie and it is quite handy after some practice. It can also edit ProRes and either save it as ProRes and PCM audio (copy) as .mov or as HEVC and AAC audio as .mp4 (select the desired codecs and wrappers). I usually do just a few edits (to the GOP with "Go to previous/next keyframe" followed by A/B cutpoints) to the original lossy codec (H.264, VP9 etc) with Avidemux. But for frame accurate multiple cuts editing ProRes should be better.


I have tried Shotcut but like Avidemux better. AFAIR they both use ffmpeg under the hood.


p.s. ProRes files are quite large. The example above outputs 422 HQ which might be "too good" for most input while 422 Proxy is much smaller with essentially the same quality for most input:


ProRes -profile approximate bit-rates for 1920×1080:

(-1: Autoselected HQ profile to keep best quality, auto prores_ks only, seems to default to 3)

0: 422 Proxy ≈ 45Mbps YUV 4:2:2

1: 422 LT ≈ 102Mbps YUV 4:2:2

2: 422 ≈ 147Mbps YUV 4:2:2

3: 422 HQ ≈ 220Mbps YUV 4:2:2

4: 4444 ≈ 330Mbps YUVA 4:4:4:4

5: 4444 XQ ≈ 500Mbps YUVA 4:4:4:4

May 1, 2024 3:53 AM in response to dbk9999

> desktop ... cloud icon next to it with an exclamation point ... iCloud. It's 138 GB


If you use iCloud Drive with its "Desktop & Documents" option, then files in those locations are synced to the cloud. And 138 GB is a lot to upload there. So it is better and faster to use some other folder in your home folder for that.


> QT and just started making lots of cuts


Could you easily do that many cuts with QT Player? I have used QT Player to losslessly trim long drone movies from the start and from the end before archiving them. Did you manage to do cuts in the middle of the movie with QT Player?

May 1, 2024 9:19 PM in response to dbk9999

> "Split Clip"


Doh, thanks for reminding of that. Nowadays I use Avidemux to do lossless edits to such movies because it allows me to cut to the GOP (also QT Player would do a nice job, but it leaves some hidden BP frame "tails" to the movie. But that is only me).


If I have to do any more editing (or slow/fast motion), I use Final Cut Pro although it is then lossy. FCP can detach audio so if the audio sync still plagues the movie it can be nudged to the sync. I do not know if iMovie can do that.

Apr 30, 2024 11:52 PM in response to Matti Haveri

Now that's very interesting (the keyframe idea) and one I never heard mentioned elsewhere! I sometimes do a LOT of cuts. Like taking a video over 3 hours and cut it down to 20 minutes where the clips may only last 5-15 seconds each!


I'm not familiar with all this terminology so let me present scenarios for better clarity:


  1. After converting the file to ProRez, you were able to edit in QT and after saving, the audio still works? If so, it may depend on how many cuts before a problem becomes obvious, but if it worked for you, then I can test for more extreme cases.
  2. As for Avidemux, I did look that up too and the editing seems fairly user friendly, but I'm not clear on whether I can just use that on a .mov file or would I first have to convert to ProRes? Would it properly handle a file without previously converting to prores, or would that still be a necessary step?


Related, I have sometimes thought about just switching from iMovie to Shotcut. I think there is a free version. Are you familiar with that and, if so, is there a better chance the audio would stay synced even without converting to ProRes first?


May 1, 2024 1:05 PM in response to Matti Haveri

This morning the "error" was still there though last night I did another copy with a new name. It doesn't give an error, but the cloud symbol (without the exclamation point) is on that one. Don't know what to make of that. But normally I don't need to have the file in the cloud. I'd only need it while I'm editing it to avoid that audio sync issue.


As for editing in QT, I can make cuts anyplace I want and remove sections from start, end, or middle. I don't know if I do it the best way, but I only use one method:


  1. Play the video in QT till I find the place I want to start.
  2. Select "Split Clip" and then click the area before the split and hit the delete key. Then press return or click "done" to get back to the normal player view.
  3. Play more until I hit a section I will be cutting out.
  4. Split the clip again but then just press return to get back to normal player view.
  5. Play more until I get to the next part I want to keep.
  6. Split the clip and select the area right before the the last split (iow, the whole section I don't want) and press delete again, then return to player mode.


At this point I've removed the intro as well as one section in the middle. I just continue this process until I've gone through the whole video, removing all the parts I don't want.


I think it is important to be pretty methodical about it - that is, don't go backwards to delete something you changed your mind about. If you are making lots of cuts like I do, when in editing the places you "split the clip", you'll have a lot of these separate clips and easy to lose track of what each one is! So I'm always working from start to end. I might do some minor cuts when in iMovie creating my reaction to the video.


There may be things I don't know. Mostly I just figure out a way to do something but may not be the best way.

Apr 30, 2024 6:50 PM in response to Matti Haveri

Maybe I'm missing something, but I don't see anything about a ProRes option in QuickTime. Can you clarify?


I use Downie 4 to get videos from YouTube and that app then uses Permute 3 (from the same company) to create a .mov file. I have found that minimizes some other problems I had when I was using Downie 4 to use it's own conversion method to create a mp4 file (.264). Before switching to Permute to convert, I'd often get a LOT of spinning wheels when even making tiny changes in iMovie, like just adding a title text to a video!).

Apr 30, 2024 10:44 PM in response to Matti Haveri

Don't have FCP (I'm totally an amateur). Don't have ffmpeg either, but I'll look into it next time I'm doing a lot of this editing. Much of what you describe in Greek to me, but let's see if I can simplify it.


Since there is no problem until I start editing the file AND save it, I assume I can still download from YouTube using Downie 4, ending up with a .mov file.


So do I then load it into ffmpeg to edit out the stuff I don't want and then save from there? QT is the only app I've ever used for actual editing so I don't know about other options. Oh, I also edit within iMovie.


I just did some quick searching for info on ffmpeg. Seems to be more awkward to use than that I do with QT and iMovie though. I need something that lets me split clips as I go and delete sections I don't want but, of course, without the sync problems I'm running into!

May 1, 2024 1:01 AM in response to Matti Haveri

Found this from 2017:


> You can convert to ProRes using the Finder. Select the files, right-click and use use Services>Encode Video Files.


I'm presently trying this conversion process. It took just a few minutes to convert a 713 MB .mov file to a 22.4 GB .mov file as a ProRes 422 version.


So IF the key is to use QT on a ProRes version, this may be a simple solution - unless I see a problem with it.


Of course, I'll still need to do it with a file that I then do heavy editing in QT to see if the sync still works!


One step at a time! :)

May 1, 2024 3:12 AM in response to Matti Haveri

First big test and perhaps solves my problem!


I did use the Apple option to convert to ProRes on a video that is 140 minutes long. Then done and looking at it on my desktop, instead of showing the time length of the video, it said "Error". However, using the space bar to open it, it played just fine as I skipped around. Looking closer at the file, it has a cloud icon next to it with an exclamation point. So maybe the "error" means it wouldn't upload to iCloud. It's 138 GB. If it shows the error tomorrow, I may try copying it and pasting it on the desktop again and see if it uploads. Fortunately, I really don't need it to for my purposes.


So I went ahead and loaded it into QT and just started making lots of cuts, getting it down to about 32 minutes. I then Exported it twice. Once as H.264 and once as HEVC. Tried each after pressing the space bar and spot checked from beginning to end. Both seemed to work just fine. I had a total of 32 segments that were saved. Seems to me that should be enough.


I'll certainly be checking more when doing future videos, but this is the most helpful sign I've had and may have completely solved my problem!


Thanks a lot for all the help. I sure never would have thought ProRes might solve the problem!


May 2, 2024 2:38 AM in response to Matti Haveri

Yes, iMovie can detach the audio and I've spend many hours doing that because of the sync issue!


I'm considering Avidemux as well as Shotcut. Just kinda leery about trying brand new things, but another problem I've had with iMovie is then I look back at some old projects, some images and clips I've added in will be missing! Even when actively working on a project, I have sometimes saved an image to the desktop, then drag it into iMovie. Since I don't want my desktop cluttered up, I periodically would either move those images to a folder or just delete them.


But sometimes they would also disappear from the project! But not always. Makes no sense to me. It seems that, once dragged into a project, it should always be there. So that's one reason I'm considering Shotcut, but presently have no idea if it does the things I can do on iMovie. Someone just recommended it to me.



Quicktime loses audio sync then saving

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.