SHARE
TWEET

Untitled

a guest Oct 9th, 2019 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. musi="$(find . -type f \( -name "*.ogg" -or -name "*.mp3" -or -name "*.flac" \) | head -n 1)"
  3. gifi="$(find . -type f \( -name "*.gif" -or -name "*.jpg" -or -name "*.png" \) | head -n 1)"
  4. if [ -z "$musi" ]
  5. then
  6. echo NO AUDIO
  7. else
  8. if [ -z "$gifi" ]
  9. then
  10. echo NO IMAGE
  11. else
  12. ffmpeg -i "$musi" -f gif -stream_loop -1 -i "$gifi" -c:a libvorbis -qscale:a 0 -c:v libvpx -b:v 416k -crf 44 -pix_fmt yuv420p -shortest $(date +"%s%H%S").webm
  13. rm "$musi"
  14. rm "$gifi"
  15. fi
  16. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top