Ffmpeg - How Do I Convert 12-bit H.265 Videos To 10-bit ... - Super User

    1. Home
    2. Questions
    3. Tags
    4. Users
    5. Jobs
    6. Companies
    7. Unanswered
  1. Teams

    Ask questions, find answers and collaborate at work with Stack Overflow for Teams.

    Try Teams for free Explore Teams
  2. Teams
  3. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams How do I convert 12-bit H.265 videos to 10-bit H.265 without quality loss? Ask Question Asked 3 years, 5 months ago Modified 3 years, 5 months ago Viewed 2k times 0

My laptop seems unable to handle 12bit HEVC videos efficiently. The video appears to stagger when I play it so I'm looking to convert them to 10bit H.265. How do I do this using, ffmpeg, with little or no quality loss?

Edit: Okay so I managed to convert it from 12-bit to 10-bit but there is visible loss in quality on comparison. How do I maintain quality while converting to 10-bit output?

This is the command I used ffmpeg -i input.mkv -c:v libx265 -vf format=yuv420p10le -c:a copy output.mkv Should I try a specific -crf/cbr?

The enable/disable hardware acceleration option in media player didn't do well to play the 12-bit video.

Solved: Okay so the quality issue has been solved. I tried three commands and the all worked equally good.

The first ffmpeg -i input.mkv -c:v libx265 -crf 16 -vf format=yuv420p10le -c:a copy output.mkv This resulted in almost identical visual quality and the same size as the original video.

The second (by @harrymc) ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 out.mkv This one also resulted in equally good visual quality as the above but somehow, it reduced my file size to nearly half so it seems the best command of all three to me.

The third (by @Anmol Mishra), ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 23 -preset slow -tune grain out.mkv This too had no loss in visual quality that's apparent to naked eye and also reduced file size by a quarter.

Thank you everyone for help.

Share Improve this question Follow edited Jul 16, 2021 at 7:15 Sanchit asked Jul 14, 2021 at 11:24 Sanchit's user avatar SanchitSanchit 12 bronze badges 5
  • Did you try enabling/disabling hardware accelerated decoding? – llogan Commented Jul 14, 2021 at 16:58
  • @llogan How to enable/disable hardware accelerated decoding? I saw your answer on a similar question where you a gave command to convert 10-bit H.265 to 8-bit H.265. Can I change "vf- format=yuv420p" to something to get a 10-bit output? – Sanchit Commented Jul 15, 2021 at 4:57
  • @harrymc Your command works to convert the video into x264 output but I am looking for x265 10-bit output. – Sanchit Commented Jul 15, 2021 at 5:04
  • I deleted the previous erroneous comment. Try pix_fmt for specifying 10-bit, which requires rendering (not copy) like: ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 out.mkv. – harrymc Commented Jul 15, 2021 at 7:35
  • @Sanchit I was referring to your player. If you can improve playing then you don't need to re-encode. (I'm not too familiar with hardware accelerated decoding, so I'm unsure if there are any that can actually decode 12-bit HEVC, and I didn't research it, so it might be a moot point.) – llogan Commented Jul 15, 2021 at 16:29
Add a comment |

1 Answer 1

Sorted by: Reset to default Highest score (default) Date modified (newest first) Date created (oldest first) 0

You want to use a visual lossless equivalent crf and tune. Read the x265 page here - https://trac.ffmpeg.org/wiki/Encode/H.265 and here - https://forum.doom9.org/showthread.php?t=172458

ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v libx265 -crf 23 -preset slow -tune grain film out.mkv

x264 will get blocky while x265 will blur. To offset some of the blur, the -tune grain will bring in smaller detail. Do not try to modify other parameters unless you truly understand HEVC.

Depending on the space you have, you can test crf values from 20-23, I could not find much of a difference.

Share Improve this answer Follow answered Jul 15, 2021 at 15:24 moi's user avatar moimoi 3013 silver badges15 bronze badges Add a comment |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .

  • The Overflow Blog
  • Developers want more, more, more: the 2024 results from Stack Overflow’s...
  • How AI apps are like Google Search
  • Featured on Meta
  • The December 2024 Community Asks Sprint has been moved to March 2025 (and...
  • Stack Overflow Jobs is expanding to more countries

Linked

68 How do I convert 10-bit H.265 / HEVC videos to H.264 without quality loss? 6 Re-encode 4K video to H.265/HEVC with FFmpeg for playback in QuickTime 68 How do I convert 10-bit H.265 / HEVC videos to H.264 without quality loss? 0 How to convert flac inside mkv ffmpeg? 1 Every video converted with FFMPEG cannot be played on TV 1 Embedding a custom ICC profile in an MP4 with ffmpeg 2 Is it okay to re-encode videos from traditional lossless codec to modern lossless codec to save space and preserve quality?

Hot Network Questions

  • Can one appeal to helpfulness when asking a tween to do chores?
  • Did a peaceful reunification of a separatist state ever happen?
  • Can an intelligent agent with aims desire to modify itself to change those aims?
  • Luke 20:38 | "God" or "a god"
  • What does "first-visit" actually mean in Monte Carlo First Visit implementation
  • Can I make soil blocks in batches and keep them empty until I need them?
  • Returning a sequence from a function
  • If my mount were to attune to a headband of intellect, could I teach it common (to full understand and work with me as an Intelligent creature)?
  • Why is water leaking into my service panel through conduit from below?
  • Is it possible to manipulate or transform the input within an environment?
  • Example of a noncommutative idempotent semigroup which is not self-distributive.
  • How to print between " " value from XML file?
  • What does the nontriviality of the Hopf fibration tell us about the global phases of qubit states on the Bloch sphere?
  • Can I login into sddm as some user, not knowing their password, if I have sudo/root privileges?
  • Did the northern nation of Israel or the southern nation of Judah date their reigns using years beginning in the fall, from the beginning of Tishri?
  • Mama’s cookies too dry to bake
  • Is copper anti-seize good for aluminium?
  • Reason for poly1305's popularity?
  • No other coauthors, just me and my supervisors—is this normal?
  • A superhuman character only damaged by a nuclear blast’s fireball. What other modern or near future weapon could damage them?
  • In the case of CC-BY material, what should the license look like for a translation into another language?
  • References to "corn" in translations of the Jiuzhang Suanshu
  • Star ground or ground pour?
  • What is the provenance of "A fox jumped up one winter's night"?
more hot questions Question feed Subscribe to RSS Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Từ khóa » H 265 10 Bit Vs 12 Bit