# copy first 100 seconds
$ ffmpeg -i input.avi output.avi -t 100
http://forum.videohelp.com/topic329701.html
http://videotranscoding.wikispaces.com/mencoder
slower but with better quality and slightly better compression
$ mencoder ./in.MOV -o ./out.avi -oac pcm -ovc xvid -xvidencopts bitrate=740:par=pal43:qpel -vf scale=480:360,tfields -mc 0 -vf harddup
$ mencoder vid.wmv -o vid.avi -oac mp3lame -ovc xvid -xvidencopts bitrate=3000:pass=1 -vf scale=640:480
$ mencoder -ovc lavc -oac pcm -of lavf -lavfopts format=av ./input.MOV -o ./output.avi
Split
mencoder -ovc xvid -xvidencopts bitrate=740:par=pal43:qpel -vf scale=480:360,tfields -fps 50 -oac mp3lame -lameopts mode=1:cbr:aq=1:br=192 -mc 0 -vf harddup -ss 01:00:00 0 -endpos 02:00:00 -oac copy -ovc copy movie.avi -o second_half.avi
This will grab the segment between the first and second hour marks of the video.
-ss indicates where you want to start the encoding (1 hr from the start of the video 00:00:00).
-endpos indicates where you want to end (duration of 2 hours from -ss).
http://ubuntuliving.blogspot.com/2008/03/splitting-avi-file-into-smaller-parts.html
Convert
#!/bin/bash
#w=640; h=480; br=1600
w=320; h=240; br=800
#r="-vop mirror,rotate=x" [x=0..3]
#-ffourcc DX50 $r -o "$1".new "$1"
for i in 1 2
do
mencoder -vf scale=$w:$h -ofps 30000/1001 -channels 1 -srate 11025 -oac mp3lame -lameopts mode=3:abr:br=16 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$br:vpass=$i -ffourcc DX50 -o "$1".new "$1"
done
Got the code from the link below and customized it a bit. Converted a 700mb wmv 640x480 file to 500mb mpg 320x480 with this script. Couldn't hear anything from the source wmv though.
http://marc.merlins.org/linux/technotes/mencoder_camera_encoding/README.html
RM to FLV
mencoder input.rm -o output.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
-----------
ext='avi'
mkdir flv_dir
for i in `ls *.$ext`
do
echo $i
ofile=`basename $i $ext`flv
mencoder -o $ofile "$i" -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=1:mv0:trell:v4mv:cbp:last_pred=3 -mc 0 -vf harddup > out.log 2> err.log
mv $ofile flv_dir
done
No comments:
Post a Comment