But I'm wondering if there's a way to determine a "good" target bitrate …
A good target bit rate is the bit rate that either:
- is supported by the network you're streaming the material from (e.g. a 3G network, home WiFi, etc.), which is pretty easy to calculate
- looks good to you, which is a very subjective measure
22 Mbit/s or 45 Mbit/s are indeed quite high for the average user, and especially for already compressed video like h.264. You could definitely go ahead and reduce the bit rate to a "sane" value, always with regards to how much storage capacity you can afford and how much quality you want to lose.
You could also resize 1080p video to 720p if you don't really need the size or don't have the processing capability to edit it.
… or if there's any point in trying to do variable bitrate
The point of constant bit rate is to adapt to a streaming media scenario where there's a bottleneck that limits the maximum bit rate of the transmitted video. In today's multimedia world, this doesn't necessarily make sense anymore.
When you squeeze a video into a constant amount of bits per second, you basically tell an encoder to always use the same amount of bits to encode the same time frame. Is that the best approach? As you may have guessed by now, it's not. Quoting the CRF Guide from Handbrake (I will come back to this later):
The eye perceives more detail in still objects than when they're in motion. Because of this, a video compressor can apply more compression (drop more detail) when things are moving, and apply less compression (retain more detail) when things are still. Subjectively, the video will seem to have higher quality.
So, it does make sense to use variable bit rate whenever you can. It will make the video look better, even at the same file size of a constant bit rate video.
Even more so, most encoders – the most famous one being x264 – often perform very bad when you tell them to use a constant bit rate. It's better to give them a bit more "freedom" in the sense of how many bits they want to spend on a frame. After all, that's the job of the encoder, and not you. And that's called "constant quality".
Enough of that – what does that mean in practice? If you use FFmpeg to encode videos, then you're already using a good enough tool. If you now also have x264 installed, and use the latest version of both, then you're using one of the best encoders that's currently available for free. Instead of encoding with a fixed bit rate, let x264 choose how much it wants to spend. Do this by using the Constant Rate Factor option.
In a very simple case this means setting a value between 17 and 23. I choose MP4 as output container instead of MOV because there are better tools for remultiplexing available:
ffmpeg -i input.mov -c:v libx264 -crf 22 output.mp4
The lower the value, the better the quality, and the larger the output. Vice versa, the higher, the lower the quality. At the same time, you will of course reduce the average bit rate needed. Check the x264 encoding guide for more info about ffmpeg
.
Your task is now to find a CRF value that:
- reduces the overall bit rate to the point you can afford
- doesn't reduce the quality too much, so that the video still looks good
Yes, this involves a lot of encoding and trial-and-error, but this is daily business when you're tuning and encoding video.
Oh, and if you don't like the command line, Handbrake is a free, cross-platform tool that does exactly the same. It even has a CRF slider:
Best Answer
When re-encoding a file, you shouldn't just specify a bitrate. My guess is that ffmpeg tries to use the mpeg4 codec by default, and it refuses to use less than 2mbps because it simply can't go below with such a high resolution.
I suggest you re-encode with the H.264 codec which you can do like this :
Please note however that this will use a 1-pass average bitrate method which is pretty bad for quality. Instead, you should try encoding with "constant rate factor", i.e. you target a certain quality and the encoder decides which average bitrate is the best for your file :
You're free to experiment with the crf value. Increasing it will mean lower bitrate and worse quality, lowering it vice versa.
If you absolutely want to target an average bitrate, you should checkout 2-pass encoding. Also, don't forget about presets !
As a side note, 500k for 1080p is way too low and you will get poor results. If you wish to target such a low bitrate, I suggest you downscale to 480p (854x480). 720p should have a minimum of 1,5mbps bitrate and 1080p 3mbps.
For your future questions, don't forget to post the input/output logs from ffmpeg, they're always helpful :-) .