Does trimming in "Media managment" transcode or just copy?

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

shadewind

  • Posts: 116
  • Joined: Tue Jan 19, 2021 3:30 pm
  • Real Name: Emil Sahlén

Does trimming in "Media managment" transcode or just copy?

PostSun Jun 13, 2021 8:56 am

If I choose "Copy" in Media Management and select "Used media and trim keeping [ ] frame handles", will the result be transcoded from the original or will it be losslessly trimmed? If the latter, how does this actually work with Long GOP codecs such as H264/H264?

It would be great if this is actually lossless because transcoding into something which avoids generational loss such as DNxHR would actually increase the size rather than reduce it since the source is in a mix of H264 and H265.
Online
User avatar

Uli Plank

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

Re: Does trimming in "Media managment" transcode or just cop

PostSun Jun 13, 2021 11:10 am

For many formats it’ll do lossless trimming, but not for all.
GOP formats will be extended to the next I-frame.
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

shadewind

  • Posts: 116
  • Joined: Tue Jan 19, 2021 3:30 pm
  • Real Name: Emil Sahlén

Re: Does trimming in "Media managment" transcode or just cop

PostSun Jun 13, 2021 3:56 pm

Uli Plank wrote:For many formats it’ll do lossless trimming, but not for all.
GOP formats will be extended to the next I-frame.

Are you saying that H264/H265 will be lossless and will be "rounded up" to the next I-frame beyond the specified number of frames? Or are you saying you don't know the specifics for this case? Is this documented anywhere?

(Sorry for the hammering of question)
Offline
User avatar

Mike Warren

  • Posts: 497
  • Joined: Thu Nov 23, 2017 2:28 am
  • Location: Cairns, Australia

Re: Does trimming in "Media managment" transcode or just cop

PostSun Jun 13, 2021 9:59 pm

shadewind wrote:Are you saying that H264/H265 will be lossless and will be "rounded up" to the next I-frame beyond the specified number of frames? Or are you saying you don't know the specifics for this case? Is this documented anywhere?


I just tried it on a H.264 and the answer is it transcoded. You can try this yourself by doing the following:

1/ New timeline
2/ Place a sample clip on the timeline. Trim both the start and end so it's only about 30 seconds long.
3/ Perform a media management on that timeline with 25 frame handles.

4/ import the new copy and place the new clip on top of the existing one, but offset to start 25 frames earlier.
5/ Set the Composite Mode to "Difference"
6/ Play the timeline.

If the 2 clips are identical all you will see is blackness over the section where the clips overlap. Any differences will show up as white.

ResolveMediaManagement.jpg
ResolveMediaManagement.jpg (127.48 KiB) Viewed 530 times
Resolve Studio 17.4.6 - Fusion Studio 17.2.2 - Windows 10
Gigabyte GTX1080ti 11GB - AMD 1950X - 64GB 2400
Gigabyte X399 AORUS Gaming 7
Intensity Pro 4k
Presonus 192 Audio Interface
Separate M.2 SSDs for OS and Resolve Cache
Offline

shadewind

  • Posts: 116
  • Joined: Tue Jan 19, 2021 3:30 pm
  • Real Name: Emil Sahlén

Re: Does trimming in "Media managment" transcode or just cop

PostSun Jun 13, 2021 10:50 pm

Mike Warren wrote:
shadewind wrote:Are you saying that H264/H265 will be lossless and will be "rounded up" to the next I-frame beyond the specified number of frames? Or are you saying you don't know the specifics for this case? Is this documented anywhere?


I just tried it on a H.264 and the answer is it transcoded. You can try this yourself by doing the following:

1/ New timeline
2/ Place a sample clip on the timeline. Trim both the start and end so it's only about 30 seconds long.
3/ Perform a media management on that timeline with 25 frame handles.

4/ import the new copy and place the new clip on top of the existing one, but offset to start 25 frames earlier.
5/ Set the Composite Mode to "Difference"
6/ Play the timeline.

If the 2 clips are identical all you will see is blackness over the section where the clips overlap. Any differences will show up as white.

ResolveMediaManagement.jpg


That's a shame. I wonder how it can be so fast then?
Offline
User avatar

Mike Warren

  • Posts: 497
  • Joined: Thu Nov 23, 2017 2:28 am
  • Location: Cairns, Australia

Re: Does trimming in "Media managment" transcode or just cop

PostMon Jun 14, 2021 1:15 am

shadewind wrote:That's a shame. I wonder how it can be so fast then?


The strange thing is that there are sections where it is black. I'm wondering if it's just generating new I-frames.

I suggest you try it with one of your own files to see if you get the same result.
Last edited by Mike Warren on Mon Jun 14, 2021 1:54 am, edited 2 times in total.
Resolve Studio 17.4.6 - Fusion Studio 17.2.2 - Windows 10
Gigabyte GTX1080ti 11GB - AMD 1950X - 64GB 2400
Gigabyte X399 AORUS Gaming 7
Intensity Pro 4k
Presonus 192 Audio Interface
Separate M.2 SSDs for OS and Resolve Cache
Online
User avatar

Uli Plank

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

Re: Does trimming in "Media managment" transcode or just cop

PostMon Jun 14, 2021 1:46 am

Yes, it's important that you try with your own files. As I wrote, it doesn't apply to all codecs and formats.
And then, I didn't use it anymore with most GOP files under 17, since we simply have much more storage now. We used it for a huge doc, starting under 15 and continuing under 16, but I don't even remember at which point we trimmed the footage. Files were ProRes 4K out of a Ninja and H.264 out of a Sony A6000 then.

Currently I only use it for R3D and BRAW and it works fine there. Actually, it's the only way to export these codecs from DR anyway. Oh, and files out of a Sony Z-150 in H.264 in an MXF wrapper are trimmed without transcoding too. I checked with Media Info, where you see the encoding library. Yes, they are expanded to the next I-frame. Oh, and we use Studio.
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

shadewind

  • Posts: 116
  • Joined: Tue Jan 19, 2021 3:30 pm
  • Real Name: Emil Sahlén

Re: Does trimming in "Media managment" transcode or just cop

PostSat Jun 19, 2021 10:31 pm

Mike Warren wrote:
shadewind wrote:That's a shame. I wonder how it can be so fast then?


The strange thing is that there are sections where it is black. I'm wondering if it's just generating new I-frames.

I suggest you try it with one of your own files to see if you get the same result.


I tried this myself and it seems to be lossless indeed, both on H264 and H265. However, I disregarded the number of frames that I specified and just aligned it by eye until it was black. Then it was black for every frame, except sometimes when seeking through the timeline but I'm just assuming this is due to imprecise rendering when seeking to allow it to be smoother. When the seek head is "resting", it's always black.

Your result might have been caused by the fact that it seems to round up to the nearest I-frame which causes the specified number of handle frames to be inaccurate. However, I feel like this is desired behavior. I care less about the exact number of handle frames as long as there are enough of them, what's important is that there no quality loss.
Online
User avatar

Uli Plank

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

Re: Does trimming in "Media managment" transcode or just cop

PostSun Jun 20, 2021 12:07 am

Of course that's expected behavior, since exact trimming would cause re-encoding of one GOP on either end in most cases.
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: Bing [Bot], Haryanto, MagPostColor, panos_mts, rshilts, Uli Plank and 146 guests