Is there a program I can use that can take an existing .mp4 file and trim start and end times and overwrite the file without re encoding it to maintain the quality? I was given some .mp4 footage to edit and the customer wants me to trim the clips up for him but not lose quality and he wants to retain similar file size and does not want it to be in another format.
There are some apps out there, some free, some paid, that can do trimming & re-wrapping. Search with something like "cutting and re-wrapping video files without re-encoding", and you'll get results for a number of different apps, YouTube vids on doing it, that sort of thing.
Now ... H.264 files are tricky to do this as only between every 9-30 frames can you actually 'cut' with only a re-wrap. H.264 is encoded as complete or I-frames that are complete but compressed, and in-between those ... used to be 9-15 apart, then 9-30, and now, with partial I-frames on some drones, up to 120 frames in between actual complete frames. For those in-between 'frames', called p & b frames, there's only a dataset stored of a) the pixels that have changed after the last I-frame or b) the pixels that will change before the next I-frame ... or ... both! The computer has to decompress & store an I-frame in RAM, then call up the next "frame" dataset, and compute it from the stored I-frame it's already decompressed.
Which means, you can only 'cut' on complete I-frames. Which can be a second or more away from where you'd rather cut. But ... if say, you have a 30 minute file and you just want to eliminate the last 12 minutes or so ... this works great. If you want to cut precisely here to precisely there ... no, you can't do that with a simple trim/rewrap.
hmm, customer wants to trim here to there so looks like this won't work. As a work around could I use media encoder and select in and out points from the mp4 file and transcode to cineform then re encode that to a new mp4 file? I know that seems tedious but wondering if that would be a work around for the customer wanting it to be in mp4 without quality loss.
Yea, if you need a precise trim, you can only do that with re-encoding. I would suggest doing so by cutting in PrPro, then exporting directly to the file type needed for the deliverable, that extra transcode step would only add a (slight) degradation and raise the time required.
but if I had an mp4 and export again to mp4 wouldn't the quality decrease? At some point the customer wants me to edit the clips into a video for him with crossfades color correct etc but he wants to preview them in shorter clips on his ipad as he's traveling soon and he can't seem to get cineform etc to work on the ipad as we already tried it
If you're using the transcode to save the trimmed file to your computer it would help. But it's just another re-encode if you're cutting the mp4 ... then transcoding to Cine/DNx/ProRes, then back to mp4
I wouldn't use that exported mp4 though in the future project, but keep the 'cut' in a project for that ... project. Just giving him a 'preview' file to work with, essentially.
PR added any smart rendering relatively recently. And it has never appeared a priority. (I think it should be higher.)
The bottom line for me of the above discussion, is that we have to educate clients to the options they may have for capture formats to make editing easier. But many won't listen, and there may be no options.
Here is one of the paid options for rewrapping (recodes only the parts affected by the edit, about $70 ( I have not used it.):
It appears to me that the smart rendering is not provided in their Master works; some smart rendering is provided in the Authoring works.
Does anyone know if there is a free equivalent that provides HEVC etc like this one does?
well I might have answered my own question. Looking at my camera manual it seems I can install some canon software and connect my camera to my PC and trim clips with the SD card in the camera. What I will do though is backup the card first before I do this
Have you thought about creating sub-clips from your MP4 files and then transcoding those to Cineform or ProRes?
If you're on Windows, go with Cineform. Based on what you've mentioned about your camera, I'd go with Cineform 3. If you're on Mac, go with Apple ProRes 422 (LT). You won't lose anything in the conversion to Cineform or ProRes and the resulting clips will be as well suited to video editing as source footage that originated as MP4 can be.
I have tried to transcode subclips but when I did it lost the ability to expand and shorten the start and tail of the clips. Also it seems when I tested it (unless I did it wrong) that if you try changing the exposure etc with lumetri color there is banding and the footage is washed out. It doesn't do this the regular mp4 files. Is there anyway to transcode the subclips while having 10 or so second handles so I can extend or shorten the front and tail ends? This is crucial because the crossfades don't always get applied to the center of the clips unless you have enough at the start and tail of each clip
"Match sequence setting" and making the movie as a MXF OP1a is a great way to get the quality enhanced
for me for me television shows
You'd want to account for handles when making the sub-clips by adding extra time by setting the in mark before your intended in point and your out make after your intended out point.
Do you know what bit rate your camera records at? If it's 21 mbps or higher, the MP4 files should hold up to a 1st generation transcode to Cineform or ProRes.
What about an imprecise trim of original mp4? I'm editing footage from a church 4k video cam with no audio. Don't want to re-encode what I give to the police or what we use in media clips. If it were a jpeg, I'd use jpegcrop.exe from jpeg.org and it doesn't resample after crop. Now i'm looking for a way to trim ends of 4k video footage without re-encoding. Surely this is possible. I tried using the Lorex DVR to crop ends and wasn't able to trim an existing motion activated clip. I own PP6 but am not very good at it
There are a several apps out there that can "trim H.264 without re-encoding" ... search for that. Shotcut, ffmpeg, a number of others, some free-ware and some small charge ones. I've never used them but know that some people do this sort of thing fairly often.
It's a very specialized thing to do. I've no experience with it.
H264 files can be trimmed only if bounds are set on "I-Frames", so you can't trim for any bounds without re-encoding. If you want to trim from frame A to frame B, you will be able to trim from the first I-Frame before A and the next I-Frame after B.
This is how we trim H264 in PlumePack, it is a Premirere Pro Plugin that allows you to trim your media based on their used inside your Project.
Here is a tutorial on how to trim H264/H265 files using it with more information : https://www.autokroma.com/blog/PlumePack_How-to-Trim-AVC-H264-H265-HEVC
I absolutely love that Ruby script. Thank you!
I just installed Homebrew and Ruby and ffmpeg and the script worked perfectly. It suits my needs 100%.
Thanks for the help! Now... to figure out the best way to manage my photos and videos in Lightroom while using Premier Pro to edit.
I'm glad it worked for you.
To trim an MP4 clip without re-encoding, I think you might as well try Joyoshare Video Cutter. Such a tool features a high-speed mode to cut any part from any video with 100% original quality and with millisecond precision on both Windows and Mac.