make playlist more simple

This commit is contained in:
jb_alvarado 2018-02-03 20:49:36 +01:00
parent f92a43cb33
commit b6ed000228
2 changed files with 14 additions and 14 deletions

View File

@ -42,7 +42,7 @@ while read -r line; do
clipPath=$(echo "$line" | sed 's/&/&/g') clipPath=$(echo "$line" | sed 's/&/&/g')
clipDuration=$( ffprobe -v error -show_format "$line" | awk -F= '/duration/{ print $2 }' ) clipDuration=$( ffprobe -v error -show_format "$line" | awk -F= '/duration/{ print $2 }' )
printf '\t<video src="%s" begin="%s" dur="%s" in="%s" out="%s"/>\n' "$clipPath" "$listStart" "$clipDuration" "0.0" "$clipDuration" >> "$trunk/$playlist" printf '\t\t<video src="%s" begin="%s" dur="%s" in="%s" out="%s"/>\n' "$clipPath" "$listStart" "$clipDuration" "0.0" "$clipDuration" >> "$trunk/$playlist"
# add start time # add start time
listStart="$( awk -v lS="$listStart" -v cD="$clipDuration" 'BEGIN{ print lS + cD }' )" listStart="$( awk -v lS="$listStart" -v cD="$clipDuration" 'BEGIN{ print lS + cD }' )"