User Tools

Site Tools


ffprobe:bitrate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ffprobe:bitrate [2025/01/12 22:20] peterffprobe: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> <code bash>
 # For MP4 # For MP4
-ffprobe -v quiet -select_streams v:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 a.mp4+ffprobe -v quiet -select_streams v:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 input.mp4
  
 # For MKV # For MKV
-ffprobe -v quiet -select_streams v:0 -show_entries format=bit_rate -of default=noprint_wrappers=1:nokey=1 a.mkv+ffprobe -v quiet -select_streams v:0 -show_entries format=bit_rate -of default=noprint_wrappers=1:nokey=1 input.mkv
 </code> </code>
  
Line 14: Line 24:
 4717811 4717811
 </code> </code>
 +
 +
 +<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**: shows the bitrate value for the specified stream (for MP4 files).
 +  * **-show_entries format=bit_rate**: shows the bitrate value for the specified stream (for MKV files).
 +  * **-of default=noprint_wrappers=1:nokey=1**: Formats the output to not print the header and section information.
 +  * **input.mp4**: The file under examination.
 +
 +</WRAP>
  
 ---- ----
  
 +===== Determine the bit rate manually =====
  
 <code bash> <code bash>
Line 31: Line 65:
 481 481
 </code> </code>
 +
 +
 +----
 +
 +===== References =====
 +
 +https://ffmpeg.org/ffprobe.html
 +
  
  
ffprobe/bitrate.1736720439.txt.gz · Last modified: 2025/01/12 22:20 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki