anyway to trim mp4 clips without encoding again?

Contributor ,
Mar 28, 2018

Copy link to clipboard

Copied

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.

thanks

Views

15.8K

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Adobe Community Professional , Mar 28, 2018
R Neil Haugen Adobe Community Professional , Mar 28, 2018
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.Neil

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Mar 28, 2018

Copy link to clipboard

Copied

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.

Neil

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
bryced87 AUTHOR
Contributor ,
Mar 28, 2018

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Mar 28, 2018

Copy link to clipboard

Copied

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.

Neil

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
bryced87 AUTHOR
Contributor ,
Mar 28, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Mar 28, 2018

Copy link to clipboard

Copied

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.

Neil

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
bryced87 AUTHOR
Contributor ,
Mar 28, 2018

Copy link to clipboard

Copied

okay thanks

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Mar 29, 2018

Copy link to clipboard

Copied

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.):

TMPGEnc - Store: TMPGEnc MPEG Smart Renderer 5

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?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
bryced87 AUTHOR
Contributor ,
Mar 29, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Mar 29, 2018

Copy link to clipboard

Copied

Hi Bryce:

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.

-Warren

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
bryced87 AUTHOR
Contributor ,
Mar 29, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Engaged ,
Mar 29, 2018

Copy link to clipboard

Copied

"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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Mar 29, 2018

Copy link to clipboard

Copied

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.  

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Aug 14, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Aug 14, 2018

Copy link to clipboard

Copied

Russell:

It needs to be a format supported for Smart Rendering:  Smart rendering in Premiere Pro

-Warren

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Aug 14, 2018

Copy link to clipboard

Copied

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.

Neil

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Sep 14, 2019

Copy link to clipboard

Copied

I wrote this ruby script recently to do that.  I was tired of trying to find other solutions.

https://gist.github.com/hwgusn/104148a135044c1c3e442d7445285374

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Oct 20, 2019

Copy link to clipboard

Copied

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.

 

 

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Oct 20, 2019

Copy link to clipboard

Copied

I'm glad it worked for you.

 

Great Success!

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Dec 28, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more