*This thread is meant to share my knowledge and experience in encoding using many encoders. I'm not an expert so any advice and help would be helpful and much appreciated. I will update this thread when i have something new to share. Be sure to subscribe to this thread for upcoming update.*
(Those who lurk or a stalker will get this benefit)
[Updated 0.01 - Revising on video and audio option]
[Updated 0.02 - Revising on making the output to mp4 easier]
[Updated 0.03 - Added some important info]
[Updated 0.04 - Removing the need of external codec info]
[Updated 0.05 - Added a fact that you can queue multiple video]
[Updated 0.06 - Added some recommendation and extra info]
[Updated 0.07 - Posted my version of HB that i use when making this tutorial (9/2/2013)]
[Updated 0.08 - Updated my HB to latest one, and posted a guide on how to use the new setting (10/2/2013)]
[Updated 0.09 - Edited the text to make it easier to understand (16/2/2013)]
[Updated 0.10 - Edited the link for download since HB site is all new now (11/6/2013)]
[Updated 0.11 - Edited the audio bitrate. Should fix the hissing issue (12/6/2013)]
[Updated 0.12 - Edited again the audio bitrate. Forgot to differentiate stereo and mono setting (13/6/2013)]
[Updated 0.13 - Putting my recommendation for video and audio setting (13/6/2013)]
[Updated 0.14 - added info about MP4 and M4V (1/7/2013)]
[Updated 0.15 - added little info on reference frames and b-frames (10/7/2013)]
[Updated 0.16 -Fix the audio setting to use HE-AAC (FDK) since the issue of broken audio (hissing,metallic sounds like) in latest HB update.
- Putting some remark on the setting (11/7/2014)]
[Updated 0.17 - Adding step to "Remove/Untick" chapter markers in HB regarding the issue of infinite buffer (24/7/2014)]
I have put this in my user note for quite awhile and a few know about it, so i think it is time i share it to the public.
Handbrake, the encoder that can directly turn mkv to mp4. I believe this is what almost all the uploader here want. If you want to know more about handbrake, you can google it and visit their main site.
Handbrake also can be use to do a mini-encode of your video with a right setting. Basically, you can get a high quality video with a small size, thus saving up space. Sounds good enough isn't?
What handbrake can do in simple term is basically this :
MKV --> MKV--------------------------------------------------------------------------------------------------------
MKV --> MP4
Any Video Container --> MKV/MP4
-READ EVERYTHING CAREFULLY-
--BECAUSE I REALLY MEAN IT--
As always, fetch the handbrake installer first. We will be using nightly builds of handbrake for this one as its more updated so less bugs and more updated encoding tools.
The nightly build version that i use for this tutorial (UPDATED by 11/7/2014) :
(I don't know if the latest one introduce a new setting or so..but no matter what HB you used, the method is similar, all you need to do is IMPROVISE.)
Go to this site --> https:/brake.fr/nightly.php
and fetch the latest windows version of nightly build. Pick the Graphical User Interface (GUI) version not the Command Line Interface (CLI) version.
If you want to try the CLI go ahead.
Jokes aside, if you are confident in your programming skill then go ahead use the CLI, but this thread is dedicated for GUI-based handbrake. I can't help any of you in CLI-based HB. Spare my programming skill...
From my sensei, HB is a standalone GUI and doesn't need to use system codec and .dlls (except system font of course)....so i guess you don't need any external codec. Forgive me for my lack of knowledge in HB.
Notes from HB itself : (after thoroughly reading)
HandBrake does not support external encoders. It is not possible to add an encoder to HandBrake at runtime. All the encoder libraries are built in and not dynamically linked/loaded at runtime.
THIS SETTING OF MINE IS APPLICABLE TO ANY ENCODER AS LONG IT HAS THE SAME SETTING. IT IS NOT LIMITED TO ONLY HANDBRAKE APP.
Once installed and run, you will get something like this..
You will see those 7 tabs below and there is where we will play with our settings.
1. Select/Click on Source and Open any video you want to encode..there is 3 ways. Feel free to try those other 2 ways later I will be using my Puchimas! video as an example.
2. Now in picture tab, set anamorphic from "strict" to "none" so that you can freely edit your video resolution here. The crop function at the right is for cropping..well mostly used to remove that black borders like you always see in the movie.
OS recommended size : 512x288
3. Now moving on Video filters. I rarely use this, and if one thing, i only use denoise to remove some of those noise-grain like..and thus reducing the file-size and still maintain the quality. I will just dump info i got on for each filters with a link. Read if you want to know more. Reading enriches your brain.
Feel like trolling? Click "Greyscale" and your video will go back time to the 60's where TV still don't have color.
4. Ok, moving on to Video tab. Make sure..
Video Codec : H.264
Framerate : Same as source
and pick constant framerate as we want to upload it on OS. Though..it does not matter either it is constant or variable. Your choice~
There is 2 way of encoding in HB, constant bitrate and average bitrate.
If you want to use constant bitrate, then use in between 23-25.
The lower the better but higher file size.
If you want to use average bitrate, then use in between 300-600.
The higher the better but higher file size.
This is similar like bencos. Make sure to tick the, 2-pass encoding and turbo 1st pass.
If it was me, i prefer using average bitrate as i can predict the filesize at the end.
My recommended bitrate is 380 - 400, as it give an average video size around 70mb+ for 30 minutes video.
In the latest build, under frame rate, there is Optimise video option :
basically this is the simplified version of advanced tab. If you don't want to use the advanced tab setting, this setting here will do everything for you. It pretty much self-explanatory, but i will further explain it.
Notice the "Use advanced tab instead"?
Tick the box if you don't want to use this optimise video setting, and proceed to the advanced tab.
x264 preset (hover on it and info will pop out)
- Range : Medium to Very Slow
(Do not choose placebo, it is pointless to make the encode too slow just for a small amount of compression that you may not notice at all)
- Why : the slower the preset, the better the compression of the video (though it depends on that video itself). Better quality and smaller filesize, but the time to encode increase.
If anime or cartoon, choose Animation.
If drama, movie, 3D animation, or live action, choose Film
I don't know about others, but it is some what self-explanatory again.
Grain : For grainy video, most probably suit for old film?
Still Image : For video that use static image, no motion?
For others i don't know much about it, you can check handbrake guide for further explanation.
you can read about Profile and Level here : H.264/MPEG-4 AVC
Profile : High
Why : The primary profile for broadcast and disc storage applications, particularly for high-definition television applications (for example, this is the profile adopted by the Blu-ray Disc storage format and the DVB HDTV broadcast service).
-copy and paste from the link-
Basically, we need it in High Definition profile.
Level : Auto
Why : I still don't understand the function of this level in x264 yet so auto is the easiest option.
From the wiki,
Previously encoded pictures are used by H.264/AVC encoders to provide predictions of the values of samples in other pictures. This allows the encoder to make efficient decisions on the best way to encode a given picture. At the decoder, such pictures are stored in a virtual decoded picture buffer (DPB).
For example, for an HDTV picture that is 1920 samples wide (PicWidthInMbs = 120) and 1080 samples high (FrameHeightInMbs = 68), a Level 4 decoder has a maximum DPB storage capacity of Floor(32768/(120*68)) = 4 frames (or 8 fields) when encoded with minimal cropping parameter values. Thus, the value 4 is shown in parentheses in the table above in the right column of the row for Level 4 with the frame size 1920×1080.
and another the extra options,
i'm sorry i don't know what is the function of it yet..but from what i understand this is where you put other H.264 function. A skill in programming word is actually needed in here, i guess?
but i think it is okay. This extra option is just optional.
5. Then, let's move to the next tab at the right, Audio tab.
Vorbis audio codec will only appear in MKV container mode.
You can add other audio by pressing "Add" button if your anime is dual-audio.
HE-AAC is the best codec so far in mp4 mode, so use HE-AAC (FDK).
As for bitrate,
Most of the time i will just pick Auto mixdown unless it is more than 2 channel like Blu-ray encode that have 5.1 channel or more. That one need a mixdown to stereo or mono.
For stereo mixdown,
96 bit is better for anime like clannad.
112 bit is normal (RECOMMENDED for all)
128 bit is better for anime that has tons of action and fast scene.
although, if want the best go for 128.
My suggestion for OS?
Use audio bitrate value -- 112 (it give off average 20mb+ audio file size for 30 minutes video)
You can choose lower than that. It is up to you.
For mono mixdown,
32 bit is better for anime like clannad.
48 bit is normal (RECOMMENDED for all)
64 bit is better for anime that has tons of action and fast scene.
If want the best go for 64.
My suggestion for OS?
Use audio bitrate value -- 48+ (it give off average 10-15mb+ audio file size for 30 minutes video)
You can choose lower than that. It is up to you.
The higher it is, more loud and detail the audio.Of course the background sound and OST will sound better, but higher filesize.
Though be careful of your choice, if the original audio is already bad, choosing higher bitrate, will just make it sound even worse.
For mixdown, choose mixdown to mono.
You can choose stereo if you want.
Mono is one way audio. Stereo is left and right speaker audio..something like that as far as i understand..but it also affect your filesize.
If your video has 5.1 audio channel or higher, it is better to mixdown the audio to mono to make sure you can properly hear all sound from each channel in mono audio. (Work best if you want to encode FLAC audio)
and the sample rate, either choose "Auto" or check mediainfo of your video and check the audio samplerate.
Most of the anime video is 48.
6. On Subtitle tab, Click "Add".
You can actually add a numbers of subtitle in your video.
(Work best if you want to encode your video in MKV container)
Make sure to click "Burn in" to hard-sub the subtitle onto the video.
This work best for video with higher resolution..but for low resolution like [email protected] shiny fiesta that i uploaded before the same method cannot be applied..
If the subtitle is black and white it is ok..but since it is color..burning the sub onto it looks really bad.
That's why i had to use another way to hard-sub the video instead of just "burn" it.
Be sure to NOT click "Burn in" if you intended to put a lot of subtitle.
(If you intend to encode for yourself or sharing with others)
7. In Chapter tab, usually the Sub-group already provide the chapter in their video, so you can actually skip it, but if you want to add another chapter..use import. Export is use to extract the chapter.
See those black line in Media Player Classic?
That is the function of the chapter to tell where is the prologue, opening and such.
Although for uploading to OS, make sure to UNTICK the creation of chapter markers. It is a known issue if you have chapters in your uploaded video, the OS player can't play it. Infinite loading issue if i were to name one.
REMEMBER to UNTICK it.
8. Finally we arrived to the crucial part in encoding in HB, setting the H.264 in the Advanced tab. (If you did tick the "Use Advanced Tab Instead" before in the video tab)
Usually when you hover to the option, a pop-up balloon appear giving you the info about its function. Therefore i won't explain much in detail about it.
See the preset at the right?
For normal preset, it will looks like this and actually enough for normal and casual encoding.
For High Profile preset, it will looks like this and this is the average encoding quality you can give for your anime, and we will use this preset as a base.
This is the preset i used for low-end PC
I will explain certain part,
Adaptive Direct Mode
Adaptive Quantization Strength
Spatial : recommended for animation
Temporal : recommended for live action or 3D animation
Automatic : If you are lazy to determine it..because some story involve both animation and 3D.
By default, it is 1.0, it won't be shown in command line box. It is a good value for action anime which improves the detail of the line use in action.
For regular anime,
Make sure the Adaptive Quantization Strength is drag to left until "aq-strength" at the command line box, below the setting show 0.6.
You can experiment value between 0.6 - 1.0 to see which value is better for your video.
Subpixel Motion Estimation : (This affect your encoding speed)
By default, you can use value 7 that actually is enough.
If you aim for better quality, set it higher..10 is the best choice, and most anime encoder or sub-group use value 10.
If you feel your PC/laptop can handle it, which it can..just like my netbook
(prepare for despair...OTL the pain..)
You can change this setting below to this value. (This affect your encoding speed)
Reference Frames : 16
Maximum B-Frames : 8
Motion Est Range : 32
Oh yeah the above setting is suitable if you want to make mini-HD video and keep it to yourself.
If you want to upload the video into OS, make sure..
Reference Frames : between 3-10
Maximum B-frames : between 5-8
and, after all that, in the preset box at the right, click "Add" button below to add your preset for easier configuration later.
9. Before queue your video, make sure the output setting container is MP4 and click the "web-optimized".
and be sure to set your destination before that. Make sure it is ".mp4" not ".m4v"
Although technically, both are the same actually.
Read about it here --> https://trac.handbrake.fr/wiki/Containers
and as for another additional info,
The M4V file format is a video file format developed by Apple and is very close to the MP4 format. The differences are the optional Apple's DRM copy protection, and the treatment of AC3 (Dolby Digital) audio which is not standardized for the MP4 container.(courtesy of wikipedia)
Do it either manually or go to tools --> options ---> output ---> change to always mp4
10. Now click "Add to queue" and click "Start" to start encoding with your setting. You can see your queue by clicking "Show queue".
You can queue multiple video by repeating the same step before pressing "Start". I hope that resolve issue about "HB can't do multiple queue of video".
If you want to see the preview of your setting before you actually encode the real one, click "Preview".
Choose at which part you want to see, and how many seconds you want the preview to be.
Be sure to tick, "use system default player", otherwise it will direct you to VLC player, and if you don't have VLC, error will pop out.
It will encode your preview with the setting you have set.
and i will say this again, quoting from my Cyko tutorial,
With that, the HB tutorial is finish. Any further questions, feel free to ask. I will try my best to help if and only if you have read everything and has tried to do it by yourself first.
If possible in the end of the encoding, your file size SHOULD
be below 100MB
for 30 minutes video, if you intend to upload it in OS. If it is over 100MB, encode again. It will take a lot of time just to buffer the 100MB video..be wary of someone with slow internet.
I won't answer questions that are not related to handbrake or encoding.
I won't answer stupid questions.
I won't answer questions that already have the answer in this wall of text i wrote.
I missed some important point?
I messed up somewhere?
Please do tell me. Your help will be much appreciated.
Please click "Thanks" if you see this post is useful to you. Thank you.
"My only aim is to offer clearest quality possible at lowest filesize.-FiQiZ-"