Answers.Body: <p>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)</p>
  
  <p>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.</p>
  
  <p>Using ffmpeg, you can do what I think you're saying Quicktime's trim is doing:</p>
  
  <pre><code>ffmpeg -ss start_offset_seconds -t length_seconds -i input.mp4  -shortest -codec copy -movflags faststart trimmed.mp4
  </code></pre>
  
  <p>That runs about as fast as your hard drive can copy, since it's not re-encoding the video.  (codec = copy, not libx264).</p>
  
  <p>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.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-24T14:43:53.950Z
Answers.Text: I see. Yes it runs the process very fast. Thanks for that and the extra info.
Answers.UserDisplayName: bandejapaisa
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-23T22:48:37.717Z
Answers.LastActivityDate: 2015-02-06T05:55:12.830Z
Answers.LastEditDate: 2015-02-06T05:55:12.830Z
Answers.UserDisplayName: Peter Cordes
Body: <p>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 !!</p>
  
  <p>Now if I use quicktime trim feature - it really does seem to trim it and leave it I'm its exact same format.</p>
  
  <p>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 ???</p>
  
Tags: <final-cut-pro-x><quicktime><imovie>
Title: Trimming mp4 videos
UserDisplayName: bandejapaisa
ThreadText: # Trimming mp4 videos
  
  (Asked by: username_0 on 2015-01-23)
  
  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 ???
  
  **Tags:** final-cut-pro-x, quicktime, imovie
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-01-23. Score: 5 | Accepted answer
  
  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.)
  
  > **Comments:**
  > **username_0**: I see. Yes it runs the process very fast. Thanks for that and the extra info.  
  
  ---
  
  