Suppose we have video file some_video.
How to get length of it from a shell script (with mplayer/transcode/gstreamer/vlc/ffmpeg/whatever)?
VIDEO_LENGTH_IN_SECONDS=`ffmpeg .... -i some_video ... | grep -o .....`
|
feedback
|
|
Something similar to:
This will deliver: To convert into seconds (and retain the milliseconds), pipe into:
If you don't want the milliseconds, pipe into:
Example:
| ||||
|
feedback
|