Added flv2mp4.sh. Updated other scripts.

This commit is contained in:
Markus Birth 2014-07-18 01:56:07 +02:00
parent 6f327c1bd8
commit 8730eb7443
4 changed files with 18 additions and 23 deletions

View File

@ -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

1
flac2mp3.sh Symbolic link
View File

@ -0,0 +1 @@
mp42mp3.sh

View File

@ -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

1
flac2mp3_V4.sh Symbolic link
View File

@ -0,0 +1 @@
mp42mp3_V4.sh

15
flv2mp4.sh Executable file
View File

@ -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)

View File

@ -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 = '<root>' . $data . '</root>';
$data = '<?xml encoding="utf-8" ?><root>' . $data . '</root>';
libxml_use_internal_errors(true); // prevent generation of PHP Warnings
$dom = new DOMDocument();