2012년 10월 30일 화요일
2012년 10월 25일 목요일
Firefox sqlite-manager(plugin)를 firefox 없이 실행하기
* 아래 파일을 다운로드 받아 C:\Program Files (x86)\xulrunner 에 압축 해제
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/10.0.2/runtimes/xulrunner-10.0.2.en-US.win32.zip
* 아래 파일을 다운받아 C:\utils\sqlitemanager-xr-0.7.7-all에 압축 해제
http://sqlite-manager.googlecode.com/files/sqlitemanager-xr-0.7.7-all.zip
* 배치 파일에 아래 내용을 넣고 저장 & 실행
* xulrunner site
https://developer.mozilla.org/en-US/docs/XULRunner
* sqlite-manager site
http://sqlite-manager.googlecode.com
Install ffmpeg on Ubuntu 10.04 LTS
reference
http://ubuntuforums.org/showthread.php?t=786095
http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideLucid
$ mkdir /home/user0/ffmpeg_packages
$ cd /home/user0/ffmpeg_packages
$ sudo apt-get remove ffmpeg x264 libx264-dev yasm
$ sudo apt-get update
$ wget http://security.ubuntu.com/ubuntu/pool/multiverse/f/faac/libfaac0_1.26-0.1ubuntu2_amd64.deb
$ wget http://security.ubuntu.com/ubuntu/pool/multiverse/f/faac/libfaac-dev_1.26-0.1ubuntu2_amd64.deb
$ dpkg -i libfaac0_1.26-0.1ubuntu2_amd64.deb
$ sudo dpkg -i libfaac-dev_1.26-0.1ubuntu2_amd64.deb
$ sudo apt-get install -y build-essential git-core checkinstall texi2html \
libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev zlib1g-dev
* yasm
$ cd /home/user0/ffmpeg_packages
$ wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
$ tar xzvf yasm-1.2.0.tar.gz
$ cd yasm-1.2.0
$ ./configure
$ make
$ sudo checkinstall --pkgname=yasm --pkgversion="1.2.0" --backup=no --deldoc=yes --default
* x264
$ cd /home/user0/ffmpeg_packages
$ git clone --depth 1 git://git.videolan.org/x264
$ cd x264
$ ./configure --enable-static
$ make
$ sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes
* LAME
$ cd /home/user0/ffmpeg_packages
$ sudo apt-get remove libmp3lame-dev
$ sudo apt-get install nasm
$ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
$ tar xzvf lame-3.99.5.tar.gz
$ cd lame-3.99.5
$ ./configure --enable-nasm --disable-shared
$ make
$ sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99.5" --backup=no --default \
--deldoc=yes
* libvpx
$ cd /home/user0/ffmpeg_packages
$ git clone --depth 1 http://git.chromium.org/webm/libvpx.git
$ cd libvpx
$ ./configure
$ make
$ sudo checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
--default --deldoc=yes
* ffmpeg
$ cd /home/user0/ffmpeg_packages
$ git clone --depth 1 git://source.ffmpeg.org/ffmpeg
$ cd ffmpeg
$ ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \
--enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
$ make
$ sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
--deldoc=yes --default
$ hash x264 ffmpeg ffplay ffprobe
2012년 10월 5일 금요일
Convert video file using QuickTime for Java (MOV -> MP4)
1. Install QuickTime 7
http://www.apple.com/quicktime/
2. Copy QTJava.zip
Source : C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip
Destination : ${JAVA_HOME}/jre/lib/ext
--------------------------------------------------------------------------------
* sample code
--------------------------------------------------------------------------------
package quicktime;
import java.io.File;
import org.apache.commons.lang.time.StopWatch;
import quicktime.io.IOConstants;
import quicktime.io.OpenMovieFile;
import quicktime.io.QTFile;
import quicktime.std.StdQTConstants;
import quicktime.std.movies.Movie;
import quicktime.std.qtcomponents.MovieExporter;
import quicktime.util.QTUtils;
public class QtjConverter {
public static void main(String[] args) {
String src = "c:\\temp\\Wildlife.mov";
String dest = "c:\\temp\\Wildlife.mp4";
StopWatch sw = new StopWatch();
sw.start();
try {
boolean result = qtjConvert(src, dest);
System.out.println("result="+result);
}
catch ( Exception e ) {
e.printStackTrace();
}
sw.stop();
long time = sw.getTime();
System.out.println("time="+time);
}
public static boolean qtjConvert(String src, String dest) throws Exception {
boolean result = false;
QTSession.open();
try {
QTFile movieFile = new QTFile(src);
Movie movie = Movie.fromFile (OpenMovieFile.asRead(movieFile));
//MovieExporter
//new Thread (new Exporter(movie)).start();
QTFile destFile = new QTFile (new File (dest));
// int flags = StdQTConstants.createMovieFileDeleteCurFile |
// StdQTConstants.createMovieFileDontCreateResFile |
// StdQTConstants.showUserSettingsDialog;
int flags = StdQTConstants.createMovieFileDontCreateResFile;
// int type = StdQTConstants.kQTFileTypeMovie;
// type = QTUtils.toOSType("mpg4");
// type = QTUtils.toOSType("MooV");
// MovieExporter exporter = new MovieExporter (StdQTConstants.kQTFileTypeMovie);
// movie.convertToFile(null, destFile, StdQTConstants.kQTFileTypeMovie,
// StdQTConstants.kMoviePlayer, IOConstants.smSystemScript,
// StdQTConstants.showUserSettingsDialog | StdQTConstants.movieToFileOnlyExport
// | StdQTConstants.movieFileSpecValid, exporter);
// movie.convertToFile(destFile, StdQTConstants.kQTFileTypeMovie, 0, 0);
// movie.convertToFile(destFile, StdQTConstants.kQTFileTypeMovie, StdQTConstants.kMoviePlayer, IOConstants.smAllScripts, flags);
// movie.convertToFile(destFile, StdQTConstants.kQTFileTypeMovie, StdQTConstants.kMoviePlayer, IOConstants.smSystemScript, flags);
// movie.convertToFile(destFile, QTUtils.toOSType("MooV"), 0, 0);
movie.convertToFile(destFile, QTUtils.toOSType("mpg4"), 0, 0);
result = true;
}
catch ( Exception e ) {
throw e;
}
QTSession.close();
return result;
}
}
피드 구독하기:
글 (Atom)