Advertisement
Guest User

Bash tf2 render script

a guest
May 28th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. #!/bin/bash
  2. SAVE_PATH=$(pwd| sed 's/[\t ]/\\ /')
  3. FINISHED_DIR=/finished/
  4. FILE_NAME=$(date +%m-%d-%y-%T).webm #Filename will come out as current date + time started to render
  5. if [ ! -f $SAVE_PATH/render_.wav ] #Checking to see if the sound clip exists, this tells the script if there is anything to render.
  6. then
  7. notify-send "Nothing to render"
  8. exit
  9. fi
  10. FULL_PATH=$SAVE_PATH$FINISHED_DIR$FILE_NAME
  11. if [ ! -d $SAVE_PATH$FINISHED_DIR ] ; then
  12. echo Finished directory not found, creating one.
  13. mkdir $SAVE_PATH$FINISHED_DIR
  14. fi
  15. notify-send "Starting rendering of video"
  16. 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
  17. notify-send "Rendering Finished"
  18. 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
  19. rm $SAVE_PATH/render_* #Cleaning up.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement