Commit 14efcb46 authored by Ken Fallon's avatar Ken Fallon

2017-05-31_15-53-36_CEST

parent 84f04413
......@@ -33,8 +33,11 @@ ARTIST="EMPTY"
TITLE="EMPTY"
YEAR="EMPTY"
SLOT="EMPTY"
anhonesthost="sponsor-anhonesthost.com-hpr15.flac"
internetarchive="sponsor-archive.org.flac"
basedir="/var/IA"
intro="${basedir}/intro.flac"
outro="${basedir}/outro.flac"
anhonesthost="${basedir}/sponsor-anhonesthost.com-hpr15.flac"
internetarchive="${basedir}/sponsor-archive.org.flac"
while getopts "hisob2n" OPTION
do
......@@ -85,22 +88,22 @@ if ! [[ $ep_num =~ $re ]] ; then
echo "error: episode \"${ep_num}\" is not a number" >&2; exit 1
fi
if [ ! -f "$anhonesthost" ]; then
echo "sorry, file \"$anhonesthost\" does not exist"
if [ ! -f "${anhonesthost}" ]; then
echo "sorry, file \"${anhonesthost}\" does not exist"
exit 1
fi
if [ ! -f "$internetarchive" ]; then
echo "sorry, file \"$internetarchive\" does not exist"
if [ ! -f "${internetarchive}" ]; then
echo "sorry, file \"${internetarchive}\" does not exist"
exit 1
fi
if [ ! -f "intro.flac" ]; then
if [ ! -f "${intro}" ]; then
echo "sorry, file \"intro.flac\" does not exist"
exit 1
fi
if [ ! -f "outro.flac" ]; then
if [ ! -f "${outro}" ]; then
echo "sorry, file \"outro.flac\" does not exist"
exit 1
fi
......@@ -243,8 +246,8 @@ ffmpeg -i "$internetarchive" -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le
if [ "$ADDINTRO" = 'y' ]; then
echo "Adding the intro"
ffmpeg -i intro.flac -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_hh.pcm 2>> ${fname}_tmp.log
ffmpeg -i intro.flac -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_ia.pcm 2>> ${fname}_tmp.log
ffmpeg -i "$intro" -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_hh.pcm 2>> ${fname}_tmp.log
ffmpeg -i "$intro" -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_ia.pcm 2>> ${fname}_tmp.log
fi
echo "convert the uploaded episode and add it to the temp pcm file"
......@@ -253,13 +256,13 @@ ffmpeg -i ${fname}_sox.wav -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le -
if [ "$ADDOUTRO" = 'y' ]; then
echo "Adding the outro"
ffmpeg -i outro.flac -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_hh.pcm 2>> ${fname}_tmp.log
ffmpeg -i outro.flac -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_ia.pcm 2>> ${fname}_tmp.log
ffmpeg -i "$outro" -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_hh.pcm 2>> ${fname}_tmp.log
ffmpeg -i "$outro" -ar 44100 -ac $CHANNELS -acodec pcm_s16le -f s16le - >> ${fname}_tmp_ia.pcm 2>> ${fname}_tmp.log
fi
echo "Convert the pcm file to a know wav format"
ffmpeg -f s16le -ar 44100 -ac $CHANNELS -acodec pcm_s16le -i ${fname}_tmp_hh.pcm ${fname}_mez.wav 2>> ${fname}_tmp.log
ffmpeg -f s16le -ar 44100 -ac $CHANNELS -acodec pcm_s16le -i ${fname}_tmp_ia.pcm -metadata album="$HPR_album" -metadata author="$HPR_artist" -metadata comment="$HPR_comment" -metadata genre="$HPR_genre" -metadata title="$HPR_title" -metadata track="$HPR_track" -metadata year="$HPR_year" -metadata copyright="$HPR_license" hpr${ep_num}.wav 2>> ${fname}_tmp.log
ffmpeg -f s16le -ar 44100 -ac $CHANNELS -acodec pcm_s16le -i ${fname}_tmp_ia.pcm hpr${ep_num}.wav 2>> ${fname}_tmp.log
echo "Normalizing the wav files"
sox --temp "${TEMP_DIR}" --norm ${fname}_mez.wav ${fname}_mez_norm.wav
......@@ -269,57 +272,48 @@ sox --temp "${TEMP_DIR}" --norm hpr${ep_num}.wav hpr${ep_num}_norm.wav
mv -v hpr${ep_num}_norm.wav hpr${ep_num}.wav >> ${fname}_tmp.log 2>&1
# normalize -a 0.5 hpr${ep_num}.wav >> ${fname}_tmp.log 2>&1
for file_type in ogg mp3 spx opus
do
echo "Processing hpr${ep_num}.${file_type}"
ffmpeg -i ${fname}_mez.wav -metadata album="$HPR_album" -metadata Artist="$HPR_artist" -metadata comment="$HPR_comment" -metadata genre="$HPR_genre" -metadata title="$HPR_title" -metadata track="$HPR_track" -metadata date="$HPR_year" -metadata copyright="$HPR_license" hpr${ep_num}.${file_type} 2>> ${fname}_tmp.log
ffmpeg -i ${fname}_mez.wav -metadata title="title" -metadata author="author" -metadatacComment="Comment" -metadata date="date" -metadata artist="artist" -metadata album_artist="album_artist" -metadata album="album" -metadata grouping="grouping" -metadata composer="composer" -metadata year="year" -metadata track="track" -metadata comment="comment" -metadata genre="genre" -metadata copyright="copyright" -metadata description="description" -metadata synopsis="synopsis" -metadata show="show" -metadata episode_id="episode_id" -metadata network="network" -metadata lyrics="lyrics" hpr${ep_num}X.${file_type} 2>> ${fname}_tmp.log
done
echo "--------------------------------------------------------------------------------"
echo "File information"
ffprobe ${fname}_mez.wav 2>&1 | grep Audio:
mediainfo ${fname}_mez.wav
echo "--------------------------------------------------------------------------------"
echo "Convert to mp3"
sox --temp "${TEMP_DIR}" -S ${fname}_mez.wav hpr${ep_num}.mp3
echo "--------------------------------------------------------------------------------"
echo "Convert to ogg"
sox --temp "${TEMP_DIR}" -S ${fname}_mez.wav hpr${ep_num}.ogg
echo "--------------------------------------------------------------------------------"
echo "Convert to spx"
sox --temp "${TEMP_DIR}" -S ${fname}_mez.wav -c 1 -r 16000 -t wav - | speexenc - hpr${ep_num}.spx
# # # echo "--------------------------------------------------------------------------------"
# # # echo "File information"
# # # ffprobe ${fname}_mez.wav 2>&1 | grep Audio:
# # # mediainfo ${fname}_mez.wav
# # #
# # # echo "--------------------------------------------------------------------------------"
# # # echo "Convert to mp3"
# # # sox --temp "${TEMP_DIR}" -S ${fname}_mez.wav hpr${ep_num}.mp3
# # #
# # # echo "--------------------------------------------------------------------------------"
# # # echo "Convert to ogg"
# # # sox --temp "${TEMP_DIR}" -S ${fname}_mez.wav hpr${ep_num}.ogg
# # #
# # # echo "--------------------------------------------------------------------------------"
# # # echo "Convert to spx"
# # # sox --temp "${TEMP_DIR}" -S ${fname}_mez.wav -c 1 -r 16000 -t wav - | speexenc - hpr${ep_num}.spx
# # #
# # # if [[ ! -s hpr${ep_num}.wav ]] || [[ ! -s hpr${ep_num}.mp3 ]] || [[ ! -s hpr${ep_num}.ogg ]] || [[ ! -s hpr${ep_num}.spx ]]
# # # then
# # # echo "ERROR: Something went wrong encoding the files"
# # # exit 1
# # # fi
# # # fix_tags -album="$HPR_album" -artist="$HPR_artist" -comment="$HPR_comment" -genre="$HPR_genre" -title="$HPR_title" -track="$HPR_track" -year="$HPR_year" hpr${ep_num}* 2>> ${fname}_tmp.log 1>&2
# # # fix_tags hpr${ep_num}*
# # #
# # # #echo "Changing the file dates to the time of upload"
# # # touch -r ${mediafile} hpr${ep_num}*
# # #
# # # #echo "Remove temp files"
# # # rm ${fname}_sox.wav ${fname}_tmp*.pcm ${fname}_tmp.log ${fname}_mez.wav
# # #
# # # mv -v hpr${ep_num}.wav /var/IA/uploads/
# # #
# # # ###rsync -ave ssh --partial --progress --ignore-existing hpr${ep_num}.mp3 hpr${ep_num}.ogg hpr${ep_num}.spx hpr:www/eps/
# # #
# # # read -p "Remove files for \"${fname}\" (y|N) ? " -n 1 -r
# # # echo # (optional) move to a new line
# # # if [[ $REPLY =~ ^[Yy]$ ]]
# # # then
# # # mv -v ${fname}* hpr${ep_num}* *_${ep_num}_* /var/IA/done/
# # # fi
# # # wget -q "http://hackerpublicradio.org/hpr_total_rss.php?gomax=1" -O - | xmlstarlet val --err -
# # # wget -q "http://hackerpublicradio.org/hpr_total_spx_rss.php?gomax=1" -O - | xmlstarlet val --err -
# # # wget -q "http://hackerpublicradio.org/hpr_total_ogg_rss.php?gomax=1" -O - | xmlstarlet val --err -
if [[ ! -s hpr${ep_num}.wav ]] || [[ ! -s hpr${ep_num}.mp3 ]] || [[ ! -s hpr${ep_num}.ogg ]] || [[ ! -s hpr${ep_num}.spx ]]
then
echo "ERROR: Something went wrong encoding the files"
exit 1
fi
fix_tags -album="$HPR_album" -artist="$HPR_artist" -comment="$HPR_comment" -genre="$HPR_genre" -title="$HPR_title" -track="$HPR_track" -year="$HPR_year" hpr${ep_num}* 2>> ${fname}_tmp.log 1>&2
fix_tags hpr${ep_num}*
#echo "Changing the file dates to the time of upload"
touch -r ${mediafile} hpr${ep_num}*
#echo "Remove temp files"
rm ${fname}_sox.wav ${fname}_tmp*.pcm ${fname}_tmp.log ${fname}_mez.wav
mv -v hpr${ep_num}.wav /var/IA/uploads/
rsync -ave ssh --partial --progress --ignore-existing hpr${ep_num}.mp3 hpr${ep_num}.ogg hpr${ep_num}.spx hpr:www/eps/
read -p "Remove files for \"${fname}\" (y|N) ? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
mv -v ${fname}* hpr${ep_num}* *_${ep_num}_* /var/IA/done/
fi
wget -q "http://hackerpublicradio.org/hpr_total_rss.php?gomax=1" -O - | xmlstarlet val --err -
wget -q "http://hackerpublicradio.org/hpr_total_spx_rss.php?gomax=1" -O - | xmlstarlet val --err -
wget -q "http://hackerpublicradio.org/hpr_total_ogg_rss.php?gomax=1" -O - | xmlstarlet val --err -
......@@ -10,29 +10,36 @@ include'/home/hpr/www/header.php';
<h2>Official HPR Introduction Music</h2>
<p>
<ul>
<li><a href="hpr-accordion-Intro-MrX.wav">hpr-accordion-Intro-MrX.wav (2.7M)</a></li>
<li><a href="intro-music-slick0-cc0.flac">intro-music-slick0-cc0.flac (3.3M)</a></li>
<li><a href="intro-stereo.flac">intro-stereo.flac (3.3M)</a></li>
<li><a href="manon_fallon-cc0-hpr-talkover-STE-032.wav">manon_fallon-cc0-hpr-talkover-STE-032.wav (47M)</a></li>
<li><a href="outro-mixed-MrX-manon_fallon-ccbysa.flac">outro-mixed-MrX-manon_fallon-ccbysa.flac (11M)</a></li>
<li><a href="outro-mixed-slick0-manon_fallon-cc0.flac">outro-mixed-slick0-manon_fallon-cc0.flac (10M)</a></li>
<li><a href="outro-mixed-clacke-ccbysa-mono.flac">outro-mixed-clacke-ccbysa-mono.flac (7M)</a></li>
<li><a href="outro-music-MrX-ccbysa-accordion.wav">outro-music-MrX-ccbysa-accordion.wav (2.8M)</a></li>
<li><a href="outro-music-rollercostermusic.com-ccbysa-v1-ccbysa.wav">outro-music-rollercostermusic.com-ccbysa-v1-ccbysa.wav (31M)</a></li>
<li><a href="outro-music-rollercostermusic.com-ccbysa-v2-ccbysa.wav">outro-music-rollercostermusic.com-ccbysa-v2-ccbysa.wav (26M)</a></li>
<li><a href="outro-music-rollercostermusic.com-ccbysa-v3-ccbysa.wav">outro-music-rollercostermusic.com-ccbysa-v3-ccbysa.wav (31M)</a></li>
<li><a href="outro-music-slick0-cc0.flac">outro-music-slick0-cc0.flac (12M)</a></li>
<li><a href="outro-speech-manon_fallon-cc0.flac">outro-speech-manon_fallon-cc0.flac (4.6M)</a></li>
<li><a href="outro-stereo.flac">outro-stereo.flac (5.8M)</a></li>
<li><a href="rollercostermusic.com_intro_v1-ccbysa.wav">rollercostermusic.com_intro_v1-ccbysa.wav (6.8M)</a></li>
<li><a href="rollercostermusic.com_intro_v2-ccbysa.wav">rollercostermusic.com_intro_v2-ccbysa.wav (4.8M)</a></li>
<li><a href="rollercostermusic.com_intro_v3-ccbysa.wav">rollercostermusic.com_intro_v3-ccbysa.wav (31M)</a></li>
<li><a href="rollercostermusic.com_outro_v1-ccbysa.wav">rollercostermusic.com_outro_v1-ccbysa.wav (26M)</a></li>
<li><a href="rollercostermusic.com_outro_v2-ccbysa.wav">rollercostermusic.com_outro_v2-ccbysa.wav (31M)</a></li>
<li><a href="slick0-cc0-hpr-master-intro-stereo.flac">slick0-cc0-hpr-master-intro-stereo.flac (3.3M)</a></li>
<li><a href="slick0-cc0-hpr-master-intro-stereo.wav">slick0-cc0-hpr-master-intro-stereo.wav (6.6M)</a></li>
<li><a href="slick0-cc0-hpr-master-outro-stereo.flac">slick0-cc0-hpr-master-outro-stereo.flac (12M)</a></li>
<li><a href="slick0-cc0-hpr-master-outro-stereo.wav">slick0-cc0-hpr-master-outro-stereo.wav (16M)</a></li>
<li><a href="intro-music-slick0-cc0-mono.flac">intro-music-slick0-cc0-mono.flac (3.3M)</a> [<a href="intro-music-slick0-cc0.flac"><small>Stereo Version (3.3M)</small></a>]<br />
<audio controls preload="none"><source src="intro-music-slick0-cc0-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-mixed-clacke-ccbysa-mono.flac">outro-mixed-clacke-ccbysa-mono.flac (5.7M)</a><br />
<audio controls preload="none"><source src="outro-mixed-clacke-ccbysa-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-mixed-MrX-manon_fallon-ccbysa-mono.flac">outro-mixed-MrX-manon_fallon-ccbysa-mono.flac (5.6M)</a> [<a href="outro-mixed-MrX-manon_fallon-ccbysa.flac"><small>Stereo Version (11M)</small></a>]<br />
<audio controls preload="none"><source src="outro-mixed-MrX-manon_fallon-ccbysa-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-mixed-slick0-manon_fallon-cc0-mono.flac">outro-mixed-slick0-manon_fallon-cc0-mono.flac (5.3M)</a> [<a href="outro-mixed-slick0-manon_fallon-cc0.flac"><small>Stereo Version (10M)</small></a>]<br />
<audio controls preload="none"><source src="outro-mixed-slick0-manon_fallon-cc0-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-music-MrX-ccbysa-accordion-mono.flac">outro-music-MrX-ccbysa-accordion-mono.flac (1.5M)</a> [<a href="outro-music-MrX-ccbysa-accordion.wav"><small>Stereo Version (2.8M)</small></a>]<br />
<audio controls preload="none"><source src="outro-music-MrX-ccbysa-accordion-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-music-rollercostermusic.com-ccbysa-v1-ccbysa-mono.flac">outro-music-rollercostermusic.com-ccbysa-v1-ccbysa-mono.flac (15M)</a> [<a href="outro-music-rollercostermusic.com-ccbysa-v1-ccbysa.wav"><small>Stereo Version (31M)</small></a>]<br />
<audio controls preload="none"><source src="outro-music-rollercostermusic.com-ccbysa-v1-ccbysa-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-music-rollercostermusic.com-ccbysa-v2-ccbysa-mono.flac">outro-music-rollercostermusic.com-ccbysa-v2-ccbysa-mono.flac (13M)</a> [<a href="outro-music-rollercostermusic.com-ccbysa-v2-ccbysa.wav"><small>Stereo Version (26M)</small></a>]<br />
<audio controls preload="none"><source src="outro-music-rollercostermusic.com-ccbysa-v2-ccbysa-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-music-rollercostermusic.com-ccbysa-v3-ccbysa-mono.flac">outro-music-rollercostermusic.com-ccbysa-v3-ccbysa-mono.flac (15M)</a> [<a href="outro-music-rollercostermusic.com-ccbysa-v3-ccbysa.wav"><small>Stereo Version (31M)</small></a>]<br />
<audio controls preload="none"><source src="outro-music-rollercostermusic.com-ccbysa-v3-ccbysa-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-music-slick0-cc0-mono.flac">outro-music-slick0-cc0-mono.flac (5.4M)</a> [<a href="outro-music-slick0-cc0.flac"><small>Stereo Version (12M)</small></a>]<br />
<audio controls preload="none"><source src="outro-music-slick0-cc0-mono.flac" type="audio/flac" ></audio>
</li>
<li><a href="outro-speech-manon_fallon-cc0-mono.flac">outro-speech-manon_fallon-cc0-mono.flac (4.0M)</a> [<a href="outro-speech-manon_fallon-cc0.flac"><small>Stereo Version (4.6M)</small></a>]<br />
<audio controls preload="none"><source src="outro-speech-manon_fallon-cc0-mono.flac" type="audio/flac" ></audio>
</li>
</ul>
</p>
<h2>Promos</h2>
......
HPR. Don't just consume, contribute.
HPR. Learn something new every day.
HPR. The BarCamp of the podcasting world.
HPR. Crowdsourcing podcasts since before crowdsourcing was a thing.
HPR. Immorality through podcasting.
HPR. Any audio is better than no audio.
HPR. Procrastination is the Enemy.
HPR. FLAC is best, we accept the rest.
HPR. Your ideas, projects, opinions - podcasted.
HPR. It ain't a show until it's on the server.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment