R
Ralph
Dear All,
I would like to extract and edit .mpg video clip properties info.
Including
Stream: MPEG
File Name: a.mpg
Last Modified: Sat, 19 Jul 2003 18:59:10 GMT
File Size: 3,401,288 Bytes
Title: a.mpg
Author:
Copyright:
Comments:
Cover Arts:
Duration: 00:48.142
Buffer Time: 1.5 seconds
Max Bit Rate: 734.8 Kbps
Avg Bit Rate: 565.2 Kbps
Currently I am using the following code. but Can't extract all the
info I need.
String file = "file://C:/tmp/8Mile.mp3";
MediaLocator mediaLocator = new MediaLocator(file);
// media Player
Player player = null;
Processor processor = null;
try {
DataSource ds;
ds = new DataSource();
ds.setLocator(mediaLocator);
ds.connect();
processor = Manager.createProcessor(ds);
processor.configure();
System.out.println("getState:" + processor.getState());
processor.realize();
//player = Manager.createRealizedPlayer(mediaLocator);
System.out.println("Duration:" +
processor.getDuration().getSeconds());
System.out.println("Rate:" + processor.getRate());
System.out.println("ContentType:" +
processor.getContentDescriptor().getContentType());;
System.out.println("MediaTime:" +
processor.getMediaTime().getSeconds());
//player = Manager.createPlayer(ds);
//System.out.println("Player Rate:" + player.getRate());
} catch (NoPlayerException ex) {
ex.printStackTrace();
System.out.println(ex.getMessage());
} catch (IOException ex) {
System.out.println(ex.getMessage());
}
I would like to extract and edit .mpg video clip properties info.
Including
Stream: MPEG
File Name: a.mpg
Last Modified: Sat, 19 Jul 2003 18:59:10 GMT
File Size: 3,401,288 Bytes
Title: a.mpg
Author:
Copyright:
Comments:
Cover Arts:
Duration: 00:48.142
Buffer Time: 1.5 seconds
Max Bit Rate: 734.8 Kbps
Avg Bit Rate: 565.2 Kbps
Currently I am using the following code. but Can't extract all the
info I need.
String file = "file://C:/tmp/8Mile.mp3";
MediaLocator mediaLocator = new MediaLocator(file);
// media Player
Player player = null;
Processor processor = null;
try {
DataSource ds;
ds = new DataSource();
ds.setLocator(mediaLocator);
ds.connect();
processor = Manager.createProcessor(ds);
processor.configure();
System.out.println("getState:" + processor.getState());
processor.realize();
//player = Manager.createRealizedPlayer(mediaLocator);
System.out.println("Duration:" +
processor.getDuration().getSeconds());
System.out.println("Rate:" + processor.getRate());
System.out.println("ContentType:" +
processor.getContentDescriptor().getContentType());;
System.out.println("MediaTime:" +
processor.getMediaTime().getSeconds());
//player = Manager.createPlayer(ds);
//System.out.println("Player Rate:" + player.getRate());
} catch (NoPlayerException ex) {
ex.printStackTrace();
System.out.println(ex.getMessage());
} catch (IOException ex) {
System.out.println(ex.getMessage());
}