1

When I use the new and convenient trimming option for video files from Finder in macOS Mojave, the changes I made do show in QuickLook, QuickTime and iMovie, but VLC, for example, still plays the old version with the part I wanted to be removed. It makes no difference, whether I replace the existing file or create a new one. Once I also had the case where first milliseconds weren't cut, but the next few ones where?! I just need to remove a very short portion at the beginning of the clip, maybe that's too short? I really don't know. Maybe it has something to do with file versions and different applications using differenct versions of the file? I should add the files are all stored on an external HDD in a NAS.

  • 1
    I bet if you remove from the END, rather than the beginning, it will work! This is what happens in QuickTime, and has to do with the fact that it's not technically possible to cut from the beginning of an h264 video without re-encoding at least part of it. – Wowfunhappy Oct 23 '18 at 13:53
  • If it's not technically possible, why is QuickTime able to show the clip without the part I want removed? I just don't get it. Also: if I cut a few seconds from the beginning and not just a few milliseconds, it also works in VLC. So it seems after a certain amount of seconds or frames, it does work, even in VLC. – Kreiselblitz Oct 23 '18 at 14:01
  • 1
    Let me rephrase: It is possible to cut the beginning of a video, but not at an exact time point. Apple cuts out as much of the video as it can, and then tells Apple players (eg QuickTime, iMovie) to jump ahead to the exact start time you selected. VLC skips only the part that's truly gone. – Wowfunhappy Oct 23 '18 at 14:11
1

Expanding from comments I left earlier this morning. While I don't know Apple's exact process, here is what I surmise is going on:

Apple does not want to have to re-encode (recompress) your video. Doing so would take a considerable amount of time, use a considerable amount of CPU, and decrease the overall video quality of your file.

So how can you cut out part of a video without re-encoding it? If videos were a series of discrete frames, this would be easy—just delete the frames you don't want, and don't touch the frames you do want.

However, modern video codecs are more complex than this. Individual frames are not discrete—they use information from previous frames in order to save space. To put it another way, in most cases, only the difference between each frame is stored.

This isn't a problem if you need to cut off the end of a video, and in fact, you'll notice that in this scenario, macOS will do as you expect—create a shorter video that ends at the exact time you specified, in all video players. But what happens if you cut off the beginning? The start frame you selected can't stand on its own; it requires the information from previous frames in order to work. You'll be left with a garbled mess, if anything displays at all.

So instead, Apple cheats. They cut out as much of the video as they can, leave however many frames are necessary for the first frame you selected to display correctly, and then tell Apple players (eg QuickTime, iMovie) to jump ahead to your desired starting frame. While this appears to work correctly in Apple programs, VLC will skip only the parts that are truly gone.

  • Does that also explain why the video will play fine in VLC, if I cut enough from the beginning, including the start frame? In that case the parts seem to be truly gone. But as I said, only if I cut a larger amount than just a few frames. I understand the rest now completely. It's just this one part. – Kreiselblitz Oct 23 '18 at 16:11
  • 1
    Yeah, if you cut off enough from the beginning the macOS can actually remove those frames from the file. There are certain frames designated in h264 which are legitimately discrete. – Wowfunhappy Oct 23 '18 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .