Travis ui tests (#57)
* Prepare travis is tests * Fix ffmpeg travis source * Trying xenial * Move shell scripts * Upload video assets * Upload video assets * Change text input method * Add ui test docker support * Fix travis docker build * Fix asset uploader * Fix dockerfile * Update dockerfile * Change writeText behavior * Fix type error * Fix exit codes * Fix types * fix upload * Fix writeText * Fix argument name * Add test scenarios * Enable vnc and change mqtt host
This commit is contained in:
21
scripts/prepareVideo.sh
Executable file
21
scripts/prepareVideo.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
cp app.mp4 original.mp4
|
||||
# The video starts with a few blank frames, we want to know when the stop
|
||||
ffprobe -f lavfi -i "movie=app.mp4,blackdetect[out0]" -show_entries tags=lavfi.black_start,lavfi.black_end -of default=nw=1 -v quiet > ffmpeg_info
|
||||
END_OF_BLACK=`cat ffmpeg_info | grep end | head -n1 | cut -d'=' -f2`
|
||||
|
||||
# Trim black frames at start
|
||||
ffmpeg -ss $END_OF_BLACK -i app.mp4 app2.mp4
|
||||
mv app2.mp4 app.mp4
|
||||
|
||||
# Generate gif palette
|
||||
ffmpeg -y -i app.mp4 -vf fps=10,scale=720:-1:flags=lanczos,palettegen palette.png
|
||||
|
||||
# Create gif
|
||||
ffmpeg -i app.mp4 -i palette.png -filter_complex "fps=10,scale=720:-1:flags=lanczos[x];[x][1:v]paletteuse" app.gif
|
||||
|
||||
# Clean up
|
||||
rm ffmpeg_info palette.png
|
||||
|
||||
mv app.mp4 ui-test.mp4
|
||||
mv app.gif ui-test.gif
|
||||
Reference in New Issue
Block a user