public:ffmpeg-based_interval_timer_for_sport_and_exercise
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
public:ffmpeg-based_interval_timer_for_sport_and_exercise [2018/02/09 18:06] – fangfufu | public:ffmpeg-based_interval_timer_for_sport_and_exercise [2018/02/09 18:19] – fangfufu | ||
---|---|---|---|
Line 12: | Line 12: | ||
<code bash> | <code bash> | ||
#!/bin/bash | #!/bin/bash | ||
+ | # Copyright < | ||
+ | # | ||
+ | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
+ | # of this software and associated documentation files (the " | ||
+ | # in the Software without restriction, | ||
+ | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
+ | # copies of the Software, and to permit persons to whom the Software is | ||
+ | # furnished to do so, subject to the following conditions: | ||
+ | # | ||
+ | # The above copyright notice and this permission notice shall be included in all | ||
+ | # copies or substantial portions of the Software. | ||
+ | # | ||
+ | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
+ | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
+ | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
+ | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
+ | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
+ | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
+ | # SOFTWARE. | ||
# The content of the set | # The content of the set | ||
Line 86: | Line 105: | ||
function cleanup { | function cleanup { | ||
- | rm seg-*.mp4 filelist.txt intro.txt | + | rm -f seg-*.mp4 filelist.txt intro.txt |
} | } | ||
Line 106: | Line 125: | ||
sec=${2} | sec=${2} | ||
textNow=${3} | textNow=${3} | ||
- | textNext=$(echo "Next -" | + | textNext=$(echo "Next -" ${4}) |
ffmpeg -f lavfi -i color=c=white: | ffmpeg -f lavfi -i color=c=white: | ||
-vf "\ | -vf "\ | ||
Line 140: | Line 159: | ||
textNow=$(echo $thisLine|cut -d ' ' -f 2-) | textNow=$(echo $thisLine|cut -d ' ' -f 2-) | ||
- | let segNext=${1}+1 | + | let nextSeg=${1}+1 |
- | | + | |
- | videoSegment $min $sec " | + | videoSegment $min $sec "${textNow}" "${nextLine}" |
} | } | ||
################################################################################ | ################################################################################ |
public/ffmpeg-based_interval_timer_for_sport_and_exercise.txt · Last modified: 2018/03/31 00:38 by 127.0.0.1