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 10th July 2009, 18:04   #41  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Quote:
If you wanna have x264 encode at the max speed too (as was the case on my system here), you might wanna go for sth like --bframes 0 --subme 5 and remove the --no-cabac. That caused no slowdown for me whatsoever in comparison to ultrafast's defaults.
You'd better keep bframes too. They usually reduce bitrate by 20% at the same quality (cabac is "only" 10%, deblocking is 10% also).
__________________
Manao is offline   Reply With Quote
Old 10th July 2009, 18:05   #42  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
Quote:
Originally Posted by stanleyhuang View Post
Hoping some people can free themselves from prejudices.
not sure what you mean. But I know that CPU encoding is where its at, and GPU encoding is still in its infancy and can't compete with x264 in its current form. When I see slides from Nvidia and ATI and review sites that GPU encoding is 5 times faster than CPU encoding and there is no mention of image quality, that makes me kinda angry.

So I'm just trying to provide proof.

Quote:
Originally Posted by stanleyhuang View Post
What I was thinking is that you are using a more advanced CPU and a less advanced GPU.
Not sure how you would measure that.

Quote:
Originally Posted by stanleyhuang View Post
BTW: I think you can use MediaCoder to do benchmark for both x264 and CUDA H.264 encoder. This will eliminate the difference in decoding.
That's a good idea but as in business they say, you can't make everyone happy, I fear I would get flamed for that too for trying to advertise mediacoder
St Devious is offline   Reply With Quote
Old 10th July 2009, 18:25   #43  |  Link
dj_tjerk
Registered User
 
Join Date: Jun 2008
Posts: 15
Quote:
Originally Posted by Manao View Post
You'd better keep bframes too. They usually reduce bitrate by 20% at the same quality (cabac is "only" 10%, deblocking is 10% also).
Maybe so, but in my case --bframes 1 with --no-cabac and --subme 0 caused it to slow down to about 108 fps (whereas setting --bframes 0 and --subme 5 and removing --no-cabac caused no slowdown whatsoever from my maximum). So I got subme and cabac for "free".

St Devious however chose to set bframes 1 before changing anything else, eventhough with his goal of comparing quality at the same speed (i.e. maximum possible speed), he should've enabled cabac and subpixel refinements, since those would've most likely caused x264 to encode at the same speed as cuda (assuming his system behaves the same as mine does).
dj_tjerk is offline   Reply With Quote
Old 10th July 2009, 18:49   #44  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
Quote:
Originally Posted by dj_tjerk View Post
St Devious however chose to set bframes 1 before changing anything else, eventhough with his goal of comparing quality at the same speed (i.e. maximum possible speed), he should've enabled cabac and subpixel refinements, since those would've most likely caused x264 to encode at the same speed as cuda (assuming his system behaves the same as mine does).
I am under the impression that presets override any settings. is that the case ?
St Devious is offline   Reply With Quote
Old 10th July 2009, 18:52   #45  |  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 St Devious View Post
I am under the impression that presets override any settings. is that the case ?
Nope. Presets don't overwrite anything! If a preset is selected, it is applied first. Then all explicit options are applied (and may overwrite what the preset has set).

In other words: Instead of starting from the defaults, we start from the selected preset. But that's all.

Maybe you are thinking of the new "--profile" option (which is applied after the explicit options). That option does overwrite your settings, as it enforces a certain level!
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 10th July 2009 at 18:56.
LoRd_MuldeR is offline   Reply With Quote
Old 10th July 2009, 19:08   #46  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
Quote:
Originally Posted by LoRd_MuldeR View Post
Presets don't overwrite anything! If a preset is selected, it is applied first. Then all explicit options are applied (and may overwrite what the preset has set).
ok then I will try to set the same option as the preset ultrafast in the MeGUI x264 settings GUI
St Devious is offline   Reply With Quote
Old 11th July 2009, 05:00   #47  |  Link
stanleyhuang
MediaCoder author
 
