VirtualDub
convert in.png -resize 640x480 out.png
convert in.png -crop 640x480+10+10 out.png
convert in.png -gravity center -extent 1420x1420 out.png convert in.png -extent 1420x1420-10-10 out.png
Simple text:
convert in.png \ -pointsize 20 -fill red -draw 'text 10,30 "My text" ' \ out.png
Text with shadow:
convert in.png \ -gravity SouthEast \ -stroke '#000C' -strokewidth 2 -annotate 0 "My text" \ -stroke none -fill white -annotate 0 "My text" \ out.png
convert in1.png in2.png +append out.png # horizontally convert in1.png in2.png -append out.png # vertically
More complex:
convert im1.png -resize 640x480 ppm:- \
| convert im2.png - +append ppm:- \
| convert im3.png - -append final.png
convert -density 600x600 -flatten -depth 8 -colorspace RGB file.eps ppm:- | convert - file.png
exiftool -overwrite_original -Orientation="Horizontal (normal)" <file>
(comes with mplayer).
http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide
General syntax:
mencoder \ <input data> \ <input options> \ <output options> \ <output data>
mencoder \ <input_file_1> <input_file_2> ... \ <input options> \ <output options> \ <output data>
mencoder \ "mf://img.o.*.PNG" \ -mf fps=25 \ <output options> \ <output data>
mencoder \ - \ -demuxer lavf -lavfdopts format=mjpeg \ <output options> \ <output data>
-vf yadif=0 : deinterlace-vf scale=640:480 : scale video-vf pp=? : post processing subfilters
Specify the video codec with -ovc option, and audio codec with -oac option. copy is possible with both.
mencoder \ <input data> \ <input options> \ -ovc xvid -xvidencopts bitrate=800:quant_type=mpeg:gmc:chroma_opt:vhq=4:bvhq=1:trellis \ -o <output_file>
xvid encode options:
bitrate=<value>: constant bitrate, in kbsfixed_quant=<1-31>: constant quantization (quality), lower is bettertrellis : speeds up encodingmencoder \ <input data> \ <input options> \ -ovc x264 -x264encopts bitrate=800 \ -o <output_file>
x264 encode options:
bitrate=<value>: constant bitrate, in kbscrf=<1.0-50.0>: constant quality, lower is bettermencoder \ <input data> \ <input options> \ -ovc lavc -ffourcc VP80 -of lavf -lavfopts format=webm -lavcopts vcodec=libvpx:vqscale=22.0 \ -o <output_file>
lavc options:
vbitrate=<value>: constant bitrate, in kbsvqscale=<1.0-31.0>: constant quantization (quality), lower is bettermencoder \ <input data> \ <input options> \ -oac mp3lame -lameopts abr:br=128 \ -o <output_file>
mencoder -ss 10:00 -endpos 30 -ovc copy -oac copy movie.avi -o submovie.avi
A GUI easier to use, like VirtualDub for Windows.
=> lame
To encode from wav to mp3 in “speech” quality :
lame -V2 --vbr-new -q0 --lowpass 10 -s 22.05 -b32 file.wav file.mp3
(using vorbis-tools package)
=> oggenc
To encode from wav to ogg in “speech” quality :
oggenc -b 32 --downmix --resample 22050 file.wav -o file.ogg
Converting from ogg to ogg in “speech” quality :
oggdec -b 16 -R file.ogg -o - | oggenc -r -B 16 -C 1 -b 32 --resample 22050 - -o file_recomp.ogg
play, record, process
sox in_file.wav out_file.wav trim 2:37:32 4:00
ffmpeg -i video.avi sound.mp3