Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # $1 input filename
- # $2 output filename
- # Output folder
- OUTPUTP=/data/web/cms.remote3.lv/public_html/uploads
- # work-around with absolute path for input file
- # For tests, input and output folders are the same
- media=$OUTPUTP/$1
- # Get media file width with mediainfo
- width=$(mediainfo '$media' | awk '$1 == "Width" { gsub(/[^[:digit:]]/, ""); print }')
- # old one with grep # HEIGH=`mediainfo $OUTPUTP/$1 | grep Height | awk '{print $3}'`
- echo $HEIGHT
- echo $WIDTH
- echo "ffmpeg -i $OUTPUTP/$1 -f flv -r 25 -deinterlace -ar 22050 -async 1 -b 1400k -bt 1400k -maxrate 1400k -bufsize 1400k -vcodec libx264 -vpre default -aspect 16:9 -s ${WIDTH}x${HEIGHT} -g 150 -trellis 0 -qscale 22 -b_strategy 2 $2"
- ffmpeg -i $OUTPUTP/$1 -f flv -r 25 -deinterlace -ar 22050 -async 1 -b 1400k -bt 1400k -maxrate 1400k -bufsize 1400k -vcodec libx264 -vpre default -aspect 16:9 -s ${WIDTH}x${HEIGHT} -g 150 -trellis 0 -qscale 22 -b_strategy 2 $2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement