Skip to content

Commit

Permalink
Improve weston-video-convert clarity. Correct the move of the Weston …
Browse files Browse the repository at this point in the history
…wcap files

git-svn-id: https://svn.code.sf.net/p/rebeccablackos/code@6436 b52b6941-3400-464c-9f42-43200397181c
  • Loading branch information
nerdopolis committed May 20, 2020
1 parent f7f65e0 commit a3855d1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
29 changes: 20 additions & 9 deletions rebeccablackos_files/usr/bin/weston-video-convert
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,28 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

#This script processess various output files from Weston, by calling upon some helpers to convert the output files into a playable format, or to copy screenshots into a random ID so that the next screenshot doesn't overwrite it
export FILENAMEID=$RANDOM

zenity --info --text="Converting any existing Weston screen recorded files into usable video files to $HOME/weston-screenshots.
if [[ -e ~/capture.wcap || -e ~/capture.h264 ]]
then
export FILENAMEID=$RANDOM

This dialog will close 5 seconds after all jobs complete" &
zenityjob=$!
zenity --info --width=500 --text="Converting any existing Weston screen recorded files into playable video files to $HOME/weston-screenshots." &
zenityjob=$!

mkdir ~/weston-screenshots
if [[ -e ~/capture.wcap ]]
then
vte -c /usr/libexec/wayland_helpers/weston-video-convert-helper
fi

if [[ -e ~/capture.h264 ]]
then
vte -c /usr/libexec/wayland_helpers/weston-video-convert-helper-264
fi
kill -9 $zenityjob
else
zenity --info --width=500 --text="This utility will convert any Weston recorded capture files into playable video files, however none exist right now. See the help dialog on how to initiate a screen recording"
fi

mkdir ~/weston-screenshots
vte -c /usr/libexec/wayland_helpers/weston-video-convert-helper
vte -c /usr/libexec/wayland_helpers/weston-video-convert-helper-264


sleep 5
kill -9 $zenityjob
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ fi
if [[ -e ~/capture.wcap ]]
then
wcap-decode --yuv4mpeg2 ~/capture.wcap | vpxenc --target-bitrate=1024 --best -t 4 -o ~/weston-screenshots/$NewFileName - --codec=vp8
mv ~/capture.wcap ~/weston-screenshots/$(date +%s)capture.wcap/
mv ~/capture.wcap ~/weston-screenshots/$(date +%s)capture.wcap
fi
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ fi
if [[ -e ~/capture.h264 ]]
then
gst-launch-1.0 filesrc location=~/capture.h264 ! h264parse ! mp4mux ! filesink location=~/weston-screenshots/$NewFileName
mv ~/capture.h264 ~/weston-screenshots/$(date +%s)capture.h264/
mv ~/capture.h264 ~/weston-screenshots/$(date +%s)capture.h264
fi

0 comments on commit a3855d1

Please sign in to comment.