mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-27 23:13:07 +01:00
Add audio preview
This commit is contained in:
parent
08095635bc
commit
486c69cccb
@ -42,6 +42,7 @@ Preview b_previews[] = {
|
|||||||
PR(NULL, "image", NULL, image, PREV_ATTR_NONE),
|
PR(NULL, "image", NULL, image, PREV_ATTR_NONE),
|
||||||
PR(NULL, "image", "svg+xml", svg, PREV_ATTR_NONE),
|
PR(NULL, "image", "svg+xml", svg, PREV_ATTR_NONE),
|
||||||
PR(NULL, "video", NULL, video, PREV_ATTR_NONE),
|
PR(NULL, "video", NULL, video, PREV_ATTR_NONE),
|
||||||
|
PR(NULL, "audio", NULL, audio, PREV_ATTR_NONE),
|
||||||
|
|
||||||
PR(NULL, "application", "pdf", pdf, PREV_ATTR_NONE),
|
PR(NULL, "application", "pdf", pdf, PREV_ATTR_NONE),
|
||||||
PR(NULL, "application", "json", jq, PREV_ATTR_NONE),
|
PR(NULL, "application", "json", jq, PREV_ATTR_NONE),
|
||||||
|
12
sh/prev/audio.sh
Normal file
12
sh/prev/audio.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# audio: ffmpegthumbnailer ffmpeg
|
||||||
|
|
||||||
|
audio() {
|
||||||
|
ffmpegthumbnailer -i "$f" -s 0 -q 50% -t 10 -o "$cache_f" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
x="$(ffmpeg -hide_banner -i "$f" 2>&1)"
|
||||||
|
|
||||||
|
printf '%s\n' "$x"
|
||||||
|
y=$((y + $(printf '%s\n' "$x" | wc -l)))
|
||||||
|
|
||||||
|
convert_and_show_image audio
|
Loading…
Reference in New Issue
Block a user