Trimming Video Without Re-encoding

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

Jeff Cristad

  • Posts: 31
  • Joined: Sun Sep 18, 2016 5:20 pm

Trimming Video Without Re-encoding

PostThu Aug 31, 2017 5:39 pm

Is there a way in Resolve to trim a video without having to re-encode it? Or do I need to use something like ffmpeg or other similar software, Avidemux? (I need to send someone some unedited clips and only need a fraction of the footage to send them.)
Offline

jussi rovanpera

  • Posts: 130
  • Joined: Sat Nov 08, 2014 12:25 pm
  • Location: Helsinki, Finland

Re: Trimming Video Without Re-encoding

PostThu Aug 31, 2017 6:20 pm

You can trim some file formats with Media Management.
Offline

Andrew Kolakowski

  • Posts: 9211
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Trimming Video Without Re-encoding

PostThu Aug 31, 2017 8:14 pm

It all depends what format you want to trim. Some are easy, some more tricky.

ffmepg is easy and works with many formats.

You download ffmpeg executable from their website:

PC:
https://ffmpeg.zeranoe.com/builds/win64 ... static.zip

or Mac:
https://evermeet.cx/ffmpeg/ffmpeg-87141-gb34c16a.dmg

On Mac simply install it and run from terminal.
On Pc you have to extract ffmpeg.exe and copy into e.g. root of C drive and run from cmd dos window.

fffmepg -ss 20 -t 10 -i "source" -c:v copy -c:a copy "out file.mov"

ss is start time in seconds and t is how much from this time you want to keep (example saves 10 seconds from 20 seconds in the file).
Offline
User avatar

Uli Plank

  • Posts: 21623
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 1:16 am

Any GOP format will be re-encoded when you trim it, independent of the software you use.
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G
Offline
User avatar

Hector Berrebi

  • Posts: 518
  • Joined: Sun Mar 19, 2017 4:10 pm

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 7:37 am

Uli Plank wrote:Any GOP format will be re-encoded when you trim it, independent of the software you use.


I'm not sure how accurate this statement is Uli

Premiere Pro Smart Render can sort of trim with select formats including XDCAM which to my best knowledge is Interframe. Its not media managed and mainly aims at exports, but still. it trims (even if under quite a few limitations)

Avid Consolidates XDCAM and XAVC L which is not exactly trimming... but not far fro it either.
H e c t o r _ B e r r e b i
---------------------------
Colorist ~ Consultant ~ Trainer
Da Vinci Resolve Certified Instructor
Offline
User avatar

Uli Plank

  • Posts: 21623
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 8:47 am

XDCAM comes in many flavors, some are intra-frame.

Of course one could trim GOP footage with handles to the next I-frame, but I'm not sure any NLE is offering this.
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G
Offline

Andrew Kolakowski

  • Posts: 9211
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 9:26 am

You can trimm Long GOP formats, but if it's strict trim then it has to be aligned to GOP (or more precisely closed GOPs). What inteligent software do like Edius is to allow you trim at any place and then it just re-encodes needed part. It works very well. Compared to Premiere it will smart copy any portion of the timeline which doesn't need to be processed. If you for example added some filter etc to 5 sec section in your 1h source it will copy whole source and re-encode these 5 sec. It works for quite a few formats in Edius including XDCAM.
Last edited by Andrew Kolakowski on Fri Sep 01, 2017 9:39 am, edited 1 time in total.
Offline

Andrew Kolakowski

  • Posts: 9211
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 9:27 am

Hector Berrebi wrote:
Uli Plank wrote:Any GOP format will be re-encoded when you trim it, independent of the software you use.


I'm not sure how accurate this statement is .


Not true at all.
Offline
User avatar

Hector Berrebi

  • Posts: 518
  • Joined: Sun Mar 19, 2017 4:10 pm

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 9:58 am

Andrew Kolakowski wrote: It works for quite a few formats in Edius including XDCAM.


Always very impressed with GV and Edius...
But since I'm primarily on Mac Its (regretfully) the NLE I know the least.

Can you point me out to good documentation, article/info about Edius Smart trimming and how it works?

Noticed you seem to be quite knowledgeable about it.


hector
H e c t o r _ B e r r e b i
---------------------------
Colorist ~ Consultant ~ Trainer
Da Vinci Resolve Certified Instructor
Offline

