Mpeg2 to h.265 Settings

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Kensei
Posts: 3
Joined: Mon Dec 01, 2014 9:07 pm

Mpeg2 to h.265 Settings

Post by Kensei »

Hi,

I recently discovered Handbrake, and I'm very pleased with it. I'm a beginner in this area, and enjoy the simplicity.

I have MPEG2 files on my computer that I want to compress, but without loosing picture quality.

File source is as follow :
Size ~5 GB, Length ~ 55 minutes
Video: MPEG2 Video 1920x1080 29.97fps [V: mpeg2 main, yuv420p, 1920x1080]
Video
ID : 33 (0x21)
Menu ID : 1 (0x1)
Format : MPEG Video
Format version : Version 2
Format profile : Main@High
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=15
Codec ID : 2
Duration : 55mn 47s
Bit rate mode : Variable
Bit rate : 11.2 Mbps
Maximum bit rate : 24.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.180
Time code of first frame : 00:00:00;00
Time code source : Group of pictures header
Stream size : 4.37 GiB (92%)
Audio does not matter, I will use the pathru option.

I first used the setup below :
Picture :
* Anamorphic : Strict (I want to keep source size)

Filters :
* Detelecine : Off (To keep framerate)
* Decomb : Deinterlace - Bob
* Denoise : Off
Deblock : Off

Video :
Video
Codec : H.265 (x265)
Framerate : Same as source / Constant

Optimise video
x265 preset : Very Fast
x265 tune : None
h.265 profile : Main
Extra options : none

Quality
Avg bitrate : 2500 Kbps - 2 pass encoding

-> I am not very fond of the result. The picture is a bit more coarser (blurred). Suspect the Deinterlace is responsible, but I'm not sure. I can provide some pictures.

Do you think if I set Decomb to Decomb - default I will have a better result ? Yadif seems good when I enable it on Media Player Classic. Is it better ?

I'm considering an increase of the framerate to 3000kbps also.

Am I doing it wrong ? Any tips ?

Thank you very much for your help
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: Mpeg2 to h.265 Settings

Post by Smithcraft »

Why would you have deinterlacing on, with what appears to be a progressive source?

SC
JackNF
Enlightened
Posts: 114
Joined: Fri Feb 06, 2009 4:59 pm

Re: Mpeg2 to h.265 Settings

Post by JackNF »

There is a significant difference between deinterlace-bob and decomb-bob. Deinterlace-bob (what you appear to have used) will perform a simple bob on each field while decomb-bob will do a smart bob which should give better quality. If you want ~60fps output then decomb-bob is what you want for best quality, while if you want ~30fps output then decomb-default is what you want.


Smithcraft, maybe I'm missing something but what makes you say this would be a progressive source? All I see in the logs is mention of mpeg2 1920x1080 @ 29.97fps, no mention of whether its interlaced or progressive although in my experience most of the video I've come across that meets that description (broadcast TV, output from early prosumer-level HD video cameras) do tend to be interlaced.
Kensei
Posts: 3
Joined: Mon Dec 01, 2014 9:07 pm

Re: Mpeg2 to h.265 Settings

Post by Kensei »

Hi,

The source is a 1080i file. On fast scenes, deinterlacing is necessary.

I tried a few settings, (the best move was switching to decomb-default) I never get close to the original picture quality, unless I set the x265 preset to "VerySlow", but then my computer takes like a week for a 1h video :( . Overall the picture is ok, but the details are not all there. There is blur.
Is that a normal behavior ? Whatever I do, it seems that 3500-4000Kpbs is the good bitrate. I tried 10000 for fun, it did not change something.

Thanks
JackNF
Enlightened
Posts: 114
Joined: Fri Feb 06, 2009 4:59 pm

Re: Mpeg2 to h.265 Settings

Post by JackNF »

Well the x265 encoder handbrake uses is still quite new, very much a work in progress meant primarily for testing. You might try a test encode using the much more mature x264 encoder also in Handbrake just to see if it's a problem with the source or with x265. There's going to be quite a bit of further development and improvement in x265 over the next few years, but they're still quite near the start of it.

Also you might try a single-pass constant quality encode. It's much faster (one pass instead of two) and targets a given picture quality (using however many bits needed to achieve the target quality) rather then trying to eek out the most quality from within an allotted average bitrate like your two-pass encodes are doing.
Kensei
Posts: 3
Joined: Mon Dec 01, 2014 9:07 pm

Re: Mpeg2 to h.265 Settings

Post by Kensei »

These are good advice. I'll keep you posted.

Thanks you :)
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: Mpeg2 to h.265 Settings

Post by Smithcraft »

JackNF wrote:Smithcraft, maybe I'm missing something but what makes you say this would be a progressive source? All I see in the logs is mention of mpeg2 1920x1080 @ 29.97fps, no mention of whether its interlaced or progressive although in my experience most of the video I've come across that meets that description (broadcast TV, output from early prosumer-level HD video cameras) do tend to be interlaced.
MediaInfo would typically indicate the scan type which would be either interlaced or progressive. I have found from my limited experience that if it doesn't list either, that it's progressive. Since it was not listed in the MI report, it therefore assumed it was progressive, despite the frame rate.

SC
Post Reply