VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. can anyone tell me how to do 12 bit hevc encoding using ffmpeg

    thanks in advance ^^
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    8 and 10bit yes, but 12bit ffmpeg does not yet exist.

    Scott
    Quote Quote  
  3. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    libx265 should support 12-bit encoding — according to my memory banks, at least
    The problem is, I don't remember the "recipe"

    Originally Posted by El Heggunte View Post
    FWIW --- I've already sent yet another e-mail to the Strongeners =^.^=

    And for the curious: yes, x265 can generate 12-bit streams as well --- confirmed by MediaInfo

    The problem is, so far only TAppDecoder is able to decompress the damn thing
    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 : -/
    Quote Quote  
  4. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    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.
    Quote Quote  
  5. ffmpeg is somehow limited on h.265 encode - some flags are ignored - i would search other way o encode h.265 than ffmpeg.
    Quote Quote  
  6. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    In this case: Pipe Y4M from ffmpeg (or other sources) to x265.
    Quote Quote  
  7. can u tell me what command line to use to encode in 10bit
    cuz i tried using profile one but it doesn't work
    Quote Quote  
  8. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    For a stand-alone x265 encoder, it would be --output-depth (-D). Try if ffmpeg supports that inside libx265opts; if not, pipe to x265.
    Quote Quote  
  9. Originally Posted by aniruddh View Post
    can u tell me what command line to use to encode in 10bit
    cuz i tried using profile one but it doesn't work
    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"
    Didn't try but should work, don't forget about 10bit x265 version.
    Quote Quote  
  10. okay thanks would try
    Quote Quote  
  11. Originally Posted by pandy View Post
    Originally Posted by aniruddh View Post
    can u tell me what command line to use to encode in 10bit
    cuz i tried using profile one but it doesn't work
    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"
    Didn't try but should work, don't forget about 10bit x265 version.
    well it worked now is there a way to add other code lines as well with this one
    like -filter complex one
    adding audio and other things
    Quote Quote  
  12. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    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.
    Quote Quote  
  13. Originally Posted by aniruddh View Post
    well it worked now is there a way to add other code lines as well with this one
    like -filter complex one
    adding audio and other things

    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
    Quote Quote  
  14. Are there any moderators around?
    Quote Quote  
  15. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    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.)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!