[tovid] r3533 committed - Add _pipe to is_video() test...

1 view
Skip to first unread message

to...@googlecode.com

unread,
Feb 17, 2015, 8:07:17 PM2/17/15
to tovi...@googlegroups.com
Revision: 3533
Author: grepper
Date: Wed Feb 18 01:07:04 2015 UTC
Log: Add _pipe to is_video() test

Some images return png_pipe, ppm_pipe etc. instead of image2

https://code.google.com/p/tovid/source/detail?r=3533

Modified:
/trunk/tovid/src/todisc

=======================================
--- /trunk/tovid/src/todisc Sun Feb 15 22:48:56 2015 UTC
+++ /trunk/tovid/src/todisc Wed Feb 18 01:07:04 2015 UTC
@@ -698,14 +698,13 @@
ff_ver=$($FFmpeg -version 2>&1 | awk '{ gsub(",", ""); if(NR == 1) print
$3 }')
(( ${ff_ver:2:1} == test_version )) 2>/dev/null
}
-
+
# check if file is a video. Usage: is_video FILE
-is_video ()
+is_video()
{
local result=$($FFmpeg -i "$1" 2>&1);
# ffmpeg calls an image a video stream, so eliminate that
- grep -qi image2 <<< "$result" && return 1;
-
+ grep -E -qi 'image2|_pipe' <<< "$result" && return 1;
grep -qi Stream.*Video <<< "$result"
}

Reply all
Reply to author
Forward
0 new messages