Moonbase59 / autocue

On-the-fly JSON song cue-in, cue-out, overlay, replaygain calculation for Liquidsoap, AzuraCast and other AutoDJ software.
https://moonbase59.github.io/autocue/
MIT License
28 stars 3 forks source link

Replace loudgain with cue_file in scripts? #15

Closed LordHelmchen666 closed 3 months ago

LordHelmchen666 commented 3 months ago

I use your jingle script and my own download script involving loudgain after file was downloaded. Should I replace with cue_file? What do you recommend? cue_file calculate replaygain nearly the same as loudgain? I am asking because I am thinking on new strategy how to handle files now. Run first loudgain and then cue_file (write only liq* tags) or only run cue_file let them write both tags.

LordHelmchen666 commented 3 months ago

I decided to add cue_file to my download script and your jingle script.

......
    curl https://*******@api.radioadmin.laut.fm/news/1 --output $directory/temp/lautfm-news.mp3 >>$MAILLOG >>$MAILLOG 2>&1
    loudgain -I 3 -S -L -a -k -s e $directory/temp/lautfm-news.mp3 >>$MAILLOG
    cue_file -k -w -n $directory/temp/lautfm-news.mp3 >>$MAILLOG
......
....
# If loudgain is installed, also do ReplayGain calculation
# -I3 forces ID3v2.3, -I4 forces ID3v2.4 (default)
# -L forces lowercase replaygain tags (default uppercase)
if is_installed loudgain ; then
  loudgain -I3 -S -L -a -k -s e /tmp/jingle.mp3
fi
if is_installed cue_file ; then
  cue_file -k -w -n /tmp/jingle.mp3
fi
......

Seems to work well. I do not experience too much CPU usage. Average load is around 1.3 two stations running on my system (Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz). Note: I enabled noclip in Azuracast thats why i use cue_file -k

Moonbase59 commented 3 months ago

A very elegant and useful solution! Even used is_installed!

Absolutely nothing to say against that, thanks for sharing!

I’ll convert this into a discussion, so others can find it more easily when closed.