@@ -84,6 +84,20 @@ runecho(){
$target_exec $target_path/"$@" >&3
}
+# $1=regex $2..$n=command
+# catch av_log messages
+rungetavlogs(){
+ test "${V:-0}" -gt 0 && echo "$target_exec" $target_path/"${@:2}" >&3
+ $target_exec $target_path/"${@:2}" 3>&2 2>&1 1>&3|awk -F' ' "{
+ if (/${@:1:1}/) {
+ for(i=4; i<=NF; ++i)
+ printf \$i FS
+ print \"\"
+ } else {
+ print > \"/dev/stderr\"}
+ }"
+}
+
probefmt(){
run ffprobe${PROGSUF} -show_entries format=format_name -print_format default=nw=1:nk=1 -v 0 "$@"
}