how to split an mp4 into separate clips?
I have a 3-hour long .mp4 video that has sensible breaks roughly every 30 minutes or so. I want to export this into multiple videos of each section, but have run into nothing but problems trying to do so. This isn't something I do often so I don't really want to invest in commercial tools for this one task, but as yet I can't find any free tool capable of this job.
I really would prefer to just cut this up without having to decode and re-encode the file(s) all over again. I'd like to just mark the sections I want, and spit them out as standalone .mp4s. No other edits, no corrections, no effects, no anything... just cut & export without any formatting changes at all.
I thought Handbrake could do this, but if it can I can't figure out how. I then thought maybe iMovie (10.x as I'm on Mavericks), but that's been nothing but headache and appears to decode the entire movie first before working with it anyway. Quicktime itself seems only able to direct export as .mov and I don't want to re-encode to mp4 all over again.
I keep running into free/open source programs that either are only free in a very limited fashion (like 5 minute max exports, or nasty watermarks, etc.) or that won't run on Mavericks. Is what I'm looking to do just not possible without commercial software? Is it really so difficult to split one long mp4 into several shorter ones?
Solution 1:
Here's a tutorial I just made to solve the problem. No pro subscriptions, no nonsense.
QuickTime Export Split Clip Tutorial: https://www.youtube.com/watch?v=g7MgVBGfFCo
Essentially, you just use the shortcut to split the clip, move the split over to a new file, and save the new file. Quick and easy. Split up an over hour long video into 13 videos or so [1] in 15 minutes.
[1] https://www.youtube.com/playlist?list=PL3z1TiLmRFcwBvXbeSmXhYbouKfBKZyZv
Solution 2:
This can be done using QuickTime Player X.
Quicktime itself seems only able to direct export as .mov and I don't want to re-encode to mp4 all over again.
If you only Trim
the video, or (repeatedly) Split
and then delete one of the ends, you can re-save as .mp4
rather than exporting as .mov
. If you do anything more than that, you must export.
I posted directions for that here: https://apple.stackexchange.com/a/370211/19829
QuickTime 7
It's even easier using QuickTime Player 7 Pro:
Extract a Trimmed segment into its own QuickTime player:
- Open your Source video file in QuickTime 7 Pro.
- Scrub to the first desired frame. Press I to set the
In Marker
. - Scrub to the last desired frame. Press O to set the
Out Marker
. - Extract the segment using either
Copy
CMDC orCut
CMDX. - Get a
New Player
via CMDN. - Paste the segment via CMDV.
Export the trimmed segment using "Pass Through" encoding:
- Focus the New Player window containing only your trimmed clip.
- Select
Export
CMDE. - Select
Movie to MPEG-4
in theExport:
selector. - Click the
Options
button. - Select
Pass through
forVideo > Video Format
. - Select
Pass through
forAudio > Audio Format
. - Click
Save
to save the trimmed clip using the same file type and encoding as the source material.
Solution 3:
I just found out about LosslessCut - it's a free open-source front-end to ffmpeg. In (minimal, so far) testing, it seems to work well - splitting an .mp4 containing subtitles, into smaller chunks, preserving all tracks (including subtitles) while doing so (or only some tracks if you want to exclude some), without transcoding.
Solution 4:
Turns out this CAN be done, and simply using QuickTime to boot. Thanks to this post from another forum, I discovered that you can tell QTPro to simply "pass thru" and not re-encode your material, when exporting.
Steps:
- You must have QuickTime 7 Pro. Might also require a license key if you don't already have one. You will have to get these on your own as QT7 has been discontinued for years by Apple, but it's very much still out there.
- Open your original (large) movie in QT7.
- Move to the point you want your first clip to start, and press "I" to mark an in point. Move to the end of the clip and press "O" to mark the out point.
- COPY the now-selected section and select File > New Player (or hit COMMAND-N)
- PASTE what you previously copied, onto the new clip.
- Select File > Export... (NOT Export for Web...)
- Make sure Movie to MPEG-4 is selected as the export type, and click the Options button
- Make sure "Pass Through" is selected for both audio and video, and enable Streaming options if you need them.
- Export your file where you want it. QT7 will pretty quickly generate the new file, so fast that it is very obviously not re-encoding. Should only take a few minutes at most.
- Rinse & repeat for as many clips as you have in the larger movie.
- Enjoy your new clips!