ffprobe:bitrate
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ffprobe:bitrate [2025/01/12 22:17] – created peter | ffprobe:bitrate [2025/01/12 23:00] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ffprobe - Bitrate ====== | ====== ffprobe - Bitrate ====== | ||
+ | |||
+ | The bit rate of a video influences both the video quality and file size. | ||
+ | |||
+ | * Understanding the bit rate of a video is critical for encoding decisions, ensuring compatibility with bandwidth limits, or addressing quality issues caused by insufficient bit rates. | ||
+ | * It also helps when re-encoding videos for specific distribution channels. | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Determine the bit rate ===== | ||
+ | |||
+ | <code bash> | ||
+ | # For MP4 | ||
+ | ffprobe -v quiet -select_streams v:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1: | ||
+ | |||
+ | # For MKV | ||
+ | ffprobe -v quiet -select_streams v:0 -show_entries format=bit_rate -of default=noprint_wrappers=1: | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | 4717811 | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** The output will be in bits. | ||
+ | |||
+ | * To get this as Kbps divide by 1024. | ||
+ | * To get this as Kbps divide by 1048576. | ||
+ | |||
+ | That data is not required to be written to the stream, and MKV does not support it. | ||
+ | * MKV stores that info in the container, meaning you need to replace **stream=bit_rate** with **format=bit_rate** for MKV containers. | ||
+ | |||
+ | Options: | ||
+ | |||
+ | * **-v quiet**: sets the log level as quiet meaning show no logs. | ||
+ | * **-v error**: Limits output to errors to avoid any unnecessary information display. | ||
+ | * **-select_streams v:0**: selects the first video stream, if you have multiple video streams use this to target the one you want. | ||
+ | * Removing this means the bitrate will be shown for all video streams. | ||
+ | * **-show_entries stream=bit_rate**: | ||
+ | * **-show_entries format=bit_rate**: | ||
+ | * **-of default=noprint_wrappers=1: | ||
+ | * **input.mp4**: | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Determine the bit rate manually ===== | ||
<code bash> | <code bash> | ||
Line 14: | Line 65: | ||
481 | 481 | ||
</ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | https:// | ||
+ | |||
ffprobe/bitrate.1736720240.txt.gz · Last modified: 2025/01/12 22:17 by peter