Andrew Kolakowski

  • Posts: 9211
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 11:46 am

There isn't really article about it as far as I know.
It had MPEG2 smart export in v4 which was like 10 or more years ago.
It will do it for many formats assuming some conditions are met (for example MPEG2 stream uses closed GOP, not open). All I frame based formats works like a charm (AVC-I, HQX etc).
Everything MPEG2 based will work as far as I remember- XDCAM etc.
XAVC also works if I'm correct.
Random h264 MP4/MOV doesn't.
It's for strict formats like XDCAM, XAVC, AVC-I, AVC-Ultra. If Edius detects that your source is the same as you export setting then it will smart export when it can.
Offline
User avatar

Uli Plank

  • Posts: 21623
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Trimming Video Without Re-encoding

PostFri Sep 01, 2017 12:32 pm

I didn't say it will be completely re-encoded. Of course, smart trimming would be a great feature in Resolve.
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G
Offline

Wlee2060

  • Posts: 5
  • Joined: Wed Nov 28, 2018 8:28 am
  • Real Name: William Lee

Re: Trimming Video Without Re-encoding

PostWed Nov 28, 2018 8:34 am

Another possible way is to try Joyoshare Media Cutter which is very good at trimming video files without re-encoding at a super fast speed. The trial version offers you five opportunities to cut and trim videos for free, so just have a try.
Offline

ukdesigner

  • Posts: 1
  • Joined: Thu Oct 31, 2019 5:03 pm
  • Real Name: Bob Dawkins

Re: Trimming Video Without Re-encoding

PostThu Oct 31, 2019 5:09 pm

To those who think that it's possible to TRIM a video without Re-encoding...

IT IS NOT POSSIBLE.
Last edited by ukdesigner on Thu Oct 31, 2019 11:55 pm, edited 1 time in total.
Offline

Andrew Kolakowski

  • Posts: 9211
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Trimming Video Without Re-encoding

PostThu Oct 31, 2019 5:25 pm

Sorry but you are talking crap. Re-encoding is re-encoding and copying is copying (which gives 100% the same data as original). Those are 2 different things.

You can verify it by yourself with your own method. No idea what apps do you use but quite a few offer such a functionality.
Offline
User avatar

Cary Knoop

  • Posts: 1452
  • Joined: Sun Mar 12, 2017 6:35 pm
  • Location: Newark, CA USA

Re: Trimming Video Without Re-encoding

PostThu Oct 31, 2019 5:47 pm

I agree with Andrew, it is absolutely possible to trim a video without the need to re-encode.

When a particular frame is not altered by an NLE it can be simply copied unchanged to the new video.

There is an exception though for long GOP encoded videos. Here the encoding of a particular frame can depend on other frames. So in the case of a trim it may be necessary to re-encode surrounding frames that required information from the trimmed frame.
Offline
User avatar

Mel Matsuoka

  • Posts: 1181
  • Joined: Wed Aug 22, 2012 9:54 am
  • Location: Clarence, NY

Re: Trimming Video Without Re-encoding

PostThu Oct 31, 2019 6:26 pm

ukdesigner wrote:To those who think that it's possible to TRIM a video without Re-encoding...

IT IS NOT POSSIBLE.


Sorry but as a blanket statement, you are absolutely wrong.

As has been mentioned in this thread, it depends on the source codec, but most intraframe codecs like ProRes can be losslessly trimmed. Resolve itself does lossless trims of media in the Media Management tool.

The same mechanism is what makes the new "Bypass re-encode when possible" option in Resolve 16's Deliver page possible.

Cheers.
Last edited by Mel Matsuoka on Thu Oct 31, 2019 7:25 pm, edited 1 time in total.
Resolve Studio 18.0.2 / Decklink Mini Monitor / 14" 2021 Macbook Pro Max (macOS 12.5.1, M1 Max) / 32GB RAM
Offline
User avatar

Uli Plank

  • Posts: 21623
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: Trimming Video Without Re-encoding

PostThu Oct 31, 2019 7:21 pm

In recent versions of Resolve the Media Management function can trim GOP footage by just using it from the previous and up to the next I-frame. So, trimmed without re-encoding but with growing handles.
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G

Return to DaVinci Resolve

Who is online

Users browsing this forum: 4EvrYng, Bing [Bot], internet_pythia, Mads Johansen, panos_mts, Shrinivas Ramani and 170 guests