how to keep metadata intact when running through your external console.
  • maybe this has already been covered elsewhere, but..

    one frustration of using airtime in a live situation with a console
    is that you can't reencode post console audio without breaking metadata. This (messy?) hack solves that by grabbing the artist
    and title info, parsing it and dumping it to a file for another encoder
    to read.

    I was getting the info from the /api directory from the
    webserver. you could probably get it from a log file somewhere, but
    this works.

     first, in airtime, go to system / preferences and enable "allow remote websites to access schedule..."

    get
    curl, awk, sed and butt.  probably, you already have awk and sed on
    your system. for systems with apt, getting curl is probably something
    like "sudo apt-get install curl" 
    b.u.t.t. (broadcast using this
    tool) is an open-source encoder which can pick up the metadata from a
    file. you can get it from butt.sourceforge.net

    copy the following and make a script. don't forget to make it executable! i called mine ./metadata_grabber.sh

    curl -o metadata1 localhost/api/live-info
    cat metadata1 |awk -F"," '{print $(NF-40)}' >metadata2
    sed 's/"current":{"name":"//' metadata2 >metadata3
    sed 's/"//' metadata3 >metadata4
    cat metadata4


    great! 
    so when that script is run, it'll copy the live-info page from your
    local machine, parse it, and redirect it to a file called metadata4 and display
    that file just so you can test whats going on. assuming everything
    looks good, you can schedule this (although i'm sure there are more efficient
    ways) by stacking it in cron.  type crontab -e and enter the following
    lines to run it every 15 seconds

    * * * * * ./metadata_grabber.sh
    * * * * * sleep 15 ./metadata_grabber.sh
    * * * * * sleep 30 ./metadata_grabber.sh
    * * * * * sleep 45 ./metadata_grabber.sh

    save and exit.
    configure
    butt to read the metadata from the file metadata4, and you'll now have the
    ability to retain airtime metadata while incorporating all of your
    outboard gear.



    please post your improvements or questions!

    Lee