VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 24 of 24
Thread
  1. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    Hey! there all
    I'm a newbie to this forum. I would really appreciate if some of you folks help me out in suggesting me with the best H264 compression setting for movie footage. I'm not into hard compression the affects the quality of the output video. I would prefer a normal compression setting that which doesn't affect the quality of the video. My movies are in Uncompressed AVI format. I'm using MEGUI. Is it any good?

    Please reply.
    Quote Quote  
  2. Hi.
    There's really no magic setting. The rule of thumb is to pick a quality you're happy with, an appropriate tuning (ie tune film) and use the slowest speed preset you can stand. Hardware player support for High Profile, Level 4.1 is pretty much the norm these days. The CRF value used to set the quality is called "targeting quality" or "constant quality" in MeGUI's x264 encoder configuration, depending on whether you have "show advanced settings" checked or not. I don't know why it has two names, but they do the same thing. They both set the CRF value.

    CRF18 is roughly where the x264 encoder is considered to be "transparent" but some people are happy with higher values (lower quality and smaller file sizes) while others prefer even lower CRF values (higher quality and larger file sizes). I doubt too many people go below CRF16 though. You'd just need to decide what you're happy with. Generally you can get away with higher CRF values for higher resolutions. I mostly use CRF18 for 720p or lower and CRF20 for 1080p, but that's just me.

    I use MeGUI myself, but most free GUI's encode with the same x264 encoder. If you use CRF encoding the file sizes will vary quite a bit from encode to encode. It depends how hard the video is to compress. The quality will be consistent though.
    Quote Quote  
  3. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    Thanks for the reply.
    I'll give it a shot!
    Btw, what tune setting must I keep for sports?
    Quote Quote  
  4. The "tune film" option tends to retain a fraction more fine detail than "tuning none", but when you're using high quality CRF values the tunings don't necessarily make much of a visual difference, if any at all. I use "tune film" for just about everything. If something is really grainy I'd be more likely to use a noise removal filter in the script and tune film than I would be to use tune grain without noise removal.
    If a sports broadcast is full of compression artefacts and not a lot of fine detail, the effect of "tune film" over "tune none" might be to re-encode the compression artefacts more accurately, so "tune none" might look better. It depends on the source, but as I said, at decent CRF values the visual difference between tunings tends to be quite small.

    In my opinion, there's really no free lunch. Any setting change that increases the quality in some way will very likely increase the bitrate, just as increasing the quality will (using a lower CRF value).
    It's probably possible to tweak settings that effect how a particular video is encoded.... keeping more detail in flat background areas compared to foreground objects or similar such things.... but that's the sort of tweaking you'd probably have to do on a per video basis, and probably more effective if you're not wanting to change the bitrate at all (ie when using 2 pass encoding at a fixed bitrate and you want to try to tweak the quality a little without the file size changing).

    Is your sports video interlaced? It tends to be, and if it is, when you open the video in MeGUI's script creator and enable de-interlacing, it defaults to "Yadif" as the de-interlacing method. That de-interlaces to "normal" frame rate. 25fps progressive for PAL or 29.970 progressive for NTSC. If you use "Yadif with Bob" as the de-interlacing method instead, it'll de-interlace to 50fps or 59.940fps, and motion will look much smoother. For 1080i I'd use "Yadif with Bob" de-interlacing and resize to 720p. If your sports video isn't interlaced, you can ignore all of that.
    Last edited by hello_hello; 5th May 2016 at 09:50.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Someone should thank this Bob fellow for working with this Yadif fellow to get things so smooth!

    Scott
    Quote Quote  
  6. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    I pretty much moved on from trying to decide a bitrate, long, long ago, and many other settings, etc. I just use CRF, and couldn't be happier - and I don't care what the file size results in. I just accept it given that I'm using quality based encoding. Sometimes it's a bit big in bitrate, but I understand that it was a high complexity clip, but many times the file size is very small too, and I know I saved bitrate.

    Quality based encoding is based on physics, very much like signal processing, and is one of the few things that has changed my life for the better in this hobby/field, and even career.

    Some points were well covered by H/H, but let me input too.

    -I also - almost always - encode with quality based, and almost always go with crf=18.

    -I personally encode with x264 straight from the command line these days with ready-to-go batch files. But, if you want a GUI, I'd say HandBrake for simplicity, and MeGUI for the more advanced. Both excellent.

    -I always use the film tune for everything. I stopped testing this long ago since no other seems to do better IMO with another tuning. Even with interlaced sporting events.

    -These days, especially since processors got so much faster, I always deinterlace with QTGMC(). Also, I double the frame rate (if 29.97/25.0 fps) for smooth motion and better quality. Yes, QTGMC() is slower than all, but very thorough and effective for high quality. However for film sources take care to properly detelecine.

    -I don't need to deinterlace if it's for blu-ray.

    -I've been using High Profile, with Level 4.1 too, for years now, and see no reason to change. I also keep the original resolution most of the time (unless I need a specific standard for, say, blu-ray).

    Wow, other than a move to batch scripts about 2-3 years ago, and much more usage of QTGMC(), I've noticed that nothing's changed here for years with me regarding x264 encoding! Things are really smooth and stable here for me.
    I hate VHS. I always did.
    Quote Quote  
  7. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    I don't know if I can ask this question here, but seeing you guys are familiar with filters & stuff I think it's best that I do. Could you guys suggest me some of the best & common Avisynth filters for increasing brightness, color & saturation.
    Quote Quote  
  8. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    Hey hello_hello
    I also have few doubts about the h264 codec settings, that i will point out one by one:

    1. which AVC profile is the best for quality?

    2. What is the 10bit encoding used for?

    3. which of these presets are best for quality: slower, very slow & placeibo?

    4. In the Frame-Type tab, what is the interlaced mode for?

    5. In the Misc tab, What is the V.U.I settings used for & what it is the force SAR for?

    6. Lastly in the Nero AAC audio settings, what AAC profile should i keep for best quality & are there any other settings to be tweaked?
    Quote Quote  
  9. 1. AVC profile: High is best and the others should only be used for compatibility with older devices.

    2. 10 bit gets you better quality at a lower bitrate but is not playable on many devices, but works fine on PC with the requisite codecs or player.

    3. Placebo is pointless, except for testing. Very slow is best but takes a long time. Use Medium for most encodes and Slow or Very Slow only if you have the time.

    4. I believe this is used when the source is interlaced and maintains interlaced video. Else you'd get a progressive video with interlacing artifacts

    5.

    6. Keep in mind MeGUI down-mixes multi-channel audio to stereo by default. This can be adjusted. Also since audio files are not huge compared to video, I usually use a bitrate of >192k for 2 channel audio and >384k for 5.1
    Last edited by blud7; 9th May 2016 at 17:36.
    Quote Quote  
  10. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    I'm asking about the AAC LC & HE AAC. Which one is the best?
    Quote Quote  
  11. HE AAC is best for very low bitrates, LC is fine otherwise.
    Quote Quote  
  12. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    For HD TV Rips?
    Quote Quote  
  13. Just use LC and you'll be fine.
    And if it's a TV rip, try the high profile @lvl 4.1, CRF of ~21 should do.
    Last edited by blud7; 9th May 2016 at 17:38.
    Quote Quote  
  14. In addition to what blud7 said:

    Originally Posted by yukukuhi View Post
    Hey hello_hello
    I also have few doubts about the h264 codec settings, that i will point out one by one:

    1. which AVC profile is the best for quality?
    It's more about keeping the video compatible with various devices. Use High Profile, or leave it on auto and let the encoder decide. I think it'll always use High Profile, except for the Ultra Fast preset.
    https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
    Same with the level. The encoder will choose anything from level 3 to level 4.1 (maybe 4.2) depending on the resolution. I use Level 4.1 for everything myself, regardless of resolution, as all the players in our house support High Profile, level 4.1.

    Originally Posted by yukukuhi View Post
    2. What is the 10bit encoding used for?
    Higher precision. Almost nothing aside from a PC will play it. It's goes a long way to preventing colour banding though. You'll probably have to wait until x265 is mainstream for 10 bit to be mainstream.

    Originally Posted by yukukuhi View Post
    3. which of these presets are best for quality: slower, very slow & placeibo?
    Placebo is a waste of time, but other than that, the slower the preset the better the quality might potentially be for a given CRF value. It's a case of diminishing returns though. I generally only use the Slow preset myself, but my PC's a bit old.

    Originally Posted by yukukuhi View Post
    4. In the Frame-Type tab, what is the interlaced mode for?
    For encoding interlaced video. If video is interlaced, common procedure is to de-interlace it, which makes it progressive, and encode it that way, so you don't need to set an interlaced mode. An interlaced frame is divided into two fields. TFF = top field first. BFF = bottom field first. When you encode a video as interlaced a player should know to de-interlace it on playback. If you don't de-interlace interlaced video at some stage:
    https://trac.handbrake.fr/wiki/DeinterlacingGuide
    https://en.wikipedia.org/wiki/Interlaced_video#Interlacing_problems
    Most content created today is progressive but there's still a lot of older interlaced content about. It's mostly referred to as "video" (ie interlaced NTSC or PAL) as opposed to "film" which is progressive.
    And 1080i is still used quite a bit for sports broadcasts.

    Originally Posted by yukukuhi View Post
    5. In the Misc tab, What is the V.U.I settings used for & what it is the force SAR for?
    "Force SAR" forces a particular "sample aspect ratio". SAR is another way of describing the PAR or pixel aspect ratio. If the "SAR" is 1:1 the pixels are considered "square" and the resolution is the same as the display aspect ratio. When the "SAR" isn't 1:1 the pixels aren't "square" and the resolution and display aspect ratios are different. That's why a 720x480 NTSC DVD can display as both 4:3 and 16:9. The "SAR' or pixel aspect ratios are different even though an NTSC DVD is always 720x480.
    SAR is generally not anything you have to worry about. MeGUI always sets it for you and it'll always be 1:1 unless you're using anamorphic encoding in MeGUI's script creator when you're encoding an anamorphic source such as a DVD. Without anamorphic encoding, enabling resizing will always resize a video to "square pixel" dimensions. ie SAR 1:1.

    It's fun and games because there's different pixel aspect ratios (SARs) used for DVDs. Check out the list here:
    https://www.doom9.org/showthread.php?p=1058927#post1058927

    V.U.I = Video Usability Info. Those settings have no effect on the way a video is encoded, they only provide information for a player to use on playback, which it'll often ignore anyway. If you must set anything, make sure you know it's correct, otherwise don't set anything at all, but the only one I'd bother with is "Colour Matrix".
    High definition = bt709, PAL = bt470gb and NTSC = smpte170m.
    http://www.chaneru.com/Roku/HLS/X264_Settings.htm#Video_Usability_Info

    Originally Posted by yukukuhi View Post
    6. Lastly in the Nero AAC audio settings, what AAC profile should i keep for best quality & are there any other settings to be tweaked?
    LC-AAC. The other modes are for particularly low bitrates. HE-AAC removes harmonics and "fakes" them on playback to improve quality at low bitrates.
    https://en.wikipedia.org/wiki/Spectral_band_replication
    https://en.wikipedia.org/wiki/High-Efficiency_Advanced_Audio_Coding
    Anything that supports AAC will play LC-AAC correctly. A player that doesn't support HE-AAC will still play the audio, but without any high frequencies.

    I use LC-AAC with the variable bitrate mode and the default quality of Q0.5.
    Thinking about it, if the AAC profile is left on automatic, the encoder will switch to one of the other modes if the bitrate/quality you specify is quite low, otherwise it'll be LC-AAC. At a quality of Q0.5 it'll always be LC-AAC. There's really nothing else to tweak.
    Last edited by hello_hello; 10th May 2016 at 17:26.
    Quote Quote  
  15. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    Uber thanks for an uber explanation hello_hello.

    And forgot to do add this doubt:

    What encode mode to choose besides const. quality & automated 2nd pass? (is automated 3rd pass any better?)
    Quote Quote  
  16. Rancid User ron spencer's Avatar
    Join Date
    May 2005
    Location
    Ish-ka-bibble
    Search Comp PM
    uncompressed avi? are they your own movies you are looking to archive? You interested in bluray hardware compatibility? what is the resolution? Are they DV files?
    'Do I look absolutely divine and regal, and yet at the same time very pretty and rather accessible?' - Queenie
    Quote Quote  
  17. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    Hey! there hello _hello
    While you're answering my above doubt, please answer to this one also:

    Earlier you were talking about using yadif & bob alongside to deinterlace, but i heard that they tend to introduce some noise to the footage. So would you recommend me with the best yadif & bob settings to deinterlace that wouldn't create the noising effect. And i want to use them in Avisynth, so could you help me out in giving the links from where i can download them. And are there any dlls to be downloaded in order for them to run?
    Quote Quote  
  18. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    Hey! Ron
    They are 1080i HDTV Captures.
    Quote Quote  
  19. Rancid User ron spencer's Avatar
    Join Date
    May 2005
    Location
    Ish-ka-bibble
    Search Comp PM
    Not sure why you want to deinterlace...I would use MeGui only if you want to go the route of custom encodes for bluray compliance. I use it to make proper video encodes for distribution on disk.

    If all you want is to compress to a simpler format, use Handbrake. It has all the bubble pop-ups you need for help and is much easier to run woth CRF encoding. No need to worry about two-pass, unless you want proper hardware disc compliance for bluray.
    'Do I look absolutely divine and regal, and yet at the same time very pretty and rather accessible?' - Queenie
    Quote Quote  
  20. Member
    Join Date
    May 2016
    Location
    India
    Search Comp PM
    So does a 1080i gets played properly in a bluray player?
    Quote Quote  
  21. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    Originally Posted by yukukuhi View Post
    So does a 1080i gets played properly in a bluray player?
    Both 1080i and 1080p are within the blu-ray standard and both will play just fine assuming they were encoded correctly, with all the blu-ray specs and particulars.

    It's not like one will play better than the other, all things being equal. Just the same, both can play poorly - or not at all - if they were not encoded properly.
    I hate VHS. I always did.
    Quote Quote  
  22. Rancid User ron spencer's Avatar
    Join Date
    May 2005
    Location
    Ish-ka-bibble
    Search Comp PM
    Originally Posted by yukukuhi View Post
    So does a 1080i gets played properly in a bluray player?
    Are you worried about playing from discs with a bluray structure or not?

    If so, read here:

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

    then use megui with options here:

    http://www.x264bluray.com/


    If you just want files to play on a media player or PC, then use handbrake
    'Do I look absolutely divine and regal, and yet at the same time very pretty and rather accessible?' - Queenie
    Quote Quote  
  23. Originally Posted by yukukuhi View Post
    What encode mode to choose besides const. quality & automated 2nd pass? (is automated 3rd pass any better?)
    Constant quality = you choose the quality and the bitrate required is unknown (for a given CRF value it'll vary quite a bit according to how hard the video is to compress).
    Automated 2 pass = you choose the average bitrate and the resulting quality will be the unknown.

    Other than that, the two methods encode the video pretty much the same way, except CRF only requires 1 pass to encode the video. For 2 pass encoding the 1st pass is to work out how to distribute the specified number of bits (according to the specified bitrate) and the 2nd pass encodes. If you were to run a constant quality encode and make note of the resulting bitrate, then use that bitrate for a 2 pass encode, the two encodes would effectively be identical, hence one method lets you pick the quality and the other lets you pick the bitrate.
    Most people here use constant quality. CRF18 is roughly where the x264 encoder is considered to be "transparent" (higher CRF values = lower quality and lower bitrate). I use CRF18 for 720p or lower resolutions and CRF20 for 1080p myself, but that's just me.
    I think the benefit of a 3 pass encode over a 2 pass encode is quite minor. I've never run a 3 pass encode myself.

    Originally Posted by yukukuhi View Post
    Earlier you were talking about using yadif & bob alongside to deinterlace, but i heard that they tend to introduce some noise to the footage. So would you recommend me with the best yadif & bob settings to deinterlace that wouldn't create the noising effect. And i want to use them in Avisynth, so could you help me out in giving the links from where i can download them. And are there any dlls to be downloaded in order for them to run?
    When you open a video with MeGUI's script creator and run an analysis under the de-interlacing section, if MeGUI detects the video as interlaced, it'll default to Yadif de-interlacing. That'll de-interlace PAL to 25fps progressive and NTSC to 29.970fps progressive. If you change the "Yadif" method to "Yadif with Bob" in the script creator, it'll de-interlace with Yadif to 50fps or 59.950fps instead. Motion will look smoother that way. De-interlacing to 50 fps or 59.940fps is how interlaced video is usually de-interlaced on playback by a video player or TV and the quality from "Yadif with Bob" will be fairly similar. There's nothing extra to download. MeGUI comes with Yadif.

    There's quite a few de-interlacing methods that have their pros and cons, but Yadif is probably the most commonly used de-interlacer as it's fairly good and fairly fast. There's a de-interlacing script called QTGMC that does a better job (it's better than any player/TV de-interlacing) but it's also quite slow. Painfully slow for high definition.
    You can use QTGMC with MeGUI but you need to download the plugins it requires yourself and add it to a script manually. Once you get it working it's not hard to use but it's easier if you also have Avisynth installed (MeGUI uses it's own portable version of Avisynth). There's some small Yadif vs QTGMC samples attached to these posts if you want to have a look, along with the original interlaced video if you want to compare them to your player's de-interlacing.
    https://forum.videohelp.com/threads/354092-Converting-video-frame-rates?p=2225116&viewf...=1#post2225116
    https://forum.videohelp.com/threads/354092-Converting-video-frame-rates?p=2225237&viewf...=1#post2225237
    Quote Quote  



Similar Threads