Log in

View Full Version : Preset settings


meshaun
4th January 2012, 04:09
I am using the Shark's DXVA_HD_Extra quality profile and i want to know if this profile makes video 's that are playable on XBOX/WDTV/PS3 and other devices.
Can i get a list of devices that encodes with this profile are able to played on?

Keiyakusha
4th January 2012, 05:09
I never saw this profile but to me it seems obsolete. DXVA is a PC technology for decoding stuff using GPU. I think current video cards can decode any h264 video without restrictions (at least nvidia ones). Well, maybe the purpose if that profile is compatibility with some old hardware, who knows. But anyway, by knowing that - it is possible but there is no guarantee that the file will be playable on something that is not PC. You should post the exact settings of that profile and then someone who knows the restrictions of mentioned hardware can tell for sure if it will work.

meshaun
4th January 2012, 06:59
General
Complete name : E:\Homevid.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 1.44 GiB
Duration : 1h 56mn
Overall bit rate mode : Variable
Overall bit rate : 1 773 Kbps
Encoded date : UTC 2012-01-03 06:03:26
Tagged date : UTC 2012-01-03 06:03:26

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1h 56mn
Bit rate : 1 514 Kbps
Maximum bit rate : 8 217 Kbps
Width : 1 280 pixels
Height : 528 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.093
Stream size : 1.23 GiB (85%)
Writing library : x264 core 120 r2120 0c7dab9
Encoding settings : cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1514 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=50000 / vbv_bufsize=50000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2012-01-03 06:03:26
Tagged date : UTC 2012-01-03 06:04:21

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 1h 56mn
Bit rate mode : Variable
Bit rate : 256 Kbps
Maximum bit rate : 272 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 213 MiB (14%)
Language : English
Encoded date : UTC 2012-01-03 06:04:00
Tagged date : UTC 2012-01-03 06:04:21


These are the Mediainfo

Audionut
5th January 2012, 00:30
These are the Mediainfo

Maximum bit rate : 8 217 Kbps

With that max bitrate, it should be fine.

To ensure compatibility with WDTV and PS3, you'll need to adjust both of these for future encodes,

vbv_maxrate=50000 / vbv_bufsize=50000

To 38000.

For XBOX, I think it has a limit of 14000 or something. Will have to wait for someone who has better knowledge to comment on that.


keyint=250 / keyint_min=23 /qpmin=10


I see these settings in a lot of NFO files. qpmin I could understand if the intent was to limit the encoder. But the keyint settings are spastic. MeGUI needs to be fixed.

meshaun
5th January 2012, 01:07
well, thanks for the reply.
So using the least maxbuffer shall do it?

