Answers.Body: <p>1) your Panasonic footage will be H.264; GoPro may be H.264 or H.265. These are inter-frame codecs whereas ProRes is an intra-frame codec (each frame is coded standalone and doesn't depend on other frames for decoding). So, you should consider a higher bitrate to maintain source quality.</p>
  
  <p>2) FFmpeg does allow you to set a custom quantizer but by default it will use a fixed quality setting per profile. For custom quant, use <code>-global_quality N</code>.</p>
  
  <p>3) FFmpeg has to convert to the given pixel format which is what output -pix_fmt will do. The encoder only <em>encodes</em> i.e. takes in raw uncompressed input frames and delivers coded data.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T07:25:57.797Z
Answers.Text: Thanks for your reply.  I just want to clarify a couple of thing: 1) You say I should consider a higher bitrate to maintain source quality.  But what is a good profile to go for to balance quality against file size?  My Panasonic footage and GoPro footage only starts out at 100Mbps and 78Mbps respectably.  So it's not very high to begin with.    2) I understand about the custom quantizer, but is there any point in using it? For comparability why not just rely on the default for that profile and if you want higher select a different profile?
Answers.UserDisplayName: tommydog35
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T08:33:06.237Z
Answers.Text: 1) Use standard. 2) No, profile default is fine.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T08:58:34.547Z
Answers.Text: Thanks for clarifying points 1 and 2.  With respect to point 3, why is it necessary to specify the -pix_fmt if using a ProRes 422 profile (422 HQ, ProRess 422, ProRes 422 LT, ProRes 422 Proxy) Just by selecting a 422 profile, it is obvious that the footage is to be encoded as 422.  Therefore there should be no need to tell it you want a 422 colour space.   The same as if you choose a ProRes 444 profile, I don't see why it is then necessary to tell the encoder you want the footage encoded as 444. This should be obvious based on the profile you select.  Am I missing something?
Answers.UserDisplayName: tommydog35
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T09:18:50.247Z
Answers.Text: FFmpeg is modular - pix_fmt is meant for the scaler library, profile is a private instruction to the encoder. The reason there's no automatic management across the pipeline is because there are hundreds of encoders and dozens of scaler configurations, not to mention parameters for other modules so there's no non-convoluted way to make it happen by 'magic'.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T09:32:05.107Z
Answers.Text: Thank you very much you have answered all my questions.  Just one other thing as you seem to be very knowledgeable - Do you know what the maximum supported frame rates are when encoding to Prores and DNxHR? I read DNxHD only goes to 60fps.  But what is the limit for Prores and DNxHR?  Is is 120fps?
Answers.UserDisplayName: tommydog35
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T18:06:10.760Z
Answers.Text: @tommydog35 [Avid High-Resolution Workflows Guide](https://resources.avid.com/SupportFiles/attach/HighRes_WorkflowsGuide.pdf) (p 111) only shows up to 60 fps, but `ffmpeg` will likely encode any arbitrary rate. Some more info in [How to convert a video with ffmpeg into the DNxHD / DNxHR format?](https://askubuntu.com/a/907515/59378)
Answers.UserDisplayName: llogan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T18:37:35.297Z
Answers.Text: That's what I suspected that ffmpeg would work for any fps even though it is not part of the official spec.  I know this the case for Prores, so would assume this for DNxHR as well.
Answers.UserDisplayName: tommydog35
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T18:38:20.143Z
Answers.Text: One final thing - If I don't set a qscale for Prores and just use profile default, will ffmpeg still produce a video with a variable bitrate?  Or does it produce a video with a constant bit rate?
Answers.UserDisplayName: tommydog35
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T19:27:59.730Z
Answers.Text: Variable bitrate. A default quantization matrix is used, so encoded frame size will depend on what the visual content is.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T06:13:52.537Z
Answers.LastActivityDate: 2019-07-11T06:13:52.537Z
Answers.UserDisplayName: Gyan
Body: <p>I am trying to understand how to use Prores Kostya with FFmpeg, and I have a few questions regarding this:</p>
  
  <ol>
  <li><p>I have a Panasonic G85 and Gopro Hero 7 black which I used to shoot 4k in.  For 4k footage, the Panasonic records at 4:2:0 8-bit at 100 Mbps, and the Gopro 8 bit 4:2:0 at 78 Mbps.  With this in mind is there any point in selecting a Prores profile other than ProRes 422 LT?  The reason I say this is because the LT profile has 102 Mb/s, which exceeds the source footage from both cameras. </p></li>
  <li><p>I have read that the qscale command is not needed, and a user can just select a profile which will define a standard bit rate (for LT this is 102  Mb/s). I have seen people saying that ProRes is a profile-based codec, meaning that when you select one of the profiles, it does a fixed amount of compression, defined in the spec. If you want a different compression level, you're supposed to choose a different profile, rather than change a quality setting with the qscale command, as this may result in a violation of the standard, and have the potential to cause playback issues (particularly with hardware decoders).  So with this in mind is it better to miss out the qscale command?</p></li>
  <li><p>Why is it necessary to specify the <code>-pix_fmt</code>, as I thought all the 422 profiles defaulted to yuv422p10le and all the  4444 profiles defaulted to yuv4444p10le. So why is there a need to specify this value?</p></li>
  </ol>
  
Tags: <ffmpeg><encoding><prores>
Title: Prores ffmpeg questions
UserDisplayName: tommydog35
ThreadText: # Prores ffmpeg questions
  
  (Asked by: username_0 on 2019-07-10)
  
  I am trying to understand how to use Prores Kostya with FFmpeg, and I have a few questions regarding this:
  
  1. I have a Panasonic G85 and Gopro Hero 7 black which I used to shoot 4k in. For 4k footage, the Panasonic records at 4:2:0 8-bit at 100 Mbps, and the Gopro 8 bit 4:2:0 at 78 Mbps. With this in mind is there any point in selecting a Prores profile other than ProRes 422 LT? The reason I say this is because the LT profile has 102 Mb/s, which exceeds the source footage from both cameras.
  2. I have read that the qscale command is not needed, and a user can just select a profile which will define a standard bit rate (for LT this is 102 Mb/s). I have seen people saying that ProRes is a profile-based codec, meaning that when you select one of the profiles, it does a fixed amount of compression, defined in the spec. If you want a different compression level, you're supposed to choose a different profile, rather than change a quality setting with the qscale command, as this may result in a violation of the standard, and have the potential to cause playback issues (particularly with hardware decoders). So with this in mind is it better to miss out the qscale command?
  3. Why is it necessary to specify the `-pix_fmt`, as I thought all the 422 profiles defaulted to yuv422p10le and all the 4444 profiles defaulted to yuv4444p10le. So why is there a need to specify this value?
  
  **Tags:** ffmpeg, encoding, prores
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-11. Score: 0 | Accepted answer
  
  1) your Panasonic footage will be H.264; GoPro may be H.264 or H.265. These are inter-frame codecs whereas ProRes is an intra-frame codec (each frame is coded standalone and doesn't depend on other frames for decoding). So, you should consider a higher bitrate to maintain source quality.
  
  2) FFmpeg does allow you to set a custom quantizer but by default it will use a fixed quality setting per profile. For custom quant, use `-global_quality N`.
  
  3) FFmpeg has to convert to the given pixel format which is what output -pix\_fmt will do. The encoder only *encodes* i.e. takes in raw uncompressed input frames and delivers coded data.
  
  > **Comments:**
  > **username_0**: Thanks for your reply.  I just want to clarify a couple of thing: 1) You say I should consider a higher bitrate to maintain source quality.  But what is a good profile to go for to balance quality against file size?  My Panasonic footage and GoPro footage only starts out at 100Mbps and 78Mbps respectably.  So it's not very high to begin with.    2) I understand about the custom quantizer, but is there any point in using it? For comparability why not just rely on the default for that profile and if you want higher select a different profile?  
  > **username_1**: 1) Use standard. 2) No, profile default is fine.  
  > **username_0**: Thanks for clarifying points 1 and 2.  With respect to point 3, why is it necessary to specify the -pix_fmt if using a ProRes 422 profile (422 HQ, ProRess 422, ProRes 422 LT, ProRes 422 Proxy) Just by selecting a 422 profile, it is obvious that the footage is to be encoded as 422.  Therefore there should be no need to tell it you want a 422 colour space.   The same as if you choose a ProRes 444 profile, I don't see why it is then necessary to tell the encoder you want the footage encoded as 444. This should be obvious based on the profile you select.  Am I missing something?  
  > **username_1**: FFmpeg is modular - pix_fmt is meant for the scaler library, profile is a private instruction to the encoder. The reason there's no automatic management across the pipeline is because there are hundreds of encoders and dozens of scaler configurations, not to mention parameters for other modules so there's no non-convoluted way to make it happen by 'magic'.  
  > **username_0**: Thank you very much you have answered all my questions.  Just one other thing as you seem to be very knowledgeable - Do you know what the maximum supported frame rates are when encoding to Prores and DNxHR? I read DNxHD only goes to 60fps.  But what is the limit for Prores and DNxHR?  Is is 120fps?  
  > **username_2**: @username_0 [Avid High-Resolution Workflows Guide](https://resources.avid.com/SupportFiles/attach/HighRes_WorkflowsGuide.pdf) (p 111) only shows up to 60 fps, but `ffmpeg` will likely encode any arbitrary rate. Some more info in [How to convert a video with ffmpeg into the DNxHD / DNxHR format?](https://askubuntu.com/a/907515/59378)  
  > **username_0**: That's what I suspected that ffmpeg would work for any fps even though it is not part of the official spec.  I know this the case for Prores, so would assume this for DNxHR as well.  
  > **username_0**: One final thing - If I don't set a qscale for Prores and just use profile default, will ffmpeg still produce a video with a variable bitrate?  Or does it produce a video with a constant bit rate?  
  > **username_1**: Variable bitrate. A default quantization matrix is used, so encoded frame size will depend on what the visual content is.  
  
  ---
  
  