Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to decode HEVC files to YUV?

Tags:

ffmpeg

hevc

h.265

I would like to decode HEVC encoded files to YUV files.

Is there any simple way to do this yet? An executable would be nice but I would make do with source code that is easily compilable.

like image 675
NiRR Avatar asked Dec 26 '22 19:12

NiRR


1 Answers

It's as simple as (guide assumed linux, tweek it to your needs)

  1. Clone the official reference codec (the official-official is a svn-repo found at https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/trunk/ but a read-only git-repo that is kept in sync with the svn is provided by BBC which is so much easier to work with IMHO)

    git clone git://hevc.kw.bbc.co.uk/git/jctvc-hm.git
    
  2. To create the executables:

    cd jctvc-hm/build/linux && make -f makefile
    
  3. Binaries are now placed in

    jctvc-hm/bin
    
  4. Now, to decode a HEVC-encoded binary file into YCbCr, do

    ./TAppDecoderStatic -b encoded_file.bin -o reconstructed.yuv
    

If you are not on a linux system, just goto the build folder and you will hopefully find something you can use for your system:

$ cd jctvc-hm/build && ls
HM_vc10.sln  HM_vc8.sln  HM_vc9.sln  linux/  vc10/  vc8/  vc9/
like image 198
Fredrik Pihl Avatar answered Jan 07 '23 17:01

Fredrik Pihl