Hi folks,
So, I've just updated my older copy of Staxrip to 1.1.8.0 and run through the numerous codec configurations to achieve better quality Vs encoding time. (I found a pretty good guide here which explains a few things - http://www.digital-digest.com/articles/x264_options_page1.html)
The problem is - there is nothing to explain the 'Rate Control' or 'Video Usability Info'? Anyone got some solid experience/info on this or know where there's a good guide? (I've tried the whole German translated guide [which is very good] but again, is very vague on these sections.) 'Google' wasn't much help either.
I have taken the time running through each of the 'Analysis' and 'Frame Option' settings piece-by-piece to ensure good quality over encoding time, so I don't want to skimp out on the rate control.
Would appreciate any insight.
Thanks.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 156
Thread
-
-
regarding vui:
Video Usability Information set's some additional (mostly optional) infos for the decoder.
Video Usability Information (VUI) Guide
by Christian Heine ( sennindemokrit at gmx dot net )
1. Sample Aspect Ratio
-----------------------
* What is it?
The Sample Aspect Ratio (SAR) (sometimes called Pixel Aspect Ratio or just
Pel Aspect Ratio) is defined as the ratio of the width of the sample to the
height of the sample. While pixels on a computer monitor generally are
"square" meaning that their SAR is 1:1, digitized video usually has rather
odd SARs. Playback of material with a particular SAR on a system with
a different SAR will result in a stretched/squashed image. A correction is
necessary that relies on the knowledge of both SARs.
* How do I use it?
You can derive the SAR of an image from the width, height and the
display aspect ratio (DAR) of the image as follows:
SAR_x DAR_x * height
----- = --------------
SAR_y DAR_y * width
for example:
width x height = 704x576, DAR = 4:3 ==> SAR = 2304:2112 or 12:11
Please note that if your material is a digitized analog signal, you should
not use this equation to calculate the SAR. Refer to the manual of your
digitizing equipment or this link instead.
A Quick Guide to Digital Video Resolution and Aspect Ratio Conversions
http://www.iki.fi/znark/video/conversion/
* Should I use this option?
In one word: yes. Most decoders/ media players nowadays support automatic
correction of aspect ratios, and there are just few exceptions. You should
even use it, if the SAR of your material is 1:1, as the default of x264 is
"SAR not defined".
2. Overscan
------------
* What is it?
The term overscan generally refers to all regions of an image that do
not contain information but are added to achieve a certain resolution or
aspect ratio. A "letterboxed" image therefore has overscan at the top and
the bottom. This is not the overscan this option refers to. Neither refers
it to the overscan that is added as part of the process of digitizing an
analog signal. Instead it refers to the "overscan" process on a display
that shows only a part of the image. What that part is depends on the
display.
* How do I use this option?
As I'm not sure about what part of the image is shown when the display uses
an overscan process, I can't provide you with rules or examples. The safe
assumption would be "overscan=show" as this always shows the whole image.
Use "overscan=crop" only if you are sure about the consequences. You may
also use the default value ("undefined").
* Should I use this option?
Only if you know exactly what you are doing. Don't use it on video streams
that have general overscan. Instead try to to crop the borders before
encoding and benefit from the higher bitrate/ image quality.
Furthermore the H264 specification says that the setting "overscan=show"
must be respected, but "overscan=crop" may be ignored. In fact most
playback equipment ignores this setting and shows the whole image.
3. Video Format
----------------
* What is it?
A purely informative setting, that explains what the type of your analog
video was, before you digitized it.
* How do I use this option?
Just set it to the desired value. ( e.g. NTSC, PAL )
If you transcode from MPEG2, you may find the value for this option in the
m2v bitstream. (see ITU-T Rec. H262 / ISO/IEC 13818-2 for details)
* Should I use this option?
That is entirely up to you. I have no idea how this information would ever
be relevant. I consider it to be informative only.
4. Full Range
--------------
* What is it?
Another relic from digitizing analog video. When digitizing analog video
the digital representation of the luma and chroma levels is limited to lie
within 16..235 and 16..240 respectively. Playback equipment usually assumes
all digitized samples to be within this range. However most DVDs use the
full range of 0..255 for luma and chroma samples, possibly resulting in an
oversaturation when played back on that equipment. To avoid this a range
correction is needed.
* How do I use this option?
If your source material is a digitized analog video/TV broadcast it is
quite possible that it is range limited. If you can make sure that it is
range limited you can safely set full range to off. If you are not sure
or want to make sure that your material is played back without
oversaturation, set if to on. Please note that the default for this option
in x264 is off, which is not a safe assumption.
* Should I use this option?
Yes, but there are few decoders/ media players that distinguish
between the two options.
5. Color Primaries, Transfer Characteristics, Matrix Coefficients
-------------------------------------------------------------------
* What is it?
A videophile setting. The average users won't ever need it.
Not all monitor models show all colors the same way. When comparing the
same image on two different monitor models you might find that one of them
"looks more blue", while the other "looks more green". Bottom line is, each
monitor model has a different color profile, which can be used to correct
colors in a way, that images look almost the same on all monitors. The same
goes for printers and film/ video digitizing equipment. If the color
profile of the digitizing equipment is known, it is possible to correct the
colors and gamma of the decoded h264 stream in a way that the video stream
looks the same, regardless of the digitizing equipment used.
* How do I use these options?
If you are able to find out which characteristics your digitizing equipment
uses, (see the equipment documentation or make reference measurements)
then find the most suitable characteristics in the list of available
characteristics (see H264 Annex E) and pass it to x264. Otherwise leave it
to the default (unspecified).
If you transcode from MPEG2, you may find the values for these options in
the m2v bitstream. (see ITU-T Rec. H262 / ISO/IEC 13818-2 for details)
* Should I use these options?
Only if you know exactly what you are doing. The default setting is better
than a wrong one. Use of this option is not a bad idea though.
Unfortunately I don't know any decoder/ media player that ever even
attempted color/gamma/color matrix correction.
6. Chroma Sample Location
--------------------------
* What is it?
A videophile setting. The average user won't ever notice a difference.
Due to a weakness of the eye, it is often economic to reduce the number of
chroma samples in a process called subsampling. In particular x264 uses
only one chroma sample of each chroma channel every block of 2x2 luma
samples. There are a number of possibilities on how this subsampling is
done, each resulting in another relative location of the chroma sample
towards the luma samples. The Chroma Sample Location matters when the
subsampling process is reversed, e.g. the number of chroma samples is
increased. This is most likely to happen at color space conversions. If it
is not done correctly the chroma values may appear shifted compared to the
luma samples by at most 1 pixel, or strangely blurred.
* How do I use this option?
Because x264 does no subsampling, since it only accepts already subsampled
input frames, you have to determine the method yourself.
If you transcode from MPEG1 with proper subsampled 4:2:0, and don't do any
color space conversion, you should set this option to 1.
If you transcode from MPEG2 with proper subsampled 4:2:0, and don't do any
color space conversion, you should set this option to 0.
If you transcode from MPEG4 with proper subsampled 4:2:0, and don't do any
color space conversion, you should set this option to 0.
If you do the color space conversion yourself this isn't that easy. If the
filter kernel of the subsampling is ( 0.5, 0.5 ) in one direction then the
chroma sample location in that direction is between the two luma samples.
If your filter kernel is ( 0.25, 0.5, 0.25 ) in one direction then the
chroma sample location in that direction is equal to one of the luma
samples. H264 Annex E contains images that tell you how to "transform" your
Chroma Sample Location into a value of 0 to 5 that you can pass to x264.
* Should I use this option?
Unless you are a perfectionist, don't bother. Media players ignore this
setting, and favor their own (fixed) assumed Chroma Sample Location.
http://mewiki.project357.com/wiki/X264_Settings -
Hi Selur,
Thanks for this, I've a lot of reading to do by the looks of things.
There's obviously something not quite right with the settings I'm using. My source is a VOB file. (a TV program for the average 44mins or so.) I've set the output size to 400mb (instead of the standard 350mb) to give more quality to the encode - even though I'm using x264 and mp4. I've slightly cropped the source and reduced the frame size to 640x352 to give me a faily low error of just 0.11%, I'm using '2pass - x264 Film Medium' with an .mp4 container, I've set audio to AAC at a quality of 0.40 - which is more than enough and I have configured the codec as follows...
I've pushed subpixel refinement right up to '11: Full RD' (just to see what difference it would actually make to quality compared to '9: RD Refinement for all frames'. The M.E. Algorithm is set to: 'Multi-Hex' for better quality. M.E. Range is: 16. Chroma box is ticked. All partitions are ticked as recommended.
All 'Quant' options are ticked. Trellis is set to 'Always' for better quality. RD is 1.0, Trellis is .015. Weighted Pred. B Frames is ticked. Direct Mode is 'Auto'. Weighted Pred. P frames is set to 'Smart'. Noise Red. to '0'.
B Frame Options are: Adaptive = Optimal. Pyramid = normal. B-Frames = 4. Bias = 0.
Reference Frames = 5 (better quality). CABAC is ticked. Deblocking is ticked, both are set to -1 (sharp).
Rate Control was set to whatever the default settings were as I had no info on this.
After running 'compressibility check', I get a quality factor of 98% which is super. But the resulting file is just not as good as I know it should be. (It is very good, but I've seen others from a TV source which are better - and I'm encoding from the original vob?) The 'Filters' are the norm - deinterlace is on.
Would love to know what I'm doing wrong - before I start going down the route of trying the more complex MEGui.
Anyway any ideas?
Thanks in advance. -
I've slightly cropped the source and reduced the frame size to 640x352
It is very good, but I've seen others from a TV source which are better - and I'm encoding from the original vob?
Other than that there are tons of Avisynth filters that might help to:
a. to better deblocking of the source (has nothing to do with the inloop deblocker of x264)
b. do better deinterlacing (StaxRip is probably using Yadif if the source is normal interlaced and not telecine material)
c. do some filtering (sharpening, deringing,...)
Cu Selur -
slightly?!? from 720x480 to 640x352 ?? personally I would only crop and not to some resizing,.. (+ I would create an anamorphic encode)
Other than that there are tons of Avisynth filters that might help to:
a. to better deblocking of the source (has nothing to do with the inloop deblocker of x264)
b. do better deinterlacing (StaxRip is probably using Yadif if the source is normal interlaced and not telecine material)
c. do some filtering (sharpening, deringing,...)
I've just love to improve the quality a little bit - I know it should be better than it is.
Thanks. -
P.S., if I try to just crop the source a little (to remove black lines on either side) but I do not resize it, then instead of the original 720x480, I'm left with 716x480 - and that means that both the 'Width' and the 'SAR' (whatever SAR is?) in the middle of the screen in the 'Rezise section' are both in orange colour - indicating that I have some sort of a problem?
That's why I always resized the output down a little (to the standard 640x352 that most HDTV releases have). -
F8 should open the 'Project Options' if you enabled Aspect Ratio -> Auto Aspect Ratio Signaling, also I would set Output Mod to 2 not 16.
-
About PAR, DAR , SAR, read: https://en.wikipedia.org/wiki/Pixel_aspect_ratio
to the standard 640x352 that most HDTV releases have
Scene release standards to not aim for max quality, they aim for conformity.
Code:- Resolution: - - - WS HDTV and WS PDTV sources with greater than 720px horizontal res must - - be cropped as needed and resized to 720px width and mod2 height to - - maintain proper AR. - - - WS PDTV sources with horizontal source res of 720-704px must be cropped - - as needed and only height must be resized to the proper anamorphic AR - - using mod2. Upscaling/downscaling is forbidden. - - - All other sources, including FS HDTV, must be cropped as needed and - - resized to 640px width and mod2 height to maintain proper AR. - - - When cropping, remove everything that is not actual picture, including - - black or other colored borders, duplicate lines, and full-time tickers. - - Removing or retaining fading edges is at capper's discretion and shall - - not be considered undercropped or overcropped. - - - In the case of varying crops, crop to the most common frame size (e.g. - - pitch/primary view in sports). - - - Actual picture area may be over- or under-cropped by 1px maximum per - - side. More than 1px on any side is considered a technical flaw. - - - Encoded Video resolution must be within 2% of the original aspect ratio - - To calculate AR error (%): (Original AR - Release AR)/Original AR * 100 - - OAR = (SourceWidth-CropLeft-CropRight)/(SourceHeight-CropTop-CropBottom)- - Release AR = EncodedWidth / EncodedHeight - - -
WS PDTV',...
Cu SelurLast edited by Selur; 7th Dec 2012 at 13:13.
-
OK - so I now know what DAR, SAR & PAR are. But how do I know which is right for the encode I'm tring to achieve. Every time I change the Pixel Aspect Ratio, all other fields also change - so how do I know what is right if the source is a vob 720x480?
I assume this is what you were getting at when you mentioned creating an anamorphic encode - but I don't know how to do that unless you can talk me through the 'Image Options' settings?
Thanks for your help. -
-
Are you sure source is interlaced ? If it's a TV series like an episodic drama , 99% chance it is not - unless it's a soap opera or variety show. Deinterlacing will seriously degrade the image . You should IVTC .
... if the source is normal interlaced and not telecine material...
-----------------------------------
But how do I know which is right for the encode I'm tring to achieve.
but I don't know how to do that unless you can talk me through the 'Image Options' settings?
Cu Selur -
-
-
Holy crap - you know a sh*t lot about Staxrip for someone who never used it. Any chance you could upload the content of your head and allow me to absorb? I've love to be sh*t hot at encoding and while I've come a long way from years ago (I started in Hell) - I'm still only scratching the surface. Some bloke out there should start online courses or something!
-
-
That's what I was afraid of. I know I'm doing (a lot of) things wrong, but it's not for the want of trying to improve. There's shag-all of a comprehensive, updated and decent, easy to follow, plain English guide (for Staxrip) out there to learn all of the necessary settings and skills to get me to within 50% (probably 10%) of the knowledge of you guys - hence the plea's for help.
I'm encoding another file now (using IVTC) and a few other setting to see if the outcome is any less butchered - probably not.
In the interim, if you guys could share any worthwhile info (even if it was to stop using Staxrip in favour of something else - something that doesn't require a phD or a 'Masters' to operate, but has really good guides so I could teach myself - I'd appreciate it. What do you guys use? -
And people think that I'm the 'second coming' just because I can reimage machines and build my own pc! (Granted, they're all 60+yrs old and used to B&W tvs. I'm talkin' to JC himself............your "own encoding tool". Christ, I can't even get the most out of Staxrip. Must download your tool just to look at the GUI. You never know, you might hear by brain explode from where you are
-
What do you guys use?
, but has really good guides so I could teach myself
I have to admit, I stopped writing real guides too, since I simply lack the time,... and I wrote some really extensive guides (in german) back in the days,... iirc. my 'MeGui Essentials' was around 160 pages long. Nowadays I don't have the time and motivation to write a guide for my own program, partially because I know that it would require far more pages than my old MeGui guide. (btw. I would prefer MeGui over StaxRip)
btw. RipBot264 might be a nice GUI for you, it's usage rather limited, but for your purpose it might be worth a try.
You never know, you might hear by brain explode from where you are
Cu Selur -
I don't use GUI's . Just avisynth + x264
The problem is any autoanalysis tool is going to make mistakes. Are you just going to keep on guessing or a dozen different encodes until you encode it "properly" ?
My advice is to start learning some avisynth basics - How to examine fields. What is the difference between interlaced and telecined? Start with those things -
Ok, maybe I should just give this avisynth a shot - coz I'm sick of "blindly tweaking" things and waiting an hour to see the result - only to be disappointed with the encode! Do I just do a Google search, or do you know of where I can find a comprehensive guide to avisynth - that explains things properly?
PS, the encode of a larger pixel size (716x480) and using IVTC instead of Deinterlace just finished. The quality looked a bit sharper, but the aspect ratio was off (very tall skinny people on screen) and some of the quick movements were quite jagged?
I was going to ask what 'FeildDeinterlace', '(Yadiff)', 'Select Even', 'Select Odd', and 'TomsMoComp' were, but if I run with avisynth - maybe I'm better off not knowing? -
That's the thing. Many tools actually use avisynth in the backend. You should examine the script preview (picture) BEFORE encoding, so you don't waste any time. If the script preview is already b0rked at that stage, no amount of encoding settings will fix your encode. The encoder can only encode what it's being "fed" . If you know it b0rked, you can take steps to correct it. Right now you're flying "blind"
Unfortunately there aren't any good guides that I know of.
http://avisynth.org/mediawiki/Main_Page#New_to_AviSynth_-_start_here
This is like a mini-guide to get you started
http://neuron2.net/faq.html#analysis
PS, the encode of a larger pixel size (716x480) and using IVTC instead of Deinterlace just finished. The quality looked a bit sharper, but the aspect ratio was off (very tall skinny people on screen) and some of the quick movements were quite jagged?
I was going to ask what 'FeildDeinterlace', '(Yadiff)', 'Select Even', 'Select Odd', and 'TomsMoComp' were, but if I run with avisynth - maybe I'm better off not knowing?
SelectEven or Odd jsut throws away 1/2 the frames from a bob deinterlacer (ie. single rate deinterlace). TomsMoComp is an older deinterlacer that applies post processing (quality isn't very good) . You'll learn what those things actually mean once you start learning about avisynth basics
The AR issue is because you didn't use the correct --sar setting (that is an encoder setting) -
The AR issue is because you didn't use the correct --sar setting (that is an encoder setting)
-
btw. http://www.animemusicvideos.org/guides/avtech31/ is a rather good source about some basics
-
Thanks guys. (BTW: There is no "encode anamorphic" button anywhere.) I'll read through what you've both listed above, try out a few things and post back in a few days hopefully. Thanks to you both for your help & time - hopefully I can progress things a little.
-
Ok, I have no doubt that it is "just me" somehow, but this avisynth stuff seems to suck - A LOT. A lot of the so-called "guides" out there are way too advance for beginners. I even consulted youtube to get some tips for beginners - but I can't even get started?
I've downloaded avisynth & virtualdubmod and put them both into separate folders (C:\Program Files (x86)\AviSynth 2.5) & (C:\Program Files (x86)\VirtualDubMod). After about 15 minutes of searching, I found an old .avi file I had (because nothing I've read so far tells me if avisynth can handle a different source like vob, mp4, mkv). Anyway, I created a new 'folder' on my C drive and put the avi file in there and called it 'myclip'. I then (within that folder) opened a new text document and called this 'test.avs'. The problem here is that the new text document icon didn't change to that avisynth kind of icon that has something like a movie negative squiggle - it remained as a normal text document icon? I opened the text document with word pad and typed in my first command - avisource("c:\folder\myclip.avi"), I closed and saved the changes. The icon still didn't change like it does in the guides or on youtube?
I then opened virtualdubmod (all of this is following a simple youtube beginners video by the letter) and when I tried to open the test.avs file - I get an error to say that it can't open the file?
I've tried a similar process with an mkv file, and mp4 file and a .vob file - all have the same outcome?
I've spent about an hour trying to get it to work - but it's impossible. Maybe everyone would use avisynth and swear by it as being one of the best out there - if there were decent guides which were easy to follow and actually worked. Instead, I just wasted an hour of my life that I'm never going to get back! I've no idea why the new text document labelled test.avs won't open in virtualdubmod - but I'm done trying to figure this out. #disaster -
I've no idea why the new text document labelled test.avs won't open in virtualdubmod - but I'm done trying to figure this out.
It took me a few hours reading the old avisynth wiki back when I started with avisynth to get a basic understandig how things work. (to be frank I did know my way around the basics of video encoding and processing beforehand)
After that I was able to use basic scripts and even after years of using avisynth, there are still scripts like MRestore that are simply to complex to understand for me (I can use such scripts but I really do not understand them, probably because I lack the drive to spend hours to understand them and read up on the stuff I would need to read to understand them) , but hey I get along.
-> for those people who don't have the drive to learn on how to use Avisynth&co other people write graphical frontends, that normally offer some options. Sure one can use avisynth + the right filters + encoder of your choice just in a command line, but most people don't. Personally I only use a bunch of filters and only do more advanced stuff only if it it worth the effort and than it can happen that I tweak at a script a whole day and I'm not stuck at some basic stuff.
Cu Selur
Ps.: btw. your old avisynth file probably couldn't be handled because your system lacks the appropriate vfw decoders needed to handle the script. (DirectShowSource uses Direct Show Filters, Avisource uses vfw filters to open up a source) -
I was scared to touch avisynth for years . So confusing at first . I use it almost everyday, it's so useful for even basic manipulations. Most people associate it with the uber complex scripts - but it's useful for even basic tasks
1st thing you should do is ditch vdubmod - it hasn't been updated in a few years and can cause problems . Use vdub or avspmod to preview scripts
Use notepad instead of wordpad for scripts, or better yet start learning to use avspmod (it's going to be way more useful in the long run - you can preview script in different tabs, multiple other functions, sliders , macros). Push f5 to see the preview
opened a new text document and called this 'test.avs'. The problem here is that the new text document icon didn't change to that avisynth kind of icon that has something like a movie negative squiggle
Similar Threads
-
how to change frame rate on staxrip?
By VistaXP in forum Video ConversionReplies: 6Last Post: 6th Apr 2011, 14:13 -
Need Help With StaxRip Settings For Exact Quality?
By skorpinok in forum Video ConversionReplies: 1Last Post: 29th Aug 2010, 11:36 -
staxrip & volume control
By Danneauxsvh in forum Video ConversionReplies: 0Last Post: 4th Jul 2010, 09:17 -
Which settings for StaxRip and DVD => mkv (x264) ?
By QUEENFAN in forum DVD RippingReplies: 1Last Post: 23rd Dec 2009, 12:34 -
Best settings for VHS Rips useing STAXRIP
By contactadam2002 in forum Video ConversionReplies: 3Last Post: 25th Jun 2009, 17:33