2
We use ffmpeg and a transcoding script for transcoding and want to make some batch files which we can use for transcoding.
For example I use a parameter called video_kbit
and if I am writing in 30000 it should reach 30 Mbit. Of course if I use 6000
as parameter it should reach 6 MBit as well, so I have one script which reaches every video bitrate I want.
As my settings are now, I only reach 18.1 Mbit. Only when I use 15000 as a parameter I am reaching my goal for a constant video bitrate of 15 MBit. If I use 8000 as parameter I get 10.1 MBit as a result. So under 15000, I get a higher bitrate and over 15000, I get a lower bitrate than I want.
My presettings are:
ffmpeg -threads "4" -i "$2" -f mp4 -c:v libx264 -crf 1 \
-bufsize 30000k -maxrate ${FC_PARAM_video_kbit}k \
-acodec libfaac -ac 2 -ab ${FC_PARAM_audio_kbit}k -ar 44100 \
-pix_fmt yuv420p -vf scale=${FC_PARAM_width}:${FC_PARAM_height} -y "$3"
And I am using these parameters:
FC_PARAM_video_kbit = 30000
FC_PARAM_audio_kbit = 192
FC_PARAM_width = 1920
FC_PARAM_height = 1080
I have tried using a higher bufsize and using profile:v
and level settings, but nothing got me near the constant video bitrate of 30000 Mbit.
Do you guys have any ideas or suggestions for a better way to reach my goal?
First of all I want to thank you for your fast answer. I have asked my coworker about this and we know that you can archieve higher bitrates by using DNxHD and ProRes, but our goal stays the same that we want to reach a specific targetbitrate, so if our clients want a clip with 6MBit they should get a clip with a constant bitrate of 6MBit. Some presets should be reached (for example screen resolution, codec container, video / audio bitrate and so on). Thats why I have asked of a way to reach at least a constant video bitrate, with your solution I reach a constant bitrate until 7MBit. – sebastian – 2013-10-23T10:35:33.407
I see. The thing is, really, that x264 wasn't written with a lot of support for CBR. The highest bitrate you can get is determined by what a CRF of 0 gives you. You cannot artificially get a higher bitrate, and it wouldn't result in better quality, so if you need x264, the only solution I see is to tell your clients that a higher bitrate might not be available (which isn't a bad thing though). – slhck – 2013-10-23T10:43:40.387
Once again thank you and we will use the CRF 0 option and go with the highest bitrate CRF 0 can give us. – sebastian – 2013-10-24T07:16:04.030