What command line applications can I use on OS X to get the movie running time? I would like to be able to do something like this:
$ running_time matrix.avi
136 min
|
What command line applications can I use on OS X to get the movie running time? I would like to be able to do something like this:
| ||||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Most commandline encoding tools can provide this information. Tack on some shell scripting to trim the output to just the line including duration. Tack on some more to process that line into your desired "xxx min" output. Exactly what you need for that depends on which tool you'd be using. (See the mplayer example for a suggestion.) Once you've got that, you can create a shell script or alias to run that command with FFMpeg:
Mplayer/Mencoder (ID_LENGTH is in seconds):
Transcode (with
| |||
|
feedback
|
|
| |||
|
feedback
|