From: Siraaj Khandkar Date: Sat, 28 Dec 2019 00:02:11 +0000 (-0500) Subject: Implement video-list X-Git-Url: https://git.xandkar.net/?p=khome.git;a=commitdiff_plain;h=64fc685a6c5216bc4f5fb06d2dd743dae66683ab Implement video-list adds durations to vido-find output --- 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" "{}" + '