how to select constant bitrate
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
how to select constant bitrate
Hi there,
i am not able to select "constant bitrate" on HandBrake!
I do not mean "Constant quality" that creates a variable bitrate!
Can HandBrake encode with constant bitrate?
Thank you!
i am not able to select "constant bitrate" on HandBrake!
I do not mean "Constant quality" that creates a variable bitrate!
Can HandBrake encode with constant bitrate?
Thank you!
Re: how to select constant bitrate
Average bitrate, you mean?
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
No,
i mean constant bit rate.
For example: -b 10000k means everage bitrate for the encoded video, but some scenes will have lower bitrate, othe higher.
Is it possible to choise a fixed bitrate for all ?
Fixed constant bitrate gives a higher quality, average bitrate gives very good quality with less space!
i mean constant bit rate.
For example: -b 10000k means everage bitrate for the encoded video, but some scenes will have lower bitrate, othe higher.
Is it possible to choise a fixed bitrate for all ?
Fixed constant bitrate gives a higher quality, average bitrate gives very good quality with less space!
Re: how to select constant bitrate
I can't say I've ever seen a true CBR video encoder as they would be terribly inefficient.
The reason why you'll see bitrate variations from one scene to another in an ABR encode is that the image complexity and therefore the required bitrate to reach a given quality metric varies markedly from scene to scene. Under those circumstances it makes little sense to allocate exactly the same bitrate to both scenes; it's far better to work from a bit reservoir allocating bitrate as needed while aiming for a target bitrate across the entire encode.
The reason why you'll see bitrate variations from one scene to another in an ABR encode is that the image complexity and therefore the required bitrate to reach a given quality metric varies markedly from scene to scene. Under those circumstances it makes little sense to allocate exactly the same bitrate to both scenes; it's far better to work from a bit reservoir allocating bitrate as needed while aiming for a target bitrate across the entire encode.
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
Ok, so a CBR encoding is not useful as a VBR encoding, that's why HandBrake does not use it. Am i correct?
This is the script i am using for the test (handbrake-tff-h264-vbr):
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e x264 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x :tff --loose-anamorphic -m -i $i -o $newname; done
I noticed that also with using ffmpeg is not possible to take a CBR encoding, but only a VBR encoding (ffmpeg-tff-mpeg2-vbr):
for i in *.mov; do newname=`basename $i .mov`.mp4; ffmpeg -i $i -s 1280x720 -b 10000k -aspect 16:9 -r 25 -vcodec mpeg2video -flags +ildct+ilme -top 1 -ac 2 -ar 48000 -ab 256k -threads 4 $newname; done
Thanks you for you answer!
This is the script i am using for the test (handbrake-tff-h264-vbr):
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e x264 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x :tff --loose-anamorphic -m -i $i -o $newname; done
I noticed that also with using ffmpeg is not possible to take a CBR encoding, but only a VBR encoding (ffmpeg-tff-mpeg2-vbr):
for i in *.mov; do newname=`basename $i .mov`.mp4; ffmpeg -i $i -s 1280x720 -b 10000k -aspect 16:9 -r 25 -vcodec mpeg2video -flags +ildct+ilme -top 1 -ac 2 -ar 48000 -ab 256k -threads 4 $newname; done
Thanks you for you answer!
Re: how to select constant bitrate
x264's CBR mode is enabled by setting vbv-maxrate=<bitrate> in the advanced panel (or via the CLI's --encopts option),
where <bitrate> is the same as the selected average bitrate.
You'll also need to set vbv-bufsize, otherwise the maxrate will be ignored
(when in doubt, you may set it to the same value as the maxrate).
where <bitrate> is the same as the selected average bitrate.
You'll also need to set vbv-bufsize, otherwise the maxrate will be ignored
(when in doubt, you may set it to the same value as the maxrate).
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
Thanks you for the answer,Rodeo wrote:x264's CBR mode is enabled by setting vbv-maxrate=<bitrate> in the advanced panel (or via the CLI's --encopts option),
where <bitrate> is the same as the selected average bitrate.
You'll also need to set vbv-bufsize, otherwise the maxrate will be ignored
(when in doubt, you may set it to the same value as the maxrate).
i tried:
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e x264 vbv-maxrate=10000 vbv-bufsize=10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x :tff --loose-anamorphic -m -i $i -o $newname; done
Am i correct with the syntax? But "mediainfo" tell me:
Overall bit rate mode : Variable
Overall bit rate : 1 303 Kbps
Why?
Re: how to select constant bitrate
Maybe because you haven't specified the bit rate in that command line!
Re: how to select constant bitrate
Because you can't follow instructions?
TechnoPhil wrote:Rodeo wrote:x264's CBR mode is enabled by setting vbv-maxrate=<bitrate> in the advanced panel (or via the CLI's --encopts option),
where <bitrate> is the same as the selected average bitrate.
You'll also need to set vbv-bufsize, otherwise the maxrate will be ignored
(when in doubt, you may set it to the same value as the maxrate).
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
@ Rodeo
You are right, but be patient, I am only a beginner
Now it is working:
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e x264 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x vbv-maxrate=10000 -x vbv-bufsize=10000 -x tff --loose-anamorphic -m -i $i -o $newname; done
But "mediainfo" continues to report this information:
Overall bit rate mode : Variable
Overall bit rate : 10.2 Mbps
Am i correct or mediainfo is sayng the truth?
You are right, but be patient, I am only a beginner
Now it is working:
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e x264 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x vbv-maxrate=10000 -x vbv-bufsize=10000 -x tff --loose-anamorphic -m -i $i -o $newname; done
But "mediainfo" continues to report this information:
Overall bit rate mode : Variable
Overall bit rate : 10.2 Mbps
Am i correct or mediainfo is sayng the truth?
Re: how to select constant bitrate
You can only specify -x once - multiple options are separated by colons:
-x option1=value1:option2=value2
-x option1=value1:option2=value2
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
@ Rodeo
Ok, this is my final script:
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e x264 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x vbv-maxrate=10000:vbv-bufsize=10000:tff --loose-anamorphic -m -i $i -o $newname; done
Mediainfo says:
Bit rate mode : Variable
Bit rate : 9 467 Kbps
Nominal bit rate : 10 000 Kbps
Other problem: i tried to use another codec, mpeg2:
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e ffmpeg2 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x vbv-maxrate=10000:vbv-bufsize=10000:tff --loose-anamorphic -m -i $i -o $newname; done
With this codec i can't obtain an interlaced video "Top Field First" but only progressive. Why?
Forgive me for this questions, but it is a long long time that i am trying to find the solutions by google!
Ok, this is my final script:
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e x264 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x vbv-maxrate=10000:vbv-bufsize=10000:tff --loose-anamorphic -m -i $i -o $newname; done
Mediainfo says:
Bit rate mode : Variable
Bit rate : 9 467 Kbps
Nominal bit rate : 10 000 Kbps
Other problem: i tried to use another codec, mpeg2:
for i in *.mov; do newname=`basename $i .mov`.mp4; HandBrakeCLI -e ffmpeg2 -b 10000 -r 29.97 --pfr -E faac -B 256 -R 48 -f mp4 -4 -X 1280 -x vbv-maxrate=10000:vbv-bufsize=10000:tff --loose-anamorphic -m -i $i -o $newname; done
With this codec i can't obtain an interlaced video "Top Field First" but only progressive. Why?
Forgive me for this questions, but it is a long long time that i am trying to find the solutions by google!
Re: how to select constant bitrate
Different encoder, different options. I have little knowledge of libavcodec options (which are what's used to ffmpeg2/ffmpeg4 encoders).
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
Ok.. who can help me with ffmpeg2 in your opinion?Rodeo wrote:Different encoder, different options. I have little knowledge of libavcodec options (which are what's used to ffmpeg2/ffmpeg4 encoders).
Are you shure that using h264 i can create a CBR with the options -b 10000 -x vbv-maxrate=10000:vbv-bufsize=10000 ? Maybe "mediainfo" is wrong...
The file size for CBR and VBR is the same!
Thank you for support!
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
@ Rodeo
Am i correct?
Am i correct?
Re: how to select constant bitrate
MediaInfo is not reliable when it comes to detecting variable vs. constant framerate, so it wouldn't surprise me if it had issues with bitrate too.
TBH I don't care.
TBH I don't care.
-
- Posts: 39
- Joined: Wed Nov 02, 2011 9:21 am
Re: how to select constant bitrate
Ok, that's all!
In any case i prefer VBR!
Waiting for other opinions ...
Thank you!
In any case i prefer VBR!
Waiting for other opinions ...
Thank you!