Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th June 2016, 14:07   #1  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
25i vs 50p (QTGMC) with x264 at the same bitrate

Got 25fps interlaced source (DVB, TV show).
What is better way to encode it with x264 at the same bitrate
- leave interlaced and encode with --tff option
- deinterlace with QTGMC with double frame rate (50fps progressive) and encode as progressive at the same bitrate as planned for 25i source ?

Did some short test. Took a part (6000 frames, 720*576, DAR 16:9, 25 fps), encoded with x264 as interlaced (--tff) at 1150 kbps. Did the same encode at 1150 kbps but after deinterlacing (QTGMC - Slower).

Put both output files through Avisynth Compare (PSNR)
Code:
Compare( orig_video.QTGMC(), video25i.QTGMC(), "", "25i")
Compare( orig_video.QTGMC(), video50p, "", "50p")
and got
Overall PSNR: 40.9617 for 25i (then deintelaced and compared to deinterlaced original) and
Overall PSNR: 41.0287 for 25p (compared to deinterlaced original)...

Doubling framerate do not lead to quality loss at the same bitrate ?
Livesms is offline   Reply With Quote
Old 5th June 2016, 16:14   #2  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
1- interlaced encoding usually is more efficient than encoding interlaced content as progressive, but it's still less efficient than encoding progressive content as progressive;
2- qtgmc include a denoiser, you can try with its losselss mode;
3- doubling framerate usually give almost identical couples of frames so don't take so much bitrate.
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 5th June 2016, 16:18   #3  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
Quote:
Originally Posted by Motenai Yoda View Post
1- interlaced encoding usually is more efficient than encoding interlaced content as progressive, but it's still less efficient than encoding progressive content as progressive;
2- qtgmc include a denoiser, you can try with its losselss mode;
3- doubling framerate usually give almost identical couples of frames so don't take so much bitrate.
1. I'm talking about encoding progressive as progressive (50p) and interlaced video as interlaced (--tff option for x264).
2. denoiser included with QTGMC enabled by default ?
3. Yes, deinterlacing with doubling framerate produce 2 almost indetial frames (with minimum difference) instead of 1 frame (interlaced with 2 fields).
Livesms is offline   Reply With Quote
Old 5th June 2016, 18:06   #4  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
Quote:
2. denoiser included with QTGMC enabled by default ?
qtgmc has a lot of stuff in it, you can find all about in the docs under Source Match / Lossless and Noise Bypass / Denoising
http://avisynth.nl/index.php/QTGMC
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 6th June 2016, 10:59   #5  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
Thanks. Tried to use denoise with QTGMC and got an error with dfttest.dll (will ask in QTGMC thread)

One more question - is there any avisynth plugin to provide comparing of two video as from visual quality (how similiar it looks to original in fact, not in ephemeral PSNR) ?
Livesms is offline   Reply With Quote
Old 8th June 2016, 23:06   #6  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Livesms View Post
1. I'm talking about encoding progressive as progressive (50p) and interlaced video as interlaced (--tff option for x264).
2. denoiser included with QTGMC enabled by default ?
3. Yes, deinterlacing with doubling framerate produce 2 almost indetial frames (with minimum difference) instead of 1 frame (interlaced with 2 fields).
In general, with a similarly good deinterlacer, native 25i encoding will provide better quality at a given bitrate than native 50p encode. The main advantage of encoding as deinterlaced is so that a particularly good offline deinterlacer can be used, and there is no dependence on the playback hardware having a good deinterlacer.

Still, there will certainly be content/bitrate combinations where 25i with a bad post-decoder deinterlacer will outperform 50p with a good pre-encode deinterlacer.

IIRC, in VC-1 we found a 20% advantage for 25i v. 50p in this case. It likely would be somewhat more for H.264 due to the availability of MBAFF.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 9th June 2016, 18:35   #7  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
sure I can't get access to the high pro test clip and encoders of yours but, I made a quick test with parkrun_ter, with
Code:
assumetff()
qtgmc(SourceMatch=3, Lossless=2,NoiseProcess=1, NoiseRestore=1.0, Sigma=2.0 )
and only assumetff()

codec settings
Code:
"%~dp0avs4x26x.exe" -L "%~dp0x264.exe" --pass 1 -B 6000 --preset slow -o NUL %1
"%~dp0avs4x26x.exe" -L "%~dp0x264.exe" --pass 2 -B 6000 --preset slow --ssim --psnr -o %1_qtgmc.mp4 %1

"%~dp0avs4x26x.exe" -L "%~dp0x264.exe" --pass 1 -B 6000 --tff --preset slow -o NUL %1
"%~dp0avs4x26x.exe" -L "%~dp0x264.exe" --pass 2 -B 6000 --tff --preset slow --ssim --psnr -o %1_interlaced.mp4 %1
ssim is calculated with ssim() for both, psnr is the one x264 calculated

results are
interlaced ssim 77.32887 psnr 36.083
qtgmc ssim 81.72833 psnr 37.444
__________________
powered by Google Translator

Last edited by Motenai Yoda; 9th June 2016 at 18:50.
Motenai Yoda is offline   Reply With Quote
Old 13th June 2016, 20:45   #8  |  Link
Livesms
Registered User
 
Livesms's Avatar
 
Join Date: Mar 2006
Posts: 184
All in all... got tons of DVB video - MPEG-2 (PAL), 720*576 (16:9), 25 FPS, Interlaced (TFF), ~3100 kbps

Need to reencode all video to free some space. Decided to reencode with x264 for 0.10 bit per pixel (~ 1100 kbps).

What way is better - reencode with x264 as interlaced or deinterlace it to progressive (50 fps) and reencode as progressive (50 fps) as the same 1100 kbps...
Livesms is offline   Reply With Quote
Old 14th June 2016, 06:36   #9  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Motenai Yoda View Post
results are
interlaced ssim 77.32887 psnr 36.083
qtgmc ssim 81.72833 psnr 37.444
I would expect that as fps goes up, SSIM and PSNR values that correlate with a given perceptual quality would go down.

There's probably no short cut to doing a visual comparison for this.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 15th June 2016, 12:24   #10  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
I've done another comparison with all four ldv's 576i25 sequencies
while x264 preserve deinterlaced one's "structure" better, combed parts seems to force it to mantain fine details/high frequencies (or generate some sort of grain).
https://www.sendspace.com/file/616xsx

likely with further high bitrate 25i will outcome 50p even on the structure
__________________
powered by Google Translator

Last edited by Motenai Yoda; 15th June 2016 at 12:26.
Motenai Yoda is offline   Reply With Quote
Reply

Tags
25i, 50p, interlaced, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.