Example:
Taglib: http://java.sun.com/jsp/jstl/core (Core)
Prefix: c
Thursday, May 27, 2010
Tuesday, May 11, 2010
Using ProcessBuilder in java to run FFMPEG command to create thumbnail
String dimension = iThumbnailHeight+"X"+iThumbnailWidth;
ProcessBuilder pb = new ProcessBuilder(pathToFFMPEG,"-i",pathToSrcFile, "-s",dimension,"-ss","00:00:01.00","-vcodec","mjpeg","-vframes","1","-f","image2",tempFilePath);
pb.redirectErrorStream(true);
System.out.println("---------"+pb.command());
Process p = pb.start();
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = null;
while((line=br.readLine())!=null){
System.out.println("---------"+line);
}
System.out.println("----wait over--- "+p.waitFor());
Note: Notice number of argumants to ProcessBuilder Constructor . You should same number of arguments , as command line input options. Check each option is send separately as argument.
ProcessBuilder pb = new ProcessBuilder(pathToFFMPEG,"-i",pathToSrcFile, "-s",dimension,"-ss","00:00:01.00","-vcodec","mjpeg","-vframes","1","-f","image2",tempFilePath);
pb.redirectErrorStream(true);
System.out.println("---------"+pb.command());
Process p = pb.start();
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = null;
while((line=br.readLine())!=null){
System.out.println("---------"+line);
}
System.out.println("----wait over--- "+p.waitFor());
Note: Notice number of argumants to ProcessBuilder Constructor . You should same number of arguments , as command line input options. Check each option is send separately as argument.
Friday, May 7, 2010
TOP 10 BABY NAMES
BOY : Aidan , Caden , Caleb , Ethan ,Jackson , Jacob, Landon , Liam ,Lucas , Noah
GIRL : Ava , Amelia , Chloe , Emma , Isabella , Lily , Madeline , Olivia , Sophia ,Abigail
GIRL : Ava , Amelia , Chloe , Emma , Isabella , Lily , Madeline , Olivia , Sophia ,Abigail
How to check MYSQL server status on linux
There are two ways to check-
1. Use command -
# mysqladmin -u root -p status
-> it will give you uptime , threads etc , if server is runing otherwise it will give error report
2 Use -
$ mysql -u user -p
mysql> show status;
-> show status wil give you status in tabular form.
1. Use command -
# mysqladmin -u root -p status
-> it will give you uptime , threads etc , if server is runing otherwise it will give error report
2 Use -
$ mysql -u user -p
mysql> show status;
-> show status wil give you status in tabular form.
Subscribe to:
Posts (Atom)