FallingSnow / h265ize

A node utility utilizing ffmpeg to encode videos with the hevc codec.
MIT License
527 stars 81 forks source link

What libraries are required for bitdepth to work? #155

Closed Kazz3r24 closed 4 years ago

Kazz3r24 commented 4 years ago

I'm currently trying to get the --bitdepth argument to work and no matter what, if I try to use the argument in h265ize it's ignored, but works fine running standalone ffmpeg.

Currently running: ffmpeg 4.3-2~16.04.york1 h265ize 0.4.3-r2 x265 -V: x265 [info]: HEVC encoder version 1.9 x265 [info]: build info [Linux][GCC 5.3.1][64 bit] 8bit+10bit+12bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2

Using debug, I can see that "pix_fmt yuv420p" is the argument that's passed to ffmpeg instead of "pix_fmt yuv420p10le". I did see a disclaimer stating to either use an ffmpeg static build (I'm using the latest build) or have the correct libraries installed (what libraries?) x265_main10 or 12 do not exist as Ubuntu packages.

My server can clearly work with these bitdepths, the argument just isn't being passed properly to ffmpeg.

Kazz3r24 commented 4 years ago

I noticed in video.js that this block is commented out, I'm wondering if it should be uncommented so that h265ize can possibly not default to 8bit?

// Make sure we are only attempting to use 8 bit with fallback // binary // TODO // if (usingFallbackFfmpeg) { // let options = command._currentOutput.options.get(); // let selectedPixFmt = options[options.indexOf('-pix_fmt') + 1]; // if (selectedPixFmt !== 'yuv420p') { // return reject({ // level: 'error', // message: 'Bit depth about 8 bit are not supported by the fallback ffmpeg library. Try installing ffmpeg.' // }); // } // }

Kazz3r24 commented 4 years ago

I think I figured this out myself. Please update your readme.

Discovered via: https://github.com/FallingSnow/h265ize/commit/a0574d40098adae8a6b555a86be010c94e740048

There's a line that describes using --10bit or --12bit instead of the described --bitdepth # for setting the bitdepth. This appears to work properly. I'm now seeing -pix_fmt yuv420p10le properly being passed as an argument.