stanleyhuang's Avatar
 
Join Date: Sep 2005
Location: Shanghai
Posts: 65
Quote:
Originally Posted by St Devious View Post
not sure what you mean.
I mean the people claiming that you intend to make these benchmarks to advertise something. I hope they can be a bit open-minded.

Quote:
That's a good idea but as in business they say, you can't make everyone happy, I fear I would get flamed for that too for trying to advertise mediacoder
That's likely. ;-)
So every word should be neutral here.
__________________
When things work together, things work.
MediaCoder makes audio and video things work.
stanleyhuang is offline   Reply With Quote
Old 11th July 2009, 06:03   #48  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
I'm comparing now with best quality that each encoder can provide at a certain bitrate.

Using this video

1080p VBR Video Quality Test Streams
Sony HDW-F900 footage, 1080p@25, 18 Mbps average, 30 Mbps peak in a 35 Mbps Transport Stream (259,534,064 bytes)

on this page http://www.w6rz.net/

Encoding both encoders to 4Mbps and 6 Mbps.

Using 2 pass unrestricted HQ profile in Megui, would extra quality provide some better quality ?

And here are the settings for CUDA encoder in Mediacoder. Please let me know what to set to compare to match x264


Last edited by St Devious; 11th July 2009 at 06:07.
St Devious is offline   Reply With Quote
Old 11th July 2009, 06:12   #49  |  Link
stanleyhuang
MediaCoder author
 
stanleyhuang's Avatar
 
Join Date: Sep 2005
Location: Shanghai
Posts: 65
The CUDA H.264 encoder in current release doesn't support 2-pass mode yet.
__________________
When things work together, things work.
MediaCoder makes audio and video things work.
stanleyhuang is offline   Reply With Quote
Old 11th July 2009, 06:29   #50  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
Quote:
Originally Posted by stanleyhuang View Post
The CUDA H.264 encoder in current release doesn't support 2-pass mode yet.
i meant used 2 pass unrestricted HQ for x264.

But How can i configure the CUDA encoder to provide maximum quality ?

Here is an update, click on the images to get full size 1920x1080 image

x264 @ 6 Mbps


CUDA @ 6 Mbps



Source


Mediainfo

Source
Code:
Video
ID                               : 49 (0x31)
Menu ID                          : 1 (0x1)
Format                           : MPEG Video
Format version                   : Version 2
Format profile                   : Main@High
Format settings, Matrix          : Default
Duration                         : 2mn 7s
Bit rate mode                    : Variable
Bit rate                         : 32.5 Mbps
Nominal bit rate                 : 30.0 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16/9
Frame rate                       : 25.000 fps
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.628
Stream size                      : 493 MiB (92%)

x264
Code:
Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L5.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 5 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 2mn 7s
Bit rate mode                    : Variable
Bit rate                         : 6 000 Kbps
Maximum bit rate                 : 16.6 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16/9
Frame rate mode                  : Constant
Frame rate                       : 25.000 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.116
Stream size                      : 90.9 MiB (100%)
Writing library                  : x264 core 68 r1179M 96e2229
Encoding settings                : cabac=1 / ref=5 / deblock=0:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / 
chroma_qp_offset=-2 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=6000 / ratetol=1.0 /
 qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
CUDA
Code:
Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L5.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 2 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 2mn 7s
Bit rate mode                    : Variable
Bit rate                         : 6 035 Kbps
Maximum bit rate                 : 42.0 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 4/3
Frame rate mode                  : Constant
Frame rate                       : 25.000 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.116
Stream size                      : 91.4 MiB (100%)

