From 55dd79aebd3b1a83c01613a78a3128f0d7ee48a2 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Sun, 3 Mar 2019 00:13:56 +0100 Subject: [PATCH] Change recording resolution --- scripts/prepareVideo.sh | 7 ++++--- scripts/uiTests.sh | 2 +- src/electron.ts | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/prepareVideo.sh b/scripts/prepareVideo.sh index 883bd04..0394956 100755 --- a/scripts/prepareVideo.sh +++ b/scripts/prepareVideo.sh @@ -1,5 +1,6 @@ #!/bin/bash -DIMENSIONS="1280x720" +DIMENSIONS="1024x720" +GIF_SCALE="1024" ffmpeg -s:v $DIMENSIONS -r 20 -f rawvideo -pix_fmt yuv420p -i qrawvideorgb24.yuv app2.mp4 @@ -14,10 +15,10 @@ END_OF_BLACK=`awk "BEGIN {print $END_OF_BLACK+0.8; exit}"` ffmpeg -s:v $DIMENSIONS -r 20 -f rawvideo -pix_fmt yuv420p -i qrawvideorgb24.yuv -ss $END_OF_BLACK app.mp4 # Generate gif palette -ffmpeg -y -s:v $DIMENSIONS -r 20 -f rawvideo -pix_fmt yuv420p -i qrawvideorgb24.yuv -vf fps=10,scale=1280:-1:flags=lanczos,palettegen palette1024.png +ffmpeg -y -s:v $DIMENSIONS -r 20 -f rawvideo -pix_fmt yuv420p -i qrawvideorgb24.yuv -vf "fps=10,scale=$GIF_SCALE:-1:flags=lanczos,palettegen" palette1024.png # Create gif -ffmpeg -s:v $DIMENSIONS -r 20 -f rawvideo -pix_fmt yuv420p -i qrawvideorgb24.yuv -i palette1024.png -ss $END_OF_BLACK -filter_complex "fps=10,scale=1280:-1:flags=lanczos[x];[x][1:v]paletteuse" app720.gif +ffmpeg -s:v $DIMENSIONS -r 20 -f rawvideo -pix_fmt yuv420p -i qrawvideorgb24.yuv -i palette1024.png -ss $END_OF_BLACK -filter_complex "fps=10,scale=$GIF_SCALE:-1:flags=lanczos[x];[x][1:v]paletteuse" app720.gif # Clean up rm ffmpeg_info palette*.png qrawvideorgb24.yuv diff --git a/scripts/uiTests.sh b/scripts/uiTests.sh index 905346d..ebe850f 100755 --- a/scripts/uiTests.sh +++ b/scripts/uiTests.sh @@ -9,7 +9,7 @@ function finish { trap finish EXIT -DIMENSIONS="1280x720" +DIMENSIONS="1024x720" SCR=99 # Start new window manager Xvfb :$SCR -screen 0 "$DIMENSIONS"x24 -ac & diff --git a/src/electron.ts b/src/electron.ts index 551dd4d..bcad8f4 100644 --- a/src/electron.ts +++ b/src/electron.ts @@ -33,8 +33,8 @@ function createWindow() { const iconPath = path.join(__dirname, 'icon.png') // Create the browser window. mainWindow = new BrowserWindow({ - width: runningUiTestOnCi ? 1280 : 1024, - height: runningUiTestOnCi ? 720 : 700, + width: 1024, + height: 720, show: false, webPreferences: { nodeIntegration: true,