LoRd_MuldeR
5th January 2012, 01:24
H.264 hardware decoders (like those devices you mention in your first post) have a certain maximum H.264 Level (http://en.wikipedia.org/wiki/H.264#Profiles) and Profile (http://en.wikipedia.org/wiki/H.264#Levels) that they support.

To ensure compatibility with a specific hardware decoder (player), lookup its maximum supported Level@Profile and configure x264 to use at most this Level and Profile.

If you need to support multiple devices, you will have to encode for a Level@Profile that is supported by all your target devices.

Note that H.264 Levels and Profiles are defined by the H.264 standard. Presets, however, are a feature of x264 to allow easier tweaking of x264's "quality -vs- speed" options.

Thus the "Presets" (as used by x264) are not directly related to the resulting H.264 Levels and Profiles...

Also note that you can enforce a specific Profile and/or Level by using the "--profile" and/or "--level" options. At the same time, a preset can be select with "--preset".

Last but not least: When using "--level" to get a specific H.264 Level, x264 may throw a warning that your video's frame size or frame rate is too high for the selected Level!

In that case you will have to resize and/or change the video's framerate prior to encoding. Reszing can be done by x264 directly, by using "--vf resize:witdh:height".

BTW: "DXVA_HD_Extra" is not the name of any x264 Preset. I assume it is a "Preset" not for x264 itself, but for one of the various x264 GUI's. (maybe MeGUI ?)

(Anyway, I would recommend to stick with x264's built-in Preset system nowadays!)

meshaun
5th January 2012, 08:06
Thanks for the replies and also for the knowledge shared.

hello_hello
5th January 2012, 17:15
I see these settings in a lot of NFO files. qpmin I could understand if the intent was to limit the encoder. But the keyint settings are spastic. MeGUI needs to be fixed.

I was under the impression they were to enable reasonable seeking using hardware players.
I've always encoded using them myself. Next time I encode a video I'll have to try it without them to see how the Bluray player copes. I'm fairly sure using --bluray-compat gets x264 to automatically adjust keyint.

keyint (http://mewiki.project357.com/wiki/X264_Settings#keyint)
"The default setting is fine for most videos. When encoding for Blu-ray, broadcast, live streaming or certain other specialist scenarios you may require a significantly smaller GOP length (often ~1x fps)."

They're also recommended here when encoding for Bluray.
Authoring a professional Blu-ray Disc with x264 (http://sites.google.com/site/x264bluray/home/1080i-p)

hello_hello
5th January 2012, 17:29
BTW: "DXVA_HD_Extra" is not the name of any x264 Preset. I assume it is a "Preset" not for x264 itself, but for one of the various x264 GUI's. (maybe MeGUI ?)

I'm fairly sure he's referring to old MeGUI presets which haven't been used in a long time and have nothing to do with x264's own presets.

MeGUI still has the the ability to configure the encoder and save the configuration as a preset, but the pre-configured presets it used to install have been replaced by a "target device" option in the x264 configuration dialogue. The "Target Device" and the "Tuning" options, combined with x264's own presets should be all that 99.9% of users need to worry about (aside from setting quality or file size). Once you've configured them you can still save the setup as a MeGUI preset.

meshaun probably should delete all those old presets. I think many of them are outdated.

After resetting the MeGUI x264 configuration dialogue to x264 defaults and changing the target device option, here's what the MeGUI command line looks like for a few devices (I just left the default CRF value of 20).

Bluray:
program --level 4.1 --bluray-compat --crf 20 --open-gop --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --output "output" "input"

Xbox:
program --level 4.1 --crf 20 --vbv-bufsize 24000 --vbv-maxrate 24000 --output "output" "input"

PS3:
program --level 4.2 --crf 20 --vbv-bufsize 31250 --vbv-maxrate 31250 --output "output" "input"

WDTV:
program --level 4.1 --crf 20 --output "output" "input"

As I mainly encode to ensure Bluray player compatibility while using an MKV container (for others in the house, I use a PC myself) I configure x264 "manually" instead of using MeGUI's Bluray target device option as I've had aspect ratio issues on occasion when using --bluray-compat and encoding DVDs. I posted about it here (http://forum.doom9.org/showthread.php?p=1511452#post1511452) (sorry about the unrelated "industry standards" nonsense which followed as obviously it didn't have anything to do with the topic)

Audionut
5th January 2012, 22:47
I was under the impression they were to enable reasonable seeking using hardware players.

As a general rule of thumb, keyint should be 10x framerate, and min-keyint should be at framerate.

So for 24fps (23.976 if you want to be pedantic) material, the settings should be 240/24, not 250/23.

hello_hello
6th January 2012, 06:39
Sorry, I think I misunderstood what you were getting at earlier when you referred to those settings. However....

According to the x264 Wiki, for Bluray encoding keyint should be around 1x the frame rate and the keyint settings meshaun posted actually seem to be x264's defaults. I just ran a couple of little test encodes on a music video clip remuxed at different frame rates. Firstly using x264 defaults (I checked the log file just to make sure MeGUI wasn't getting excited and adding anything extra to the command line) which resulted in the following:

23.976fps - keyint=250 / keyint_min=23 (which are the same keyint settings meshaun posted)
24fps - keyint=250 / keyint_min=24
25fps - keyint=250 / keyint_min=25
29.97fps - keyint=250 / keyint_min=25

After adding "--bluray-compat" to the command line:
23.976fps - keyint=24 / keyint_min=2
24fps - keyint=24 / keyint_min=2
25fps - keyint=25 / keyint_min=2
29.97fps - keyint=25 / keyint_min=2

Anyway it seems by default x264 uses keyint=250 regardless of the frame rate and keyint_min uses a formula based on keyint I don't fully understand yet, so if anything's "spastic" I guess it's x264 and not MeGUI.
Anyone understand how fps factors into this formula?
min-keyint (http://mewiki.project357.com/wiki/X264_Settings#min-keyint)
Default: auto (MIN(--keyint / 10,--fps))

As a side note I'd have assumed, all else being equal, I could take the same video, remux it at multiple frame rates and the resulting encode of each would be exactly the same in size.... given the number of frames is exactly the same. However that's not what happened. Using the default x264 settings each time the resulting file sizes were:
23.976fps - 27.0MB
24fps - 27.0MB (it was actually a couple of KBs smaller than the first)
25fps - 26.6MB
29.97fps - 24.7MB
I assume it must be something to do with motion and the way it's compressed which I don't really understand.

Oh well, at least I have some little encodes now I can use for testing how much keyint effects my Bluray player's ability to seek. If it doesn't make a huge difference I'll drop the keyint setting and use x264's defaults. There's no doubt it makes a difference to the file size (or the --bluray-compat option does). Very roughly, my little standard definition encodes increased in size by around 1MB per minute when compared to using x264's defaults.

sneaker_ger
6th January 2012, 07:06
Anyway it seems by default x264 uses keyint=250 regardless of the frame rate and keyint_min uses a formula based on keyint I don't fully understand yet, so if anything's "spastic" I guess it's x264 and not MeGUI.
Anyone understand how fps factors into this formula?
min-keyint (http://mewiki.project357.com/wiki/X264_Settings#min-keyint)
Default: auto (MIN(--keyint / 10,--fps))

MIN(x, y) means that either x or y gets used, depending on which is smaller.
So if keyint/10 is smaller than the fps, it is used, and vice versa.

As a side note I'd have assumed, all else being equal, I could take the same video, remux it at multiple frame rates and the resulting encode of each would be exactly the same in size.... given the number of frames is exactly the same. However that's not what happened. Using the default x264 settings each time the resulting file sizes were:
23.976fps - 27.0MB
24fps - 27.0MB (it was actually a couple of KBs smaller than the first)
25fps - 26.6MB
29.97fps - 24.7MB
I assume it must be something to do with motion and the way it's compressed which I don't really understand.

x264's bitrate distribution is framerate aware. It will lower the bitrate on higher framerates, because each frame is shown for a shorter amount of time, making it more difficult to see artifacts.
http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=22bfd310abced4df0b11c9620b152e5cfe746d43

hello_hello
6th January 2012, 09:55
MIN(x, y) means that either x or y gets used, depending on which is smaller.
So if keyint/10 is smaller than the fps, it is used, and vice versa.

I think I get it.... obviously for 23.976 video x264 is rounding the frame rate down rather than up and using keyint_min 23 instead of 24.

Just for fun I ran a couple of test encodes again (using my 4 minute SD video at 23.976fps) with x264 defaults (250/23) and setting keyint manually (240/24). The second was 546 bytes smaller but I guess when encoding a complete HD movie it might reduce the file size marginally.
On the other hand setting Bluray as the target device in Megui increased the file size by 4.6MB so I guess I'll be investigating whether I really need to be using it.

x264's bitrate distribution is framerate aware. It will lower the bitrate on higher framerates, because each frame is shown for a shorter amount of time, making it more difficult to see artifacts.
http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=22bfd310abced4df0b11c9620b152e5cfe746d43

I figured it must be something like that. Cheers.

Blue_MiSfit
6th January 2012, 10:34
Shorter GOPs are useful to make seeking faster and more accurate. This matters for BluRay, hence the 1 second limitation. This isn't TOO much of a hit to compression (at such high bitrates), though using the x264 defaults of 250 frames max GOP is definitely an improvement. If you get down below a half second GOP you start to really suffer, and maybe even see keyframe pumping.

Derek

sneaker_ger
6th January 2012, 10:49
Just for fun I ran a couple of test encodes again (using my 4 minute SD video at 23.976fps) with x264 defaults (250/23) and setting keyint manually (240/24).

250/23 and 240/24 are so close together I wouldn't bet on any big difference.

"--bluray-compat gets x264 to automatically adjust keyint" is not true, btw.

hello_hello
6th January 2012, 18:43
"--bluray-compat gets x264 to automatically adjust keyint" is not true, btw.

Damn! I was all ready to argue with you till I checked the log file. ;)

When selecting Bluray as the target device MeGUI displays this as the command line:

program --level 4.1 --bluray-compat --crf 20 --open-gop --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --output "output" "input"

So I assumed the keyint setting was being applied automatically by x264. However looking at the log file it includes:

--[Information] [7/01/2012 4:30:03 AM] [Blu-ray]: changing --keyint to 25

--[Information] [7/01/2012 4:30:03 AM] Job commandline: "C:\Program Files\MeGUI\tools\x264\x264.exe" --level 4.1 --bluray-compat --crf 20 --keyint 25 --open-gop --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --sar 1:1 --output "E:\video.mkv" "E:\video.avs"

So yeah it looks like MeGUI is adding the keyint setting itself. Which I suppose makes sense if it can't add it to the command line when you initially setup the encoder options due to the keyint value needing to change according to the frame rate.

So yes it appears I made an incorrect assumption there and it's MeGUI, not x264 setting the keyint value.

sneaker_ger
7th January 2012, 10:41
I would love to Encode so that I am able to play my encoded file on PS3, Popcorn Hour, WD & XBOX 360. For this, what are going to be the settings? Or, Is there a profile by SHaRKTOOTH's MeGUI Presets?
And also, is AC3 audio compatible with these? Or AAC?
to play in the above mentioned devices, should I use .mp4 or .mkv?

Especially Help me with the Sharktooth's Megui prests or ready-made preset's because it's much easier that way to encode. I don't have a Huge Knowledge on making profiles except that I know to change some settings in the x264 using Megui.



Just open up MeGUI's (might need the development version) "x264 *scratchpad*" and set the following:
http://www.abload.de/img/megui_xboxng5na.png
You can set "tuning" to "film" for live action movies, "grain" for very grainy movies or "animation" for cartoon like movies, or you can just leave it as is.

The XBox 360 seems to be the lowest common denominator here. If you want to play those files directly from a USB stick or a hard drive you have to use the mp4 container and stereo aac audio IIRC, as the Xbox 360 does not support multi-channel aac audio and both the Xbox 360 and the PS3 don't support mkv files (directly). If you are fine with streaming over LAN (DLNA), you might get away with using the mkv container and multi-channel ac3 audio.

meshaun
7th January 2012, 11:31
Thanks for the response.
What would be better? AC3 or AAC? .mkv or .mp4?

sneaker_ger
7th January 2012, 11:37
I already answered that in my post. Read it again.

hello_hello
8th January 2012, 14:24
Aside from what sneaker_ger has said, AAC would be a better choice for quality/file size than AC3.

Personally I much prefer using MKV than MP4 as it's more versatile (it holds a lot more formats) but I don't use a PS3 or Xbox for playback so I don't need to worry about MKV compatibility.

meshaun
9th January 2012, 13:03
Aside from what sneaker_ger has said, AAC would be a better choice for quality/file size than AC3.

Personally I much prefer using MKV than MP4 as it's more versatile (it holds a lot more formats) but I don't use a PS3 or Xbox for playback so I don't need to worry about MKV compatibility.


The only advantage in mkv is that it holds more formats? that's it? And also AC3? I thought that AC3 and mkv over AAC MP4 were more compatible with devices

hello_hello
10th January 2012, 07:01
I don't know much about MP4 as I don't use it, but yes you can put almost anything in an MKV container. Not so much MP4.

As far as I know MP4 is far more widely supported than MKV in hardware devices, although that's probably more true when it comes to portable devices such as phones or the PS3 or as far as I know, pretty much anything made by Apple. Bluray players, media players in TVs and most other dedicated media players seem to be happy with MKV.

Don't take it as gospel though as I've not been on a mission to keep up with which devices support which formats, but I'd be fairly willing to bet any device which can play MKVs will happily play MP4s, whereas there are definitely devices which are MP4 only.

kypec
10th January 2012, 07:35
Don't take it as gospel though as I've not been on a mission to keep up with which devices support which formats, but I'd be fairly willing to bet any device which can play MKVs will happily play MP4s, whereas there are definitely devices which are MP4 only.
I second that opinion - MKV has been adopted by media player manufacturers much later than MP4 which is de facto an industry standard format. AFAIK MP4 doesn't support graphical subtitles, only text so you basically need to convert every DVD or BD subtitles into text format (MP4Box muxes SRT just happily) beforehand.

benwaggoner
10th January 2012, 21:11
For XBOX, I think it has a limit of 14000 or something. Will have to wait for someone who has better knowledge to comment on that.
Xbox 360's Dashboard decoder uses a hybrid CPU/GPU pixel shader decoder, which makes it a funky-if-fast software decoder.

The promised max bitrate is 10 Mbps for (IIRC) any <=1080i30 Level 4.0 content. But higher bitrates can and do work, depending on the specifics of the encoding settings, like other software decoders. General "fast software decoding" recommendations will increase the max bitrate that will play back smoothly.

And like other software decoders, if a bit of the video is too hard to decode, you'll get some dropped frames, but nothing disasterous will happen.

benwaggoner
10th January 2012, 21:28
A few things I'd like to note:

Xbox 360 won't decode AAC with more than stereo channels
You can use a 2 sec GOP with Blu-ray with Level 4.0 and a 15M peak. With some tweaking, you could have a bitstream compatible with BD, PS3, and Xbox 360.
A 10 sec Open GOP encode can make seeking with the Xbox 360 kinda painful.
You can totally put subtitles into MP4, using either a text track or (better) TTML. It's up to the player whether or not it displays it.