Hi
Please can somebody suggest a way how to extract the duration of a file using 
FFprobe, in minutes, rounded up.

I found this with a web search but it's old and looks clumsy. 

ffmpeg -i foo.ts 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// | sed 
's@\..*@@g' | awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 
60*A[2] + B[1] }'

With my test file foo.ts the duration is... Duration: 00:15:14.90
I would like the answer to read 16.
(Then I can use this answer to determine what to do with the file. eg short 
files converted to flac, long files converted to ogg)


~$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l

$ ffmpeg -v
ffmpeg version git-2016-08-02-e9659d1

_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to