Log in

View Full Version : Confusion over using decoders and encoders


dooley2009
1st November 2017, 02:51
I have been on a quest to accomplish one thing.... and I can't figure it out.

I want to find the best decoder to use when I am using FFmpeg and x265-10bit.

I convert x264 8 bit videos into H.265 HEVC 10 bit. I am trying to speed the process up as much as is possible and maximize the quality as that is more important to me than space. I'm sure someone will tell me that i am wishing for the stars here but I didn't know what to do at this point and really need help.

I have been running into a lot of encoding errors for example using this CLI

ffmpeg -y -hwaccel cuvid -c:v h265_cuvid -i <INPUT.mp4> -c:v libx265 -cq 21 -preset medium -profile:v main10 -x265-params sao=0:deblock=0:interlace=0:input-res=1920x1080:range=full:colorspace=rgb -c:a aac <OUTPUT.mp4>

I keep picking decoders and encoders that do not get along and i get all kinds of error codes. I really don't understand where I can go to research this exact topic. It is safe to say that I am under the impression that if I find a good decoder to use that it will speed up my efforts. Please correct me if I'm wrong.

Can anyone give me some direction and any opinions that you have on what is the current (today) top encoder and decoders?

Thank you in advance.

benwaggoner
1st November 2017, 18:47
If you have 8-bit source, it'll be safer and faster to just encode in 8-bit. Setting output to full range RGB 10-bit is doing a whole lot of interpolation from an 8-bit limited range 4:2:0 source. That's going from 12 bits per pixel to 30 bits per pixel, and ffmpeg's >8-bit filters just aren't that good or well documented. Also, that file is going to be a lot more challenging to decode. Just pass through the 8-bit limited range 4:2:0 as is. That should easily double your encoding speed while you're at it.

Turning off SAO and deblock from previously encoded sources likely will just increase bitrate; the detail those would nominally preserve likely isn't there in the first place.

I'd just go with -preset slower (which is where all the good stuff from HEVC gets turned on) without other parameters and see what you get.

dooley2009
2nd November 2017, 03:43
If you have 8-bit source, it'll be safer and faster to just encode in 8-bit. Setting output to full range RGB 10-bit is doing a whole lot of interpolation from an 8-bit limited range 4:2:0 source. That's going from 12 bits per pixel to 30 bits per pixel, and ffmpeg's >8-bit filters just aren't that good or well documented. Also, that file is going to be a lot more challenging to decode. Just pass through the 8-bit limited range 4:2:0 as is. That should easily double your encoding speed while you're at it.

Turning off SAO and deblock from previously encoded sources likely will just increase bitrate; the detail those would nominally preserve likely isn't there in the first place.

I'd just go with -preset slower (which is where all the good stuff from HEVC gets turned on) without other parameters and see what you get.


I am definitely going to give your idea's a spin. I have been thinking about the practicality of taking an 8 bit video with limited color range and catapulting it to full blown color and my only thought is that the technology is either available to do it efficiently and with good results or it is not (at least for the vast majority of us. ie $$$). I was just reading today that mixing presets with a lot of individual settings can cause real trouble as the preset itself can clash with them.

Anyways thank you very much and I hope some others will chime in on their experiences and personal preferences.

Cheers.