Answers.Body: <p>Use</p>
  
  <pre><code>ffmpeg -framerate 500/21 -i %d.png -i audio.wav -c:v libx265 -x265-params lossless=1 -pix_fmt yuv422p12le -c:a copy output.mkv
  </code></pre>
  
  <p>You'll need a ffmpg with a libx265 that supports a bit depth of 12. At this time, I can't find such a precompiled binary so you'll have to compile ffmpeg using the auto-build script at <a href="https://github.com/jb-alvarado/media-autobuild_suite" rel="nofollow noreferrer">https://github.com/jb-alvarado/media-autobuild_suite</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-17T05:49:14.503Z
Answers.Text: Why is it like -x265-params lossless=1? Can I use -crf 0 instead? or is h.265 a bit different? also i was always told to use -c copy instead of -c:a or any of the other copy audio variants.
Answers.UserDisplayName: kite
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-17T05:50:20.623Z
Answers.Text: For x265, this is the syntax for lossless encoding.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-17T06:51:25.727Z
Answers.Text: I'm getting an error and its changing to 10bit: Incompatible pixel format 'yuv422p12le' for codec 'libx265', auto-selecting form at 'yuv422p10le
Answers.UserDisplayName: kite
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-17T06:59:27.697Z
Answers.Text: Get the latest ffmpeg binary from https://ffmpeg.zeranoe.com/builds/
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-17T07:32:32.297Z
Answers.Text: Getting same problem unfortunately. Testing on a sequence of seven 16 bit png numbered 1.png...etc without the audio bit: ffmpeg -framerate 24 -i %d.png -c:v libx265 -x265-params lossless=1 -pix_fmt yuv422p12le test.mkv
Answers.UserDisplayName: kite
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T04:35:57.753Z
Answers.Text: Is this easier now?
Answers.UserDisplayName: David Jonsson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T04:53:00.733Z
Answers.Text: My builds include libx265 with 12-bit support.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-19T10:55:04.537Z
Answers.Text: is there possibly another way at this time to get 12 bit h.265? I'm having a hard time going through the process linked. Or if there is any other documentation you could recommend or just recommendations on how to go about figuring the prescribed method out. Anything like that would be appreciated.
Answers.UserDisplayName: kite
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-17T05:43:28.060Z
Answers.LastActivityDate: 2018-11-17T07:41:21.443Z
Answers.LastEditDate: 2018-11-17T07:41:21.443Z
Answers.UserDisplayName: Gyan
Body: <pre><code>ffmpeg -framerate 500/21 -i %d.png -i audio.wav -c:v libx264 -crf 0 -pix_fmt yuv422p10le -c copy output.mkv
  </code></pre>
  <p>I have the above command for converting a PNG sequence of images into 10 bit h.264 video file.</p>
  <p>I want to know: how do I modify it to render my PNG sequences as a 12 bit h.265 video? Or do I need a completely different command and what would that be?</p>
  <p>Aside:
  I noticed it in Handbrake, but I see a lot of complaints that Handbrake isn't as clean an encode as raw ffmpeg? I don't know if there's any basis to that or if I should just do it in Handbrake instead.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-17T05:49:46.930Z
Comments.Text: BTW your command, as written, isn't converting the images to H264 but simply storing them in the MKV. This is due to the `-c copy` at the end. Place it immediately after `audio.wav`
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-17T05:52:31.223Z
Comments.Text: oh okay I guess that makes sense. There any drawback to storing the images in the mkv? is it just large file size?
Comments.UserDisplayName: kite
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-17T05:53:23.973Z
Comments.Text: File size and playability on some players.
Comments.UserDisplayName: Gyan
Tags: <ffmpeg><h.265>
Title: How to render png's as h.265 12 bit video?
UserDisplayName: kite
ThreadText: # How to render png's as h.265 12 bit video?
  
  (Asked by: username_0 on 2018-11-17)
  
  ```
  ffmpeg -framerate 500/21 -i %d.png -i audio.wav -c:v libx264 -crf 0 -pix_fmt yuv422p10le -c copy output.mkv
  
  ```
  
  I have the above command for converting a PNG sequence of images into 10 bit h.264 video file.
  
  I want to know: how do I modify it to render my PNG sequences as a 12 bit h.265 video? Or do I need a completely different command and what would that be?
  
  Aside:
  I noticed it in Handbrake, but I see a lot of complaints that Handbrake isn't as clean an encode as raw ffmpeg? I don't know if there's any basis to that or if I should just do it in Handbrake instead.
  
  **Tags:** ffmpeg, h.265
  
  > **Comments:**
  > **username_1**: BTW your command, as written, isn't converting the images to H264 but simply storing them in the MKV. This is due to the `-c copy` at the end. Place it immediately after `audio.wav`  
  > **username_0**: oh okay I guess that makes sense. There any drawback to storing the images in the mkv? is it just large file size?  
  > **username_1**: File size and playability on some players.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-17. Score: 0 | Accepted answer
  
  Use
  
  ```
  ffmpeg -framerate 500/21 -i %d.png -i audio.wav -c:v libx265 -x265-params lossless=1 -pix_fmt yuv422p12le -c:a copy output.mkv
  
  ```
  
  You'll need a ffmpg with a libx265 that supports a bit depth of 12. At this time, I can't find such a precompiled binary so you'll have to compile ffmpeg using the auto-build script at <https://github.com/jb-alvarado/media-autobuild_suite>
  
  > **Comments:**
  > **username_0**: Why is it like -x265-params lossless=1? Can I use -crf 0 instead? or is h.265 a bit different? also i was always told to use -c copy instead of -c:a or any of the other copy audio variants.  
  > **username_1**: For x265, this is the syntax for lossless encoding.  
  > **username_0**: I'm getting an error and its changing to 10bit: Incompatible pixel format 'yuv422p12le' for codec 'libx265', auto-selecting form at 'yuv422p10le  
  > **username_1**: Get the latest ffmpeg binary from https://ffmpeg.zeranoe.com/builds/  
  > **username_0**: Getting same problem unfortunately. Testing on a sequence of seven 16 bit png numbered 1.png...etc without the audio bit: ffmpeg -framerate 24 -i %d.png -c:v libx265 -x265-params lossless=1 -pix_fmt yuv422p12le test.mkv  
  > **username_0**: is there possibly another way at this time to get 12 bit h.265? I'm having a hard time going through the process linked. Or if there is any other documentation you could recommend or just recommendations on how to go about figuring the prescribed method out. Anything like that would be appreciated.  
  > **username_2**: Is this easier now?  
  > **username_1**: My builds include libx265 with 12-bit support.  
  
  ---
  
  