From 7ac45ee235517114f6382810e3f1671e3fe715cc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 15 Mar 2025 11:33:20 +0100 Subject: Prefix filenames for ffmpeg/ffprobe with file:, and tell when - is not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- ffuse-frame | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ffuse-frame') diff --git a/ffuse-frame b/ffuse-frame index d556203..2541e7c 100755 --- a/ffuse-frame +++ b/ffuse-frame @@ -30,11 +30,21 @@ fi in_file="$1" if test -z "${in_file}"; then usage +elif test ! "${in_file}" = -; then + in_file="file:${in_file}" +else + printf '%s: - is not supported for in-file\n' "$0" >&2 + exit 1 fi out_file="$2" if test -z "${out_file}"; then usage +elif test ! "${out_file}" = -; then + out_file="file:${out_file}" +else + printf '%s: - is not supported for out-file\n' "$0" >&2 + exit 1 fi ffmpeg -i "${in_file}" -ss "${ss}" -update 1 -frames:v 1 -c:v png -f image2pipe - | \ -- cgit v1.2.3-70-g09d2