#!/bin/sh #${1}ffmpeg -threads 4 -i ${2} -vf "movie=${1}logo.png [watermark];[in][watermark] overlay=main_w-overlay_w-10:12 [out]" ${4} && #${1}ffmpeg -i ${4} -y -f image2 -t 0.001 ${3}&&echo 1 ff=$(${1}ffmpeg -i ${2} 2>&1) d="${ff#*Video: }" size=$(echo $d|awk -F, '{print $3}') width=$(echo $size|awk -Fx '{print $1}') height=$(echo $size|awk -Fx '{print $2}') ${1}ffmpeg -y -i ${2} -vf "movie=${1}logo.png,scale = 161*(${width}/480):25*(${height}/480) [watermark];[in][watermark] overlay=main_w-overlay_w-10:12 [out]" ${4} ${1}ffmpeg -i ${4} -y -f image2 -t 0.001 ${3}&&echo 1