Implement video-list
authorSiraaj Khandkar <siraaj@khandkar.net>
Sat, 28 Dec 2019 00:02:11 +0000 (19:02 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sat, 28 Dec 2019 00:02:11 +0000 (19:02 -0500)
adds durations to vido-find output

home/bin/video-list [new file with mode: 0755]

diff --git a/home/bin/video-list b/home/bin/video-list
new file mode 100755 (executable)
index 0000000..89bd76e
--- /dev/null
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+video-find $@ \
+| xargs \
+    -0 \
+    -P "$(nproc)" \
+    -I {} \
+    sh -c '
+        duration=$(ffprobe \
+            -i "{}" \
+            -show_entries \
+            format=duration \
+            -v quiet \
+            -of csv="p=0" \
+            -sexagesimal)
+        printf "%s\t%s\n" "$duration" "{}"
+        '
This page took 0.025812 seconds and 4 git commands to generate.