diff --git a/flac2mp3.sh b/flac2mp3.sh deleted file mode 100755 index a07f23d..0000000 --- a/flac2mp3.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ "$#" = "0" ]; then - echo "Usage: $0 file1 [file2 file3 ... fileN]" - exit 1 -fi - -while [ "$#" -gt 0 ]; do - echo "Processing $1 ($# more left)..." - avconv -i "$1" -f wav -vn - | lame -m j --replaygain-fast --vbr-new -V 2 -o --id3v2-only --resample 44.1 - "$1.mp3" - shift -done diff --git a/flac2mp3.sh b/flac2mp3.sh new file mode 120000 index 0000000..d89ece7 --- /dev/null +++ b/flac2mp3.sh @@ -0,0 +1 @@ +mp42mp3.sh \ No newline at end of file diff --git a/flac2mp3_V4.sh b/flac2mp3_V4.sh deleted file mode 100755 index c8bffbb..0000000 --- a/flac2mp3_V4.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ "$#" = "0" ]; then - echo "Usage: $0 file1 [file2 file3 ... fileN]" - exit 1 -fi - -while [ "$#" -gt 0 ]; do - echo "Processing $1 ($# more left)..." - avconv -i "$1" -f wav -vn - | lame -m j --replaygain-fast --vbr-new -V 4 -o --id3v2-only --resample 44.1 - "$1.mp3" - shift -done diff --git a/flac2mp3_V4.sh b/flac2mp3_V4.sh new file mode 120000 index 0000000..c4780b7 --- /dev/null +++ b/flac2mp3_V4.sh @@ -0,0 +1 @@ +mp42mp3_V4.sh \ No newline at end of file diff --git a/flv2mp4.sh b/flv2mp4.sh new file mode 100755 index 0000000..1fe544f --- /dev/null +++ b/flv2mp4.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +while IFS= read -r -u3 -d $'\0' FLV; do + MP4=${FLV/%.flv/.mp4} + STREAMS=`avprobe -i "$FLV" -show_streams -of csv 2>/dev/null` + VID_STREAM=`echo "$STREAMS" | grep "video" | awk -F ',' '{print $3}'` + VID_STREAM_LONG=`echo "$STREAMS" | grep "video" | awk -F ',' '{print $4}'` + + if [ "$VID_STREAM" = "h264" ]; then + echo "Converting $FLV ($VID_STREAM_LONG) to MP4 ..." + avconv -i "$FLV" -codec copy "$MP4" + else + echo "ERROR: $FLV has $VID_STREAM_LONG, no H.264!" + fi +done 3< <(find . -type f -iname "*.flv" -print0) diff --git a/runtastic_live.php b/runtastic_live.php index 0f3974d..ba9dedf 100755 --- a/runtastic_live.php +++ b/runtastic_live.php @@ -16,7 +16,7 @@ echo sprintf('STARTED: %s', date('Y-m-d H:i:s', $stamp)) . PHP_EOL; $data = file_get_contents($fetch_url); #$data = file_get_contents('runtastic_live5.html'); -$data = '' . $data . ''; +$data = '' . $data . ''; libxml_use_internal_errors(true); // prevent generation of PHP Warnings $dom = new DOMDocument();