Advertisement
Guest User

Untitled

a guest
Oct 9th, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement