The guidelines for encoding (pirated) video are called "scene guides". They are signed by various release groups who will make sure their videos comply to the guide, LOL being one of these groups.
You can find a list of scene guides scenerules.org. The standard you're looking for is—if I'm not mistaken—the SD x264 TV Releasing Standard, assuming that your video is 1280×780. If you have HD video, you're probably not going to get really good quality at 200 MB for 45 minutes. That'd translate to roughly 600 kBit/s and would be enough for 720p though.
As for encoding tools, you can get pretty far with FFmpeg (which Handbrake is based on). The FAAC audio encoder is banned, but FFmpeg doesn't support it anymore anyway. You can use another high quality AAC encoder such as libfdk-aac
.
If you have no prior experience with video encoding and all of these keywords don't mean anything to you, please have a look at the following blog articles / Super User questions:
Basically, the rules say you have to use the x264 encoder with a Constant Rate Factor quality setting. What it does is quite different than setting a constant bitrate: you can set the CRF to have x264 encode the video with a constant quality.
Typical CRF levels are between 18 and 28, and the release group recommends 19–20 for high quality encoding of material that is easy to compress. You're not going to know the final file size in advance when doing that, but that's the whole point of doing CRF encoding: You don't care about the actual file size—you just want good quality.
Once you set up ffmpeg
, and you have your input video ready, encoding is actually quite simple. Note however that your source video must be of high quality, otherwise re-encoding will only deteriorate its quality much more.
Here are the key parameters:
- x264 video with:
- CRF 19–20
slow
profile (better compression efficiency at the expense of encoding time)
- H.264 level 3.1, which sets a few constraints
- Downscaling has to be done with any resizer other than bicubic (which is the FFmpeg-default). Lanczos can be used, for example.
- A
tune
setting for the source (e.g. film
for film-like content)
- AAC audio with:
- Variable bit rate encoding
- Bit rate between 96 and 160 kBit/s
In ffmpeg
, this translates to the following:
ffmpeg -i input.mp4 \
-c:v libx264 -crf 19 -level 3.1 -preset slow -tune film \
-filter:v scale=-1:720 -sws_flags lanczos \
-c:a libfdk_aac -vbr 5 \
output.mp4
In FFmpeg, your choices for AAC encoding are a bit limited. See here for your AAC choices and also refer to the FFmpeg and AAC Encoding Guide for more information.
If your video ends up being too large, you may adjust the CRF. Values ±6 will result in half/double the bit rate, so if you start with 19 and go to 25, you'd end up with half the bitrate. The scene rules don't allow CRF above 24, but you probably won't mind.