This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script is a companion of the script youtube-music-live.sh. Assuming the MUSIC_PATH is an icecast2 stream, The script will fetch the metadata tag StreamTitle every 5 seconds and update the file /tmp/artist, /tmp/title. Generally, the StreamTitle should be like "artist - title", though sometimes there is only title. You may also update the files manually and ignore this script. Be sure to run this script after youtube-music-live.sh. | |
# You have to define music url. | |
MUSIC_PATH= | |
while [ `pgrep -x ffmpeg` ] | |
do | |
meta=`ffprobe -v error -show_format "$MUSIC_PATH" | grep StreamTitle | cut -d= -f2` | |
case "$meta" in |
OlderNewer