Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** konvertuj.bash ***
- input=$(ls -tc | grep .mp3 | head -1)
- input="${input%.*}"
- ffmpeg -loop 1 -r 2
- -i "$input.png" -i "$input.mp3" -c:v libx264 -preset ultrafast -tune
- stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p "$input.mkv"
- *** konvertuj2.bat ***
- @echo off
- FOR /F "tokens=*" %%G IN ('dir/b /s ^"*.mp3^"') DO SET input=%%~nG
- 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"
- *** nahravaj.sh ***
- PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/pi/nahravky
- $(ps aux | grep -i '[w]get' | awk {'print $2'} | xargs kill)
- mkdir -p '/home/pi/nahravky/'$(date +%Y%m%d)
- wget -bq -t inf stream.slobodnyvysielac.sk:8000/stream -O '/home/pi/nahravky/'$(date +%Y%m%d/%Y%m%d_%H_%M_%S.m4a)
- *** udrzba.sh ***
- PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/pi/nahravky
- secs=60
- endTime=$(( $(date +%s) + secs ))
- while [ $(date +%s) -lt $endTime ]; do
- case "$(pidof wget | wc -w)" in
- 0) mkdir -p '/home/pi/nahravky/'$(date +%Y%m%d)
- wget -bq -t inf stream.slobodnyvysielac.sk:8000/stream -O '/home/pi/nahravky/'$(date +%Y%m%d/%Y%m%d_%H_%M_%S.m4a)
- ;;
- 1) ;;
- esac
- sleep 1
- done
- Odkazy:
- https://support.google.com/youtube/answer/1722171
- https://ffmpeg.org/
- http://audacityteam.org/
- http://www.gimp.org/
- http://www.dafont.com/veteran-typewriter.font
- https://www.raspberrypi.org/
- https://www.youtube.com/user/archivSV
- https://www.facebook.com/archivSV
- http://uloz.to/soubory/archivSV/mp3/
- http://freemusicarchive.org/music/Jackson_F_Smith/Jackson_Frederick_Smith/Cantina_Rag
Advertisement
Add Comment
Please, Sign In to add comment