Thursday, October 21, 2010

ffmpeg

download :http://ffmpeg.arrozcru.org/autobuilds/ffmpeg-latest-mingw32-static.7z from http://ffmpeg.arrozcru.org/autobuilds/

ffmpeg : http://www.ehow.com/how_4716678_install-ffmpeg-windows.html

combine 2 files in wondows
  1.  convert the required files to mpg first
  2. use any of the tricks in http://txpress.blogspot.com/2007/01/join-multiple-video-mpg-files-in.html
  3. and change it to flv  ffmpeg -i kilichundan_mambazham4.mpg kilichundan_mambazham4.flv


php ffmpeg: http://forums.about.com/n/pfx/forum.aspx?tsn=1&nav=messages&webtag=ab-php&tid=274
sample ffmpeg commad: http://stackoverflow.com/questions/43890/crop-mp3-to-first-30-seconds
phpclass: http://www.phpclasses.org/package/3747-PHP-Manipulate-and-convert-videos-with-ffmpeg-program.html

Batch operations example

:: http://backroom.bostonproductions.com/?p=378
:: save this as doConvert.bat and CALL this batch file as
::  for %i IN (*.flv) DO (doConvert.bat %i)

IF EXIST %~d1%~p1%~n1.mp3 GOTO exit

@echo ————————— >> "%~d1%~p1%convert.log"
@echo Conversion for %1 started on %DATE% %TIME%  >> "%~d1%~p1%convert.log"

ffmpeg -i %~d1%~p1%~n1.flv -ss 60 -t 30  samples/%~n1_sample.mp3

@echo ————– DONE – SUCCESS ———————- >> "%~d1%~p1%convert.log"

:exit
@echo ——————————– >> “%~d1%~p1%convert.log”
@echo “%~d1%~p1%~n1.jpg” already exists >> “%~d1%~p1%convert.log”


CROPPING:
http://ffmpeg.org/ffmpeg-doc.html#SEC74
ffmpeg -i fullmovie.mpg -vf  "crop=in_w-2*10:in_h-2*30" fm.mpg

Crop syntax is:
crop=width:height:x:y

so to chop 10 pixels from bottm
so you simply need to specify
crop=in_w:in_h-10:0:0