make playlist more simple
This commit is contained in:
parent
f92a43cb33
commit
b6ed000228
26
README.md
26
README.md
@ -30,19 +30,19 @@ XML Playlist Example
|
||||
```xml
|
||||
<playlist>
|
||||
<head>
|
||||
<meta name="author" content="example"/>
|
||||
<meta name="title" content="Live Stream"/>
|
||||
<meta name="copyright" content="(c)2018 example.org"/>
|
||||
<meta name="date" content="2018-02-03"/>
|
||||
</head>
|
||||
<body>
|
||||
<video src="/path/clip_01.mkv" begin="21600" dur="18.000000" in="0.00" out="18.000000"/>
|
||||
<video src="/path/clip_02.mkv" begin="21618" dur="18.111000" in="0.00" out="18.111000"/>
|
||||
<video src="/path/clip_03.mkv" begin="21636.1" dur="247.896000" in="0.00" out="247.896000"/>
|
||||
<video src="/path/clip_04.mkv" begin="21884" dur="483.114000" in="0.00" out="483.114000"/>
|
||||
<video src="/path/clip_05.mkv" begin="22367.1" dur="20.108000" in="0.00" out="20.108000"/>
|
||||
<video src="/path/clip & specials.mkv" begin="22387.2" dur="203.290000" in="0.00" out="203.290000"/>
|
||||
<video src="/path/clip_06.mkv" begin="22590.5" dur="335.087000" in="300.00" out="335.087000"/>
|
||||
<meta name="author" content="example"/>
|
||||
<meta name="title" content="Live Stream"/>
|
||||
<meta name="copyright" content="(c)2018 example.org"/>
|
||||
<meta name="date" content="2018-02-03"/>
|
||||
</head>
|
||||
<body>
|
||||
<video src="/path/clip_01.mkv" begin="21600" dur="18.000000" in="0.00" out="18.000000"/>
|
||||
<video src="/path/clip_02.mkv" begin="21618" dur="18.111000" in="0.00" out="18.111000"/>
|
||||
<video src="/path/clip_03.mkv" begin="21636.1" dur="247.896000" in="0.00" out="247.896000"/>
|
||||
<video src="/path/clip_04.mkv" begin="21884" dur="483.114000" in="0.00" out="483.114000"/>
|
||||
<video src="/path/clip_05.mkv" begin="22367.1" dur="20.108000" in="0.00" out="20.108000"/>
|
||||
<video src="/path/clip & specials.mkv" begin="22387.2" dur="203.290000" in="0.00" out="203.290000"/>
|
||||
<video src="/path/clip_06.mkv" begin="22590.5" dur="335.087000" in="300.00" out="335.087000"/>
|
||||
</body>
|
||||
</playlist>
|
||||
```
|
||||
|
@ -42,7 +42,7 @@ while read -r line; do
|
||||
clipPath=$(echo "$line" | sed 's/&/&/g')
|
||||
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
|
||||
listStart="$( awk -v lS="$listStart" -v cD="$clipDuration" 'BEGIN{ print lS + cD }' )"
|
||||
|
Loading…
x
Reference in New Issue
Block a user