Guest User

Skripty

a guest
Aug 9th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.67 KB | None | 0 0
  1. *** konvertuj.bash ***
  2.  
  3. input=$(ls -tc | grep .mp3 | head -1)
  4. input="${input%.*}"
  5. ffmpeg -loop 1 -r 2
  6. -i "$input.png" -i "$input.mp3" -c:v libx264 -preset ultrafast -tune
  7. stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p "$input.mkv"
  8.  
  9.  
  10. *** konvertuj2.bat ***
  11.  
  12. @echo off
  13. FOR /F "tokens=*" %%G IN ('dir/b /s ^"*.mp3^"') DO SET input=%%~nG
  14. ffmpeg -loop 1 -r 2 -i %input%.png -i "%input%.mp3" -c:v libx264 -preset ultrafast -c:a copy -tune stillimage -crf 18 -shortest -pix_fmt yuv420p "%input%.mkv"
  15.  
  16.  
  17. *** nahravaj.sh ***
  18.  
  19. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/pi/nahravky
  20. $(ps aux | grep -i '[w]get' | awk {'print $2'} | xargs kill)
  21. mkdir -p '/home/pi/nahravky/'$(date +%Y%m%d)
  22. wget -bq -t inf stream.slobodnyvysielac.sk:8000/stream -O '/home/pi/nahravky/'$(date +%Y%m%d/%Y%m%d_%H_%M_%S.m4a)
  23.  
  24.  
  25. *** udrzba.sh ***
  26.  
  27. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/pi/nahravky
  28. secs=60
  29. endTime=$(( $(date +%s) + secs ))
  30. while [ $(date +%s) -lt $endTime ]; do
  31. case "$(pidof wget | wc -w)" in
  32. 0)      mkdir -p '/home/pi/nahravky/'$(date +%Y%m%d)
  33.         wget -bq -t inf stream.slobodnyvysielac.sk:8000/stream -O '/home/pi/nahravky/'$(date +%Y%m%d/%Y%m%d_%H_%M_%S.m4a)
  34.         ;;
  35. 1)      ;;
  36. esac
  37. sleep 1
  38. done
  39.  
  40.  
  41. Odkazy:
  42. https://support.google.com/youtube/answer/1722171
  43. https://ffmpeg.org/
  44. http://audacityteam.org/
  45. http://www.gimp.org/
  46. http://www.dafont.com/veteran-typewriter.font
  47. https://www.raspberrypi.org/
  48. https://www.youtube.com/user/archivSV
  49. https://www.facebook.com/archivSV
  50. http://uloz.to/soubory/archivSV/mp3/
  51. http://freemusicarchive.org/music/Jackson_F_Smith/Jackson_Frederick_Smith/Cantina_Rag
Advertisement
Add Comment
Please, Sign In to add comment