simple script to calculate video bandwidth

32 views
Skip to first unread message

vle...@gmail.com

unread,
Mar 11, 2008, 4:59:12 AM3/11/08
to Linux Media Labs support, bmue...@terrasoftsolutions.com
We're being asked often enough about the video bandwidth for
uncompressed motion video streams. So, I've written a very simple
shell script to calculate it, in Mb/sec, based on the formula,
assuming YUV coding of 4:2:2 is used:

X_resolution * Y_resolution * 2 * frames_second / 1048576

script:
======================= cut here ================================
#!/bin/
sh

read -p "X resolution, pixels (720):"
x
read -p "Y resolution, pixels (480):"
y
read -p "frames per second (30):"
f

echo Uncomperessed vieo bandwidth ==
\
`expr 10 \* ${x:=720} \* ${y:=480} \* 2 \* ${f:=30} / 1048576 | sed -
e 's/\(.\)$/\.\1/'`
\
Mb/sec
==============================================================
Reply all
Reply to author
Forward
0 new messages