User Tools

Site Tools


ffmpeg:video:size

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
ffmpeg:video:size [2025/05/27 18:45] peterffmpeg:video:size [2025/05/27 19:31] (current) peter
Line 5: Line 5:
 <code bash> <code bash>
 ffmpeg -i "input.mkv" -c copy -f null /dev/null 2>&1 | tail -n 2 | grep -Po "(?<=video\:)([0-9]+)" ffmpeg -i "input.mkv" -c copy -f null /dev/null 2>&1 | tail -n 2 | grep -Po "(?<=video\:)([0-9]+)"
 +
 +or
 +
 +ffmpeg -i "input.mkv" -c copy -f null /dev/null 2>&1 | tail -n 2 | grep -Po "video\:([0-9]+)(?=kB)" | cut -f 2 -d ":
 </code> </code>
  
Line 38: Line 42:
 ---- ----
  
-===== Calculate size manually using packet size =====+===== Calculate video size manually using packet size =====
  
 This method reads each video packet, individually, and totals up each packet size. This method reads each video packet, individually, and totals up each packet size.
Line 60: Line 64:
 size=$( echo "scale=6; ${sum_video_size}" | bc) size=$( echo "scale=6; ${sum_video_size}" | bc)
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  This is very accurate but may be slow...
 +</WRAP>
  
 ---- ----
  
  
ffmpeg/video/size.1748371552.txt.gz · Last modified: 2025/05/27 18:45 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki