user13914826
user13914826

Reputation:

How to change the "Data rate" of a video using ffmpeg?

How to change the Data rate of a video?

Those are what I have tryed:

ffmpeg.exe -i Video1.mp4 -b:v 284000 Video2.mp4
ffmpeg.exe -i Video1.mp4 -b:a 284000 Video2.mp4
ffmpeg.exe -i Video1.mp4 -bits_per_raw_sample 284000 Video2.mp4

Upvotes: 0

Views: 381

Answers (1)

Emile Akbarzadeh
Emile Akbarzadeh

Reputation: 336

The -b:v flag sets the average bitrate, however for full control you should also specify -maxrate. -bufsize also allows you to choose how often ffmpeg calculates the maximum bitrate so for your example:

ffmpeg.exe -i Video1.mp4 -b:v 284000 -maxrate 300000 `bufsize 100000 Video2.mp4

Source: https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate

Upvotes: 1

Related Questions