Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- SAVE_PATH=$(pwd| sed 's/[\t ]/\\ /')
- FINISHED_DIR=/finished/
- FILE_NAME=$(date +%m-%d-%y-%T).webm #Filename will come out as current date + time started to render
- if [ ! -f $SAVE_PATH/render_.wav ] #Checking to see if the sound clip exists, this tells the script if there is anything to render.
- then
- notify-send "Nothing to render"
- exit
- fi
- FULL_PATH=$SAVE_PATH$FINISHED_DIR$FILE_NAME
- if [ ! -d $SAVE_PATH$FINISHED_DIR ] ; then
- echo Finished directory not found, creating one.
- mkdir $SAVE_PATH$FINISHED_DIR
- fi
- notify-send "Starting rendering of video"
- ffmpeg -f image2 -pattern_type glob -framerate 30 -i 'render_*.tga' -i render_.wav -c:v libvpx -b:v 8000k -b:a 192k $FULL_PATH
- notify-send "Rendering Finished"
- mplayer /mnt/SolidState/steamapps/common/Team\ Fortress\ 2/tf/custom/hitsound/sound/ui/killsound.wav #This can be whatever you want, just point it at a sound file
- rm $SAVE_PATH/render_* #Cleaning up.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement