76c8f3dc2a83f5c6bc190e87a43f0b2a03b47613
4 # Use ffprobe to get media container length in seconds (float)
5 # Usage: get_media_length arg1
6 # Input: arg1: path to file
7 # Output: stdout: seconds (float)
8 # Depends: ffprobe 4.1.8
9 # Ref/Attrib: [1] How to get video duration in seconds? https://superuser.com/a/945604
12 if [[ ! -f $file_in ]]; then
13 die
"ERROR:Not a file:$file_in";
15 ffprobe
-v error
-show_entries format
=duration
-of default
=noprint_wrappers
=1:nokey
=1 "$file_in";
16 } # Get media container length in seconds via stdout
18 # Author: Steven Baltakatei Sandoval