ref frames

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

Nathan

  • Posts: 7
  • Joined: Thu Nov 29, 2018 1:55 am
  • Real Name: Nathan Shaw

ref frames

PostThu Nov 29, 2018 2:01 am

I'm trying to get the exported mp4/H.264 file to have 4 ref frames. The original has 4, but when I export it it only has 2. I'm very new to DaVinci Resolve, so I don't know all of the settings. I have tried multiple settings, but with now luck. Is there a way to change the exported ref frames? and if so how would I do it?
Offline

Bryan Worsley

  • Posts: 513
  • Joined: Fri Apr 15, 2016 11:26 am
  • Location: Montreal, Canada

Re: ref frames

PostThu Nov 29, 2018 3:09 am

Nathan wrote:Is there a way to change the exported ref frames?


No, I'm afraid there isn't. It's fixed at 2. Added to which the H264 GOP structure is 'Closed' and there is no CABAC entropy coding - CAVLC only.

If you want higher quality (compression efficient), configurable H264 encoding you'll need to export to an intermediate format and use an external (x264) encoding tool - FFMPEG, Handbrake, VirtualDub2 etc.
Offline

Nathan

  • Posts: 7
  • Joined: Thu Nov 29, 2018 1:55 am
  • Real Name: Nathan Shaw

Re: ref frames

PostThu Nov 29, 2018 4:14 am

Thanks for the information.
What intermediate format would you recommend to keep loss at a minimum?
Offline

Nathan

  • Posts: 7
  • Joined: Thu Nov 29, 2018 1:55 am
  • Real Name: Nathan Shaw

Re: ref frames

PostThu Nov 29, 2018 4:27 am

Bryan Worsley wrote:
Nathan wrote:Is there a way to change the exported ref frames?


No, I'm afraid there isn't. It's fixed at 2. Added to which the H264 GOP structure is 'Closed' and there is no CABAC entropy coding.

If you want higher quality, configurable H264 encoding you'll need to export to an intermediate format and use an external (x264) encoding tool.



Thanks for the information.
What is the best intermediate format to use without loosing data/quality?
Offline

Bryan Worsley

  • Posts: 513
  • Joined: Fri Apr 15, 2016 11:26 am
  • Location: Montreal, Canada

Re: ref frames

PostThu Nov 29, 2018 6:16 pm

None of the 'intermediate' codecs are completely (i.e. mathematically) lossless, but depending on the OS you are running Resolve on, any of the 10-bit 422 export codecs - Cineform, DNxHD/DNxHR HQX, Grass Valley HQX, Prores HQ - will be perfectly acceptable. Set for 'Best' quality if so desired, but expect larger file sizes.

Also depends on whether the 'intermediate' codec is compatible with the x264 encoding tool of choice. FFMPEG, for example will accept all of these formats. VirtualDub2 also. But Handbrake won't accept DNxHR or Cineform for input.

What's the source of your H264.mp4 footage, out of interest ?
Last edited by Bryan Worsley on Thu Nov 29, 2018 6:42 pm, edited 1 time in total.
Offline
User avatar

Jean Claude

  • Posts: 2973
  • Joined: Sun Jun 28, 2015 4:41 pm
  • Location: France

Re: ref frames

PostThu Nov 29, 2018 6:41 pm

Bryan Worsley wrote:
Nathan wrote:Is there a way to change the exported ref frames?


No, I'm afraid there isn't. It's fixed at 2. Added to which the H264 GOP structure is 'Closed' and there is no CABAC entropy coding - CAVLC only.

If you want higher quality (compression efficient), configurable H264 encoding you'll need to export to an intermediate format and use an external (x264) encoding tool - FFMPEG, Handbrake, VirtualDub2 etc.


@Brian not sure(?), :oops:

Either you do not have to have the Studio version or you have not explored the NVIDIA option or you do not have a graphics card with CUDA

Export QT / H264 Native => REF FRAME is:
Code: Select all
Video
ID: 1
Format: AVC
Format / Info: Advanced Video Codec
Profile format: Main @ L4
Format settings: 2 Ref Frames
CABAC settings: No
Format settings, RefFrames: 2 frames


Export QT / H264 NVIDIA => is:
Code: Select all
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 4 frames


High/main....:)
"Saying it is good, but doing it is better! "
Win10-1809 | Resolve Studio V16.1 | Fusion Studio V16.1 | Decklink 4K Extreme 6G | RTX 2080Ti 431.86 NSD driver! |
Offline

Bryan Worsley

  • Posts: 513
  • Joined: Fri Apr 15, 2016 11:26 am
  • Location: Montreal, Canada

Re: ref frames

PostThu Nov 29, 2018 6:47 pm

Jean Claude wrote:
Nathan wrote:Is there a way to change the exported ref frames?

Export QT / H264 NVIDIA => is:
Code: Select all
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 4 frames


