can anyone tell me how to do 12 bit hevc encoding using ffmpeg
thanks in advance ^^
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 15 of 15
Thread
-
-
libx265 should support 12-bit encoding — according to my memory banks, at least
The problem is, I don't remember the "recipe"
Coincidence or not, this afternoon I re-discovered that 12-bit HEVC sample that I had created...
and it played fine through the latest MPlayer (and LAV Filters too )
Too bad I already deleted it : -/ -
libx265 may exist with routines to encode in 8 bit, 10 bit, and 12 bit component resolution. The question is whether ffmpeg is able to use them and deliver video formats they would expect. It will probably depend on the technique how the three variants can be linked into ffmpeg (either statically as multilib, or dynamically by selecting either libx265_main.dll or libx265_main10.dll or libx265_main12.dll as external encoder libraries). A separate x265 CLI encoder can do that. But I don't know if ffmpeg supports either way.
So if ffmpeg does not support it internally, at least it can pipe Y4M video into an additional x265 encoder, which can switch the internal bitdepth with the -D parameter. -
can u tell me what command line to use to encode in 10bit
cuz i tried using profile one but it doesn't work -
For a stand-alone x265 encoder, it would be --output-depth (-D). Try if ffmpeg supports that inside libx265opts; if not, pipe to x265.
-
You may try to use x265 trough ffmpeg invoking something like:
Code:ffmpeg -i "%1" -strict -1 -pix_fmt yuv420p10le -f yuv4mpegpipe - | x265 --y4m - --output-depth 10 --preset fast --crf 20 -o "%~n1.hevc"
-
-
As much as you can stuff into an ffmpeg command line to prepare the video source for the x265 encoder will have an impact on the output of x265. But x265 will produce only a raw HEVC video stream, nothing else. Multiplexing that into a supporting container, together with other content, has to be applied after the video conversion finished, in a second step. That would require a batch / shell script / any kind of sequencing.
-
I failed on this, it works partially so i would advise another pipe to container and later adding audio (another pipe?).
You must figure it by yourself - ffmpeg is a bit tricky under windows due syntax differences between linux and windows.
Bellow example works partially - i share it to show only basic principle how to do this kind of stuff - maybe it will be good to add another pipe stage with adding only audio.
Code:@ffmpeg -thread_queue_size 512 -i %1 -an -pix_fmt yuv420p -f yuv4mpegpipe - | x265 --y4m -p %preset% --crf 20 -t %tune% --input - --output - | ffmpeg -fflags +genpts -thread_queue_size 512 -i - -i %1 -map 0:v:0 -map 1:a:0 -c:v copy -c:a aac -strict experimental -b:a 320k -af "aresample=resampler=soxr:osr=48000:dither_method=0" -f mpegts %mpegts% -shortest -y %1.ts
-
Tools in a pipe chain often have the disadvantage to not knowing the whole input until it's complete and not being able to store optimal values into headers before reaching the end of the input. I would recommend to prefer specialists in building containers (e.g. MP4Box for *.mp4 or mkvmerge for *.mkv) over relying on ffmpeg working in a "filter" mode. There is a chance that ffmpeg may build a quite correct but somewhat incomplete container when used in a pipe chain.
(@ SO: If you may use the /!\ Report feature not only for reporting offending content, that may be the fastest way to summon one.)
Similar Threads
-
HEVC Hardware Decoding/Encoding
By jmdale1984 in forum Newbie / General discussionsReplies: 3Last Post: 7th Nov 2015, 22:58 -
Queries on HEVC encoding and decoding errors
By ironurn in forum Video ConversionReplies: 1Last Post: 16th Jul 2015, 02:34 -
GPU powered HEVC encoding is here, sort of.
By sophisticles in forum Video ConversionReplies: 15Last Post: 22nd Sep 2014, 11:25 -
Divx HEVC encoder now supports 4k encoding
By deadrats in forum Video ConversionReplies: 8Last Post: 14th Aug 2014, 00:23 -
NEW FFMPEG 2.1: native support for HEVC and VP9!!! :)))
By Stears555 in forum Video ConversionReplies: 3Last Post: 30th Oct 2013, 16:49