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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th February 2009, 17:06   #1  |  Link
photoguy123
the batteram battery
 
Join Date: Nov 2005
Posts: 38
Disabling PSNR and SSIM for performance

Anyone have an idea how disabling psnr could reduce performance 20% in ffmpeg/x264?

Also is it true that disabling ssim using ffmpeg is not possible?

Sample command line here:

FFMPeg.exe -y -i script.avs -f mp4 -s 240x144 -vcodec libx264 -crf 31 -acodec libfaac -ac 1 -ab 16k -threads 0 -coder 0 -subq 6 -me_method umh -g 250 -keyint_min 25 -sc_threshold 40 -refs 6 -flags -psnr +loop -qmin 10 -qmax 51 -qdiff 4 -rc_eq "blurCplx^(1-qComp)" -qcomp 0.60 -flags2 +mixed_refs -partitions +parti4x4+partp8x8+partb8x8 -me_range 16 -cmp +chroma -i_qfactor .71 -level 13 -bf 0 -bufsize 232KiB output.m4v

Only adding the -psnr flag reduces fps from around 217 to around 170.
photoguy123 is offline   Reply With Quote
Old 18th February 2009, 23:22   #2  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
Let me ask you a question.

What does psnr do?
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 19th February 2009, 01:02   #3  |  Link
cogman
The Crazy Idahoan
 
Join Date: Jun 2007
Location: Idaho
Posts: 249
No calculation is free. PSNR is a sort of statistical calculation to approximate how close a film is to the original. By disabling it (IE not putting in the -psnr flag) you tell x264 not to do that calculation on each frame. Hence, your encoding goes faster because you aren't wasting as much time worrying about measuring quality.
cogman is offline   Reply With Quote
Old 19th February 2009, 02:57   #4  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Except that makes absolutely no sense why photoguy123 lost 47 fps when he explicitly told ffmpeg not to calculate psnr.

Sounds like a bug to me.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 19th February 2009, 03:15   #5  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
Quote:
Originally Posted by photoguy123 View Post
Only adding the -psnr flag reduces fps from around 217 to around 170.
This gels with the command line posted. So I guess he made an error in his first sentence.
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 19th February 2009, 03:24   #6  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Audionut View Post
This gels with the command line posted. So I guess he made an error in his first sentence.
-psnr turns off PSNR
Dark Shikari is offline   Reply With Quote
Old 19th February 2009, 04:07   #7  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
Well that's backwards.
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 19th February 2009, 04:16   #8  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Yeah it does sound backwards! but its something that can't be changed now as it would cause even more confusion!

On a completely separate performance note, I'm very impressed with the encoding speed on my new Q9400, I'm getting twice the encoding speed as with my E6600. The E6600 was running at 3.0Ghz, the q9400 at 3.2ghz. Thats a comfortable overclock for me, especially considering its summer here! (the only thing I changed was the cpu). The reason why I point that out is that is scales pretty well.

Last edited by burfadel; 19th February 2009 at 04:22.
burfadel is offline   Reply With Quote
Old 19th February 2009, 04:17   #9  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Audionut View Post
Quote:
Originally Posted by Dark Shikari View Post
-psnr turns off PSNR
Well that's backwards.
FFmpeg uses "+" and "-" prefixes for its options. So "+psnr" would turn it on and "-psnr" does turn it off.

(Still the question how disabling a feature, which performs additional calculations, can make the encode go slower)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 19th February 2009 at 04:40.
LoRd_MuldeR is offline   Reply With Quote
Reply


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 00:16.


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