3

I have a GoPro4 video, came out in mp4. If I try and trim in GoPro studio, not only have to jump through hoops but I then have to export - choose an encoding etc...itsends up being a .mov file (i assume for further editing) but is larger than the original, even after being trimmed. If I compress I lose quality !!

Now if I use quicktime trim feature - it really does seem to trim it and leave it I'm its exact same format.

How is quicktime doing this? Why doesn't GoPro studio, nor iMovie, Nor Final CutPro X seem to be able to do a simple trim ???

1 Answer 1

5

Cutting a video at a keyframe, without the slow and lossy process of decoding and re-encoding it, is only possible in the special case where you aren't applying any effects, overlays, rescaling, or anything. And where you're happy with bitrate and decoder requirements of the input. (e.g. h.264 High Profile, Level 4.0)

Perhaps fancier editting software thinks it's beneath them to detect that special case, and copy a subsection of the h.264 video and AAC audio bitstreams to a different file? (in either the same or a different container format. e.g. you could remux to mkv, or m2ts.) Or maybe you just need to look in a menu somewhere to activate that special case.

Using ffmpeg, you can do what I think you're saying Quicktime's trim is doing:

ffmpeg -ss start_offset_seconds -t length_seconds -i input.mp4  -shortest -codec copy -movflags faststart trimmed.mp4

That runs about as fast as your hard drive can copy, since it's not re-encoding the video. (codec = copy, not libx264).

To more directly answer your "how is it doing this?", google up remuxing. "mux" (short for multiplex) is the term for putting multiple streams into a single output stream/file. (1 video + 1 audio + 0 subtitles is the usual case.)

1
  • I see. Yes it runs the process very fast. Thanks for that and the extra info. Commented Jan 24, 2015 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.