Search This Blog

Thursday, July 28, 2011

convert mts file to mpeg file

#!/bin/csh
# For NTSC change -fps 50 tp -fps 60000/1001 below
foreach f ($*)
ffmpeg -i "$f" -sameq -an -f yuv4mpegpipe - | yuvfps -s 60000:1001 -r 60000:1001 | ffmpeg -f yuv4mpegpipe -sameq -i - -sameq -s 1280x720 -f mpeg2video -r 60000/1001 -threads 4 "${f:r}.mpeg"
end


*DV (*.mts) to flv

 ffmpeg.exe -i d:\dv\%FILENAME%.MTS -f flv -r 25 -vcodec flv -s 800x450 -aspect 16:9 -b 2000k -g 160 -cmp 2 -subcmp 2 -mbd 2 -flags +aic+cbp+mv0+mv4 -trellis 2 -acodec libmp3lame -ac 2 -ar 44100 -ab 256k %FILENAME%.flv

*WMV to flv

ffmpeg.exe -i %FILENAME%.wmv -f flv -r 25 -vcodec flv -b 2000k -g 160 -cmp 2 -subcmp 2 -mbd 2 -flags +aic+cbp+mv0+mv4 -trellis 2 -acodec libmp3lame -ac 2 -ar 44100 -ab 256k %FILENAME%.flv

*3gp to flv
ffmpeg.exe -i d:\dv\%FILENAME%.3gp -f flv -r 25 -vcodec flv -s 800x450 -aspect 16:9 -b 2000k -g 160 -cmp 2 -subcmp 2 -mbd 2 -flags +aic+cbp+mv0+mv4 -trellis 2 -acodec libmp3lame -ac 2 -ar 44100 -ab 256k %FILENAME%.flv

*3gp to xvid
ffmpeg -i %FILENAME%.3gp -c:v libxvid -b:v 2000k -aspect 16:9 -ar 22050 -q:v 2  %FILENAME%.avi

*3gp to xvid and remove audio
ffmpeg -i %FILENAME%.3gp -c:v libxvid -b:v 2000k -aspect 16:9 -ar 22050 -q:v 2 -an smoke.avi

mp3 codec
-c:a libmp3lame

h264 codec
-c:v libxh264

xvid codec
-c:v libxvid

No comments: