]> git.plutz.net Git - rawnet/commitdiff
more reliable video meta data check (duration)
authorPaul Hänsch <paul@plutz.net>
Mon, 4 Oct 2021 20:09:35 +0000 (22:09 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 4 Oct 2021 20:09:35 +0000 (22:09 +0200)
page_video.sh

index 6d3a8ebf04ecf7fb9a794e877e9a93f0b85b5d28..9f214093b8f4dcabaad20657ec48c42f3558ecf4 100644 (file)
@@ -37,7 +37,7 @@ update_video(){
   esac; done
 
   if [ -f "$video" -a -r "$video" ]; then
-    arg="$(echo; ffprobe -show_entries stream=width,height,duration "$video" 2>&-)"
+    arg="$(echo; ffprobe -show_entries format=duration:stream=width,height "$video" 2>&-)"
     resx="${arg#*width=}"; resx="${resx%%${BR}*}"
     resy="${arg#*height=}"; resy="${resy%%${BR}*}"
     length="${arg#*duration=}"; length="${length%%${BR}*}"