Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # derp
- # ./autopad_spaces.sh /full/path/to/media
- moviePath=$1
- ln -s "$moviePath" you_are_retarded
- x264Preset=$2
- if [ "$x264Preset" = "" ]; then
- x264Preset="faster"
- fi
- ffprobe -show_streams you_are_retarded > /tmp/probetmp.txt
- width=$(cat /tmp/probetmp.txt | grep width | sed 's/width=//')
- height=$(cat /tmp/probetmp.txt | grep height | sed 's/height=//')
- echo $width
- echo $height
- scaleFactor=$(echo "scale=4; 0.75 * $width" | bc)
- echo $scaleFactor
- padTotal=$(echo "scale=4; $scaleFactor - $height" | bc)
- echo $padTotal
- padPixel=$(echo "scale=0; $padTotal / 2" | bc)
- echo $padPixel
- echo $x264Preset
- # aspects greater than .75 h/w will cause $padPixel to be negative
- if [ "$padPixel" < "0" ]; then
- padPixel=$"0"
- fi
- ffmpeg -i you_are_retarded -re -acodec libmp3lame -ac 2 -ar 44100 -vcodec libx264 -vpre $x264Preset -f flv -padtop $padPixel -padbottom $padPixel 'rtmp://fme.mogulus.com/mogulus/smausmau/username=flapdoodler/password=00e635a9/isAutoLive=true/autoVOD=yes/autoRecord=false app=mogulus/smausmau/username=flapdoodler/password=00e635a9/isAutoLive=true/autoRecord=false tcurl=rtmp://fme.mogulus.com/mogulus/smausmau/username=flapdoodler/password=00e635a9/isAutolive=true/autoRecord=false swfUrl=rtmp://publish.livestream.com/mogulus/smausmau/username=flapdoodler/password=00e635a9/isAutolive=true/autoRecord=false flashver=FME/2.5\20(compatible;\20FMSc/0.9) live=true'
- rm -rf you_are_retarded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement