Browse Source

Added ffmpegauto script (#5250).

master
Christian P. MOMON 5 months ago
committed by root
parent
commit
a6553eb3cb
  1. 45
      ffmpegauto/ffmpegauto
  2. 4
      ffmpegauto/readme
  3. 2
      wgetauto/readme

45
ffmpegauto/ffmpegauto

@ -0,0 +1,45 @@
#!/bin/bash
help()
{
echo "Usage: ffmpegauto [ -h | duration targetdirectory ]"
}
capture()
{
local duration="$1"
local targetDirectory="$2"
duration="$1"
targetDirectory="$2"
currentDate="$(date '+%Y-%m-%d-%Hh%M')"
echo "============ $(date) ============"
echo "Capture launching…"
ffmpeg -loglevel error -i https://icecast.libre-a-toi.org:8444/voixdulat_ogg -t "$duration" -c copy "$targetDirectory/output-$currentDate-bis.ogg"
#ffmpeg -i "$targetDirectory/output-$currentDate.ogg" "$targetDirectory/output-$currentDate.mp3"
}
#
case $# in
1)
if [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then
help
else
capture "$1" "."
fi
;;
2) capture "$1" "$2"
;;
*) echo "Invalid parameter count."
help
;;
esac

4
ffmpegauto/readme

@ -0,0 +1,4 @@
The script wgetauto generates a multi-channel file. Not ffmpegauto.
Example of cron line:
25 15 * * 2 /home/cpm/Libreàvous/ffmpegauto 6300 /home/cpm/Libreàvous/ >> /home/cpm/Libreàvous/cron.log 2>&1

2
wgetauto/readme

@ -1,5 +1,5 @@
Example of cron line:
25 15 * * 2 /home/cpm/Libreàvous/wgetauto 6300 /home/cpm/Libreàvous/ >> /home/cpm/Libreàvous/cronlog 2>&1
25 15 * * 2 /home/cpm/Libreàvous/wgetauto 6300 /home/cpm/Libreàvous/ >> /home/cpm/Libreàvous/cron.log 2>&1
Another way using ffmpeg:
ffmpeg -i https://icecast.libre-a-toi.org:8444/voixdulat_ogg -t 5420 -c copy foo.ogg
Loading…
Cancel
Save