High/main....:)


Well, there you go, I was wrong.

@Nathan. Still, I hope you find the advice about the 'intermediate' formats useful if you need to go that route.
Last edited by Bryan Worsley on Thu Nov 29, 2018 6:55 pm, edited 1 time in total.
Offline
User avatar

Jean Claude

  • Posts: 2973
  • Joined: Sun Jun 28, 2015 4:41 pm
  • Location: France

Re: ref frames

PostThu Nov 29, 2018 6:53 pm

Bryan Worsley wrote:
Jean Claude wrote:
Nathan wrote:Is there a way to change the exported ref frames?

Export QT / H264 NVIDIA => is:
Code: Select all
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 4 frames


High/main....:)


Well, there you go, I'm wrong.

Still, I hope you find the advice about the 'intermediate' formats useful if you prefer to go that route.


But the best is the H265 + NVIDIA for the HDR ... :D ... did you try?
"Saying it is good, but doing it is better! "
Win10-1809 | Resolve Studio V16.1 | Fusion Studio V16.1 | Decklink 4K Extreme 6G | RTX 2080Ti 431.86 NSD driver! |
Offline

Bryan Worsley

  • Posts: 513
  • Joined: Fri Apr 15, 2016 11:26 am
  • Location: Montreal, Canada

Re: ref frames

PostThu Nov 29, 2018 6:57 pm

No I haven't.
Offline

Nathan

  • Posts: 7
  • Joined: Thu Nov 29, 2018 1:55 am
  • Real Name: Nathan Shaw

Re: ref frames

PostThu Nov 29, 2018 7:22 pm

Thanks everyone. I’ll give that a try.
Offline

Nathan

  • Posts: 7
  • Joined: Thu Nov 29, 2018 1:55 am
  • Real Name: Nathan Shaw

Re: ref frames

PostThu Nov 29, 2018 7:29 pm

Jean Claude wrote:
Bryan Worsley wrote:
Nathan wrote:Is there a way to change the exported ref frames?



Export QT / H264 NVIDIA => is:
Code: Select all
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 4 frames


High/main....:)



Where would I input that into?
Offline

Bryan Worsley

  • Posts: 513
  • Joined: Fri Apr 15, 2016 11:26 am
  • Location: Montreal, Canada

Re: ref frames

PostThu Nov 29, 2018 7:40 pm

The 'NVIDIA' option is only available in the Studio version.
Offline

Bryan Worsley

  • Posts: 513
  • Joined: Fri Apr 15, 2016 11:26 am
  • Location: Montreal, Canada

Re: ref frames

PostFri Nov 30, 2018 3:32 pm

@Nathan,
BTW - If you're not on the Studio version, external NVIDIA GPU encoding (NVENC) is also possible with FFMPEG through the h264_nvenc and hevc_nvenc encoders:

https://trac.ffmpeg.org/wiki/HWAccelIntro

I believe Handbrake now supports NVENC encoding also. I don't use it myself.
Offline

Nathan

  • Posts: 7
  • Joined: Thu Nov 29, 2018 1:55 am
  • Real Name: Nathan Shaw

Re: ref frames

PostFri Nov 30, 2018 3:42 pm

ok thanks. I think eventually I will get the studio version, but until then I will try your ideas.
Offline

Jim Simon

  • Posts: 31214
  • Joined: Fri Dec 23, 2016 1:47 am

Re: ref frames

PostFri Nov 30, 2018 4:46 pm

Jean Claude wrote:Export QT


He was asking about the far more ubiquitous MP4, which doesn't offer all of the the needed controls yet.
My Biases:

You NEED training.
You NEED a desktop.
You NEED a calibrated (non-computer) display.
Offline
User avatar

Jean Claude

  • Posts: 2973
  • Joined: Sun Jun 28, 2015 4:41 pm
  • Location: France

Re: ref frames

PostFri Nov 30, 2018 5:45 pm

Jim Simon wrote:
Jean Claude wrote:Export QT


He was asking about the far more ubiquitous MP4, which doesn't offer all of the the needed controls yet.


@Jim not sure(?), :oops: with v15.2.1

Either you do not have to have not explored the NVIDIA option or you do not have a graphics card with CUDA?

Export MP4/ H264 NVIDIA ENCODING PROFILE HIGH => REF FRAME capable is:
Code: Select all
General
Complete name                            : G:\Temp\MP4\MP4_NVIDIA.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 32.7 MiB
Duration                                 : 16 s 800 ms
Overall bit rate                         : 16.3 Mb/s
Writing application                      : Lavf57.25.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding

:)
"Saying it is good, but doing it is better! "
Win10-1809 | Resolve Studio V16.1 | Fusion Studio V16.1 | Decklink 4K Extreme 6G | RTX 2080Ti 431.86 NSD driver! |

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], KrunoSmithy and 104 guests