From 64fc685a6c5216bc4f5fb06d2dd743dae66683ab Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Fri, 27 Dec 2019 19:02:11 -0500 Subject: [PATCH] Implement video-list adds durations to vido-find output --- home/bin/video-list | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 home/bin/video-list diff --git a/home/bin/video-list b/home/bin/video-list new file mode 100755 index 0000000..89bd76e --- /dev/null +++ b/home/bin/video-list @@ -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" "{}" + ' -- 2.20.1