Last edited by St Devious; 11th July 2009 at 14:03.
St Devious is offline   Reply With Quote
Old 11th July 2009, 07:28   #51  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
@St Devious: your x264 and your CUDA Screenshot link to the same picture,... (CUDA should be: http://www.picturepush.com/public/1958118)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 11th July 2009, 08:17   #52  |  Link
RunningSkittle
Skittle
 
RunningSkittle's Avatar
 
Join Date: Mar 2008
Posts: 539
Levels are different in the x264 image as well.
RunningSkittle is offline   Reply With Quote
Old 11th July 2009, 14:04   #53  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
Quote:
Originally Posted by Selur View Post
@St Devious: your x264 and your CUDA Screenshot link to the same picture,... (CUDA should be: http://www.picturepush.com/public/1958118)

thanks, corrected it now.

Quote:
Originally Posted by RunningSkittle View Post
Levels are different in the x264 image as well.
what do you mean ?
St Devious is offline   Reply With Quote
Old 11th July 2009, 14:20   #54  |  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 St Devious View Post
what do you mean ?
He talks about luminance levels, I think!

http://forum.doom9.org/showthread.php?t=143689

But I'm not so sure whether this is a level problem, because the "black" intensity looks identical in both screenshots.
Typically you would get "black" vs. "dark gray" when comparing pictures of different luminance levels, but that's not the case here.
Looks more like something is wrong with the color intensities. Look at the red shirt and the cyan bag!
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 11th July 2009 at 14:25.
LoRd_MuldeR is offline   Reply With Quote
Old 11th July 2009, 14:21   #55  |  Link
buba king
Linux Guy
 
buba king's Avatar
 
Join Date: Oct 2001
Posts: 113
Quote:
Originally Posted by St Devious View Post
what do you mean ?
The colors are different in the x264 screen shot... probably a bad color conversion somewhere.
buba king is offline   Reply With Quote
Old 11th July 2009, 14:26   #56  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
MeGUI had me add ConvertToYV12() at the end of script, is that a problem ?
St Devious is offline   Reply With Quote
Old 11th July 2009, 14:54   #57  |  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 St Devious View Post
MeGUI had me add ConvertToYV12() at the end of script, is that a problem ?
Nope. That's because x264 doesn't accept anything but YV12() data. But you should use the very same source script for both encoders
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 11th July 2009, 15:12   #58  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
Quote:
Originally Posted by LoRd_MuldeR View Post
Nope. That's because x264 doesn't accept anything but YV12() data. But you should use the very same source script for both encoders
hmm.. didn't think that way. Guess that may have invalidated the above images.

Will encode with an avisynth script when i get home tomm.

btw what about Stan's suggestion of using Mediacoder to encode with both CUDA and x264 ? that wa decoders should be the same.

Last edited by St Devious; 11th July 2009 at 15:17.
St Devious is offline   Reply With Quote
Old 11th July 2009, 15:23   #59  |  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 St Devious View Post
btw what about Stan's suggestion of using Mediacoder to encode with both CUDA and x264 ? that wa decoders should be the same.
Given that MediaCoder really uses the same decoders, processing and colorspace conversion for both encoders

I'd go with Avisynth to be 100% sure that the source data is identical for both encoders!

The less steps there are between your source and the encoder, the less things can corrupt your results.

Directly feeding the source into the encoder from Avisynth (using the identical script) is the most reliable method.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 11th July 2009 at 15:29.
LoRd_MuldeR is offline   Reply With Quote
Old 11th July 2009, 15:30   #60  |  Link
St Devious
Hardware Aspirin
 
Join Date: Jul 2007
Posts: 461
Quote:
Originally Posted by LoRd_MuldeR View Post
Given that MediaCoder really uses the same decoders, processing and colorspace conversion for both encoders

I'd go with Avisynth to be 100% sure that the source data is identical for both encoders!

The less steps are between your source and the encoder, the less things can influence/corrupt your results.

Directly feeding the source into the encoder from Avisynth (using the identical script) is the most reliable method...
thanks.

How does the decoding happen ?

Like what will Mediacoder and MeGUI use to decode the avisynth file ?

And how does the avisynth file decode the .ts source file ?
St Devious is offline   Reply With Quote
Reply

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 10:32.


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