[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Should I be using CRF or Bitrate or combine both? ffmpeg -i
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 14
Thread images: 1
File: ffmpeg.png (20 KB, 728x372) Image search: [Google]
ffmpeg.png
20 KB, 728x372
Should I be using CRF or Bitrate or combine both?

ffmpeg -i input -crf 25 output


ffmpeg -i input -b:v 2000K output


ffmpeg -i input -crf 25 -b:v 2000K output
>>
>>53828165
Separate
>>
It depends on your target. If you want predictable bitrate of your final stream, then you should use 2pass --bitrate, otherwise you should use CRF.
>>
>>53828663
>>53828677
What if you want CRF with a min/max rate?

Are you supposed to do that or does it defeat the purpose of CRF?
>>
>>53828719
-maxrate
>>
Which is best for anime?
>>
>>53828719
No, you can do that. It's called VBV, and it's used if you want to have constant "quality" but without exceeding some bandwidth limit, say if you're encoding for a bluray where you can't peak above 40mbit/s for the video. Minimum bitrate is not so smart, it'll bloat black frames and such only, and wont help you on quality.

Test various CRF levels and see what works for your scenario, see where it compresses the video too much and just turns it shitty.

--vbv-maxrate in x264, ffmpeg calls it this >>53828748

Maxrate can be set even if you use --birate, since that's also a vbr rate control mode.
>>
>>53829112
Can you run VBR on top of CRF with -q:v?

Or is that only used for certain codecs?
>>
>>53828768
crf 13
>>
>>53829238
CRF is VBR. CRF is "constant ratefactor" and VBR is "variable bitrate". CRF targets a certain "quality" level, but the bitrate will vary from second to second. You don't know what bitrate you end up with when using CRF.

Doing --bitrate is also VBR, since the bitrate varies from second to second, it's just that the constraint is put on the bitrate instead of the quality, so you know you'll end up with an average bitrate on your encode of whatever you specified.

In the end, if you do an encode with CRF 20 and the result is a video file with 5000kbit/s bitrate, you'd get the exact same result if you did --bitrate 5000 --pass [1, 2] to encode it.
>>
>>53829334
How would you do a Constant bitrate? Is that not advisable?
>>
Let me see if I can understand the available options:

CRF
-crf 23


CRF with a maxrate
-crf 23 -maxrate 2000K


Bitrate (Is this already VBR?)
-b:v 2000K


VBR Bitrate??
-q:v 2000K
>>
>>53829395
-b:v 4000k -minrate 4000k -maxrate 4000k

Will give you CBR, though it's not a very good idea to do this, unless you know your scenario requires constant bitrate. I also dunno how ffmpeg implements this, because there's no CBR mode in x264 at least. With x264, to get CBR, you do vbv-maxrate and then enable padding to a certain bitrate. Which basically makes it fill up the stream with useless bits, just to meet the required stream bitrate.
>>
>>53829461
-b:v is what x264 calls --bitrate, it's a variable bitrate ratecontrol method where it attempts to make the final stream have the bitrate you specify.

-q:v I think is what x264 calls --qp, it's also a variable bitrate ratecontrol method, but this time it's "constant quantizer" mode. Basically what you set is a certain "compression level" that it should use on each frame, and as such you wont know the final bitrate. I'd say don't use this. (Unless I'm wrong and it's not QP mode from x264)

Also remember to use 2pass mode if you set -b:v.

You should either do -crf x or -b:v xxx -pass [1,2].
Thread replies: 14
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.