Slashdot Mirror


Linux Radio Station Automation?

miazmatic asks: "I am one of the tech managers for my high school's FM radio station. We have been using Rhythmbox on Debian to play music after hours when no one is broadcasting. However, it took some pretty ugly hacks to get it to transmit the station ID every hour. We are adding a 600GB RAID 0 VG to our PC (P4 2.4/512MB), to which we plan to encode all our CDs losslessly. Along with this upgrade I would also like to find a permanent solution for broadcasting the station ID hourly. Has anyone used Linux to run a radio station before? Can anyone suggest a F/OSS software package or solution? Any help is appreciated."

59 comments

  1. Word of advice by kensai · · Score: 3, Insightful

    Skip RAID 0 like the plague if this is your main storage area. Much much better to go with RAID 1+0 or RAID 5. RAID 0 is like tempting the HDD Gods for HDD failure.

    1. Re:Word of advice by cuntzilla · · Score: 1

      Totally agree. The amount of money buying a couple of drives to give the 600GB under RAID 5 would be far far exceeded by the amount of time you're spend re-encoding on a minimum wage job: you'll save time, and RAID 0 is, as parent said, tempting fate.

      A second point, do you have permission to broadcast the music you'll be playing? Its fine to do a bit of filesharing if you want, because that's your liability, but will your station e broadcasting the latest Britney over the FM spectrum not require royalties and/or be protected by other legal bindings which YOUR SCHOOL would be liable for?

    2. Re:Word of advice by drsmithy · · Score: 1
      Skip RAID 0 like the plague if this is your main storage area. Much much better to go with RAID 1+0 or RAID 5. RAID 0 is like tempting the HDD Gods for HDD failure.

      Seconded. Go with RAID5 - you only lose one disk's worth of space and since the vast bulk of your data access is going to be reading, the average performance impact will be negligible. When (not if) you have a drive failure, a) you won't have any downtime and b) you won't have to re-rip hundreds of CDs worth of music.

      Get some 4 port SATA controllers - heck, with such a low-bandwidth application you wouldn't even have to worry about 64 bit PCI or multiple PCI buses for acceptable performance.

    3. Re:Word of advice by dtfinch · · Score: 1

      I'm guessing they have three 200gb hard disks. Maybe they should make a RAID 1 and just hold onto the third disk as a spare. If they reencode everything as mp3 or ogg at a reasonably high bitrate, they should have room for at least 25-30 thousand songs.

    4. Re:Word of advice by JohnyO · · Score: 1

      Good advice. Raid 1+0 (stripes of individual mirrors) is the most expensive (100% hardware redundancy required) but by far the highest performance. Raid 5 is roughly 3 to 1 times slower in write speed and about the same in read speed. If you lose a hard disk in RAID 5, all performance bets are off. Reconstruction / rebuild after replacing a failed 200 GB disk can take DAYS to complete for a RAID 5 system. This still beats having to reload / rebuild hundreds of GigaBytes of data. Software RAID is very slow compared to hardware solutions (roughly 10 to 1 penalty in my experiance) and uses a LOT of native CPU cycles. It's cheap but don't expect spectacular performance.

  2. Check this: by Mind+Booster+Noori · · Score: 4, Informative
    1. Re:Check this: by bolix · · Score: 1

      I've never had much luck with otto. I have used Icecast to relay ogg files which were streamed from Ices or mp3s from Muse. I'd simply replace "stream" with a dedicated client. You can also broadcast/mix "live audio" (station ids) into the stream using Darkice. I've can also recommend Shoutcast.

      I've used the above and am confident you can build a solution around them. Freshmeat shows tons more.

  3. Hourly? Hmm... by PaulBu · · Score: 2, Informative

    They have this tool called 'cron', maybe... ;-)

    Paul B.

    1. Re:Hourly? Hmm... by da3dAlus · · Score: 1

      Um...no?

      Nice snappy comeback, but you don't hear commercial stations just suddenly interrupt a song to bring you a station ID. Now, they have live DJ's, but the same planning holds true--you have to schedule the station ID in between songs, but as close to the top of the hour (or whatever interval is needed) as possible. This is not an easy task for most playlist systems. Unless you will be pre-planning playlists down to the minute, it's not possible without software assistance.

      --

      Sometimes I doubt your commitment to Sparkle Motion.
    2. Re:Hourly? Hmm... by geoffspear · · Score: 2, Insightful

      Having cron insert your station ID into your playlist after the song that's currently playing would work just fine, though.

      --
      Don't blame me; I'm never given mod points.
    3. Re:Hourly? Hmm... by tverbeek · · Score: 2, Informative
      Nice snappy comeback, but you don't hear commercial stations just suddenly interrupt a song to bring you a station ID. Now, they have live DJ's, but....

      Um, no they don't.

      Not on overnights. Not at a commercial station in 2005.

      OK, I'm over-generalising a little, but at most commercial radio stations, the only person in the building at 3am is the guy watching the monitors (usually covering several stations at once, because even if it isn't one of the several Clear-Channel stations in that market, it's probably owned by another multi-station company). It's simply not cost-effective to pay someone to actually push buttons (or open a mike and talk) at that hour, when you can get a computer to do it for you. If you turn on a commercial radio station and hear a voice talking during overnights, it was probably recorded the day before, and inserted by whatever proprietary software they have running the place. Top-of-hour (within FCC paramaters) station IDs are a standard feature of those systems.

      --
      http://alternatives.rzero.com/
    4. Re:Hourly? Hmm... by Anonymous Coward · · Score: 0

      While I agree with you, here in Germany, I've noticed that more and more songs have the station ID embedded into the song somewhere, usually the begining.

    5. Re:Hourly? Hmm... by yuri+benjamin · · Score: 1

      Can't a command in crontab just add the file stationID.ogg to the front of the playlist? This means that it will play next after whatever song is playing now.

      --
      You make the mistake of thinking you can educate the fundamental stupidity out of people. You can't.
  4. Radio Free Peterborough by Yankel · · Score: 1

    You should check out Radio Free Peterborough's setup (Use Google to find the URL, I don't want to see it slashdotted unnecessarily).

    I don't know if they broadcast the station ID automagically every hour, however:
    - they do have a DIY Internet Radio Guide (for streaming)
    - Steve (who runs the show) might have a few good ideas).

    --
    --- Dan
    1. Re:Radio Free Peterborough by Anonymous Coward · · Score: 1, Informative
      You should check out Radio Free Peterborough's setup.

      I don't know if they broadcast the station ID automagically every hour, however:
      - they do have a DIY Internet Radio Guide (for streaming)
      - Steve (who runs the show) might have a few good ideas).

  5. LiveSupport by lbmouse · · Score: 4, Informative
  6. Thank you for using the term "VG" by Gothmolly · · Score: 0

    Not to jump on the LVM bandwagon, but these days, if you're not using LVM, especially for a server you care about, then you're behind the times. Talking about VGs is the proper parlance, rather than discussing simple individual disks, like some basement haxor.

    --
    I want to delete my account but Slashdot doesn't allow it.
  7. Spoiled rich high school by c0d3h4x0r · · Score: 0, Troll

    I am one of the tech managers for my high school's FM radio station.

    Sounds like your high school is pretty rich and elitist already, if they operate their own radio station and have multiple tech managers for it. Surely they could just afford to hire someone to break in once an hour all throughout the night to say the station ID. Maybe they could even get the janitor to do it.

    --
    Moderator hint: a comment is neither "Flamebait" nor "Troll" if it is true.
    1. Re:Spoiled rich high school by Anonymous Coward · · Score: 0

      That's kind of hostile, isn't it?

      You don't know if the tech managers are being paid, or if they're kids, or volunteers, or whatever.

      Some institutions are lucky enough to have FM licenses -- low power ones weren't that expensive in the past.

      And even if all of this isn't true -- it's great to spend money on schools. It's great that kids can learn this stuff.

    2. Re:Spoiled rich high school by RomulusNR · · Score: 2, Interesting

      Wow, overrated. You seem to assume that high school kids (or anyone else) working for a radio station are paid. And your average educational station puts out at a paltry 10W. I have a handheld CB with more output than that.

      Some manage to do more than that, and they manage to be mostly member-supported, thanks to their pre-existing popularity. I only know of one, though.

      So, in short, you're an idiot.

      --
      Terrorists can attack freedom, but only Congress can destroy it.
    3. Re:Spoiled rich high school by Anonymous Coward · · Score: 0

      High school radio stations are nothing fancy. My broke hick high school had a radio station and a tv station... sure, the equipment was old, but it's not hard to turn an empty room into a low power radio station with unpaid workers/students.

    4. Re:Spoiled rich high school by rusty0101 · · Score: 1

      Another high school station that is primarily listener supported, and has had a streaming media presence for a couple of years now, is http://www.jazz88fm.com/

      Their prime focus is Jazz music, with a very popular Bluegrass series on Saturday mornings. They have done a lot of local event coverage, including weekly episodes at various jazz venues in the Minnesota Twin Cities area.

      ~Rusty

      --
      You never know...
    5. Re:Spoiled rich high school by Anonymous Coward · · Score: 0

      Please post your name and address so I can report you to the FCC for violation of the power limits outlined in 47 cfr 95.

  8. Simple perl script by SenatorTreason · · Score: 1

    I'm not sure how hard you want to make this, but if you just want to play random songs for a few hours, write a simple perl script to access your song database randomly, pick a song, play it. Before each song, check the time. If it's been an hour before the last station ID, play the station ID, and then the song. If you want to actually create a playlist of songs to play, put them in a text file. And rather than access your song database, read in the playlist file one line at a time. The process is the same. Check time, play station ID or song. Repeat.

    1. Re:Simple perl script by SenatorTreason · · Score: 3, Informative

      Also, contact http://www.radioparadise.com./ The owner/operator was spotlighted in Linux Journal a few years ago about his control system, 100% homebrew, FOSS product. He might have quite a few tips for you.

    2. Re:Simple perl script by pizpot · · Score: 1

      ;-) You could almost have posted the code easier.. ;-)

  9. Why lossless? by bkissi01 · · Score: 3, Informative

    Why would you encode the CDs losslessly? Correct me if I'm wrong but I do believe that FM radio is about half the quality of a normal CD, so you could encode the songs in something like MP3 or Ogg and still not have your listeners notice a difference in quality. This would save you disk space so you could then run a redundant disk array to protect against hd failure.

    1. Re:Why lossless? by Anonymous Coward · · Score: 0

      CD audio is 44.1 kHz. An FM station typically has 200 kHz at its disposal.

      But that's beside the point. There's inevitably quality (information) loss in the process of [CD audio] --> lossy comp. --> [MPEG/Ogg] --> playback/amplification/broadcast/reception --> [listener experience]. Then the listener might want to do a recording...

      Since lots of people more or less easily can tell CD audio from lossy compression audio, it'll be even worse if that difference is amplified in the decode+broadcast process.

      Any station playing MP3s should be shut down! Fortunately those tend to be shitty top-40 stations, so that wouldn't be any loss. They're already showing contempt for their listeners. :)

    2. Re:Why lossless? by MrResistor · · Score: 1

      Any quality loss is compounded, not hidden, by additional quality loss.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
    3. Re:Why lossless? by bkissi01 · · Score: 1

      I guess I really was wrong, and corrected.

    4. Re:Why lossless? by ColaMan · · Score: 3, Informative

      That's hardly the case with FM radio.

      FM has limited bandwith (11kHz or so for a good reciever).

      You will lose all the high frequency component of audio cd's, so why bother encoding it in the first place? You could encode 128kbps stereo MP3 at a 22 (or 32) kHz sample rate and there would be no percievable difference after FM broadcast to lossless encoding (with a decent encoder, that is)

      Then at least they could go to a raid array with *some* redundancy.

      --

      You are in a twisty maze of processor lines, all alike.
      There is a lot of hype here.
    5. Re:Why lossless? by MrResistor · · Score: 1

      My experience repairing high end video production equipment disagrees, and I see no reason why FM radio would be an exception.

      If you live in the LA area you can see what I mean any day on the channel 7 news. They now have a helicopter equiped with HD cameras, and the quality difference is quite noticable, even through an SD signal.

      I very much doubt that the difference isn't perceptable. The audience might not know any better, or they might not blame you, or they might not care, but I'm quite sure that if they listened to both in a "side by side" comparison that most would notice a difference.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
    6. Re:Why lossless? by SupremeTaco · · Score: 1

      But this is a high school FM station, and also, how many times do you do a side by side comparison of radio station quality. As long as the signal is clear, the difference between 128 and something higher is negligible.
      My station runs songs ripped at 128 with no outstanding quality issues.

      --
      You have a constitutionally protected right to be wrong, and I the right to ignore you.
    7. Re:Why lossless? by MrResistor · · Score: 1

      You tell yourself what you like. When I tune to a station that sounds like crap, I keep going. My wife is even less tolerant (which is ironic, since I'm the musician in the family).

      How do you track that?

      --
      Under capitalism man exploits man. Under communism it's the other way around.
    8. Re:Why lossless? by Phreakiture · · Score: 1

      FM has limited bandwith (11kHz or so for a good reciever).

      This is obviously some strange new definition of "good" of which I was previously unaware.

      15kHz is what you should expect from a "good" receiver.

      On the other hand, the stereo separation tends to collapse a bit above 11kHz. That may be what you are thinking of.

      --
      www.wavefront-av.com
  10. Salem Radio Labs does this and more under the GPL. by Rocky+Mudbutt · · Score: 4, Informative
    From http://www.salemradiolabs.com/rivendell/

    Rivendell aims to be a complete radio broadcast automation solution, with the facilities for the acquisition, management, scheduling and playout of audio content. As a robust, functionally complete digital audio system for broadcast radio applications, Rivendell uses industry standard components like the GNU/Linux Operating System, the AudioScience HPI Driver Architecture and the MySQL Database Engine. Rivendell is being developed under the GNU Public License.

    --
    Ethics II Axiom 2. "Man thinks." B. Spinoza
  11. heh by jjshoe · · Score: 1

    use a sound daemon and cron. sure, it will broadcast over any songs playing, but what the heck!

    --
    -- botsex is {grep;touch;strip;unzip;head;mount} /dev/girl -t {wet;fsck;fsck;yes;yes;yes;umount} {/de
  12. Why use RAID 0? by swillden · · Score: 2, Interesting

    RAID 0, also known as striping, is useful for obtaining very high I/O bandwidth at the expense of making every one of the constituent disks a single point of failure. Lose any one of the drives, and you lose all of your data.

    I can see that if you lose all of the data you won't really have lost much, since you can always re-rip it, but why take the risk? You don't need high I/O bandwidth for CD-quality audio... it's only 86KBps uncompressed, and an average ATA-100 hard drive can easily sustain over 200 times that data rate. Since you plan to encode the data, you'll need even less bandwidth, probably half as much if you're using a lossless codec.

    I wouldn't use RAID-0 for this. Use linear RAID or, since you mentioned volume groups, just let the volume manager append the volumes. The result will allow you to keep most of your data in the event a drive fails and will be plenty fast for your application. If you're not tight on space, I'd say you might as well go for RAID-5 and get yourself a little insurance against data loss. If your 600GB consists of three 200GB disks, you'd still have 400GB of RAID-5 storage, which is a lot of audio CDs. About 800 of them with no compresssion, double that with lossless compression, or quadruple that with high-quality lossy compression.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    1. Re:Why use RAID 0? by Anonymous Coward · · Score: 0

      Most people know that RAID-0 (striping) offers both 2x* READ and 2x* WRITE throughput performance.

      Few people seem to know that RAID-1 (mirroring) -also- offers 2x* READ throughput performance.

      Remember that in RAID-1, there are two identical copies of the data. That means that the operating system can schedule read requests on each of the disks independantly.

      When writing a file using RAID-1, both disks have to seek to and write the same sectors, which only offers 1x performance.

      For a mostly read-only environment (like music playback), the only tradoff is capacity -vs- redundancy (read performance isn't an issue).

      * Theoretically

  13. How about this? by grimarr · · Score: 1

    Is it a requirement that the announcement happen at
    the top of the hour, or just that it happen at least
    once per hour?

    If the latter, try to use the jukebox software to
    announce after every song, or every 5 songs, or whatever number would ensure that it happened at least once an hour.

    If it has to be at the top of the hour, this won't help.

    1. Re:How about this? by SupremeTaco · · Score: 2, Informative

      FCC rules state that the annoucement has to be at the top of the hour, or as close as possible to that time, every hour. For example, if your song finishes at 09:59:47, you're golden. If it finishes at 10:01:05, you can fade the song out before the top of the hour, and play the ID. That works well with instrumentals, but not so good with the vocal stuff.

      On the other hand, you can wait till the song is finished, and THEN play the ID. Problem is, if you're running satellite or rebroadcasting a larger or distant station, you're a slave to their timing. If their program starts at 1:00:00, then you almost have to fade the song before the top of the hour, before you cut back to the satellite feed.

      --
      You have a constitutionally protected right to be wrong, and I the right to ignore you.
    2. Re:How about this? by unitron · · Score: 1
      "That works well with instrumentals..."

      Unless of course the listener happens to like and be familiar with that instrumental, in which case it's really infuriating.

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

    3. Re:How about this? by ChrisBeer · · Score: 1

      I can't say for certain regarding radio, but TV legal ids are supposed to occur as close to the top of the hour as possible, in natural program breaks. So, the later option would work. It'd be FCC Chap. 47, if anyone wants to look for it.

    4. Re:How about this? by man_ls · · Score: 2, Informative

      Having worked at a high-power FM station in the Atlanta area within the last year, you have to do a legal ID within 5 minutes of :00, although if it's 5 minutes before, or 5 minutes after, its okay.

    5. Re:How about this? by yuri+benjamin · · Score: 1

      "That works well with instrumentals..."

      Unless of course the listener happens to like and be familiar with that instrumental, in which case it's really infuriating.


      Hell yeah! I hate it when I'm listening to a really good instrumental at the end of the song and some dumb announcer who loves the sound of his own voice starts babbling over the top of it.

      That might be why I listen to my own (bought) collection rather than dumb radio stations.

      --
      You make the mistake of thinking you can educate the fundamental stupidity out of people. You can't.
    6. Re:How about this? by unitron · · Score: 1
      I wasn't referring to the announcer talking during instrumental portions of a song, but of a song being faded out or cut off before its end, in other words, being used as audio filler up to a hard break rather than as as much a work of art and entertainment as the rest of the musical selections played that hour.

      Announcers don't usually talk when they have become lonely for the sound of their own voice but rather when it is dictated by the rules of the format which are handed down to them from above and are not open for debate. They also usually have almost no control whatsoever over what song gets played when.

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

  14. not running on linux by no+reason+to+be+here · · Score: 1

    but there is TuneTracker which runs on BeOS. I don't think BeOS plays with RAID very well, however, so it might not work for you b/c of that; on the other hand, TuneTracker seems to do everything that you require and then some.

  15. too much thinking by digitalsushi · · Score: 1

    It doesnt have to be on the minute, it just has to be every 15 minutes .. so just write some meta data into your filenames or read the id3 tags, and have the program count if the next piece will go over the 15 minute marker. If it does, then just play the ID file and you're good for another 15 minutes.

    Or just patch a real audio mixer into the equation that plays every 15 minutes no matter what :P

    --
    slashdot: where everyone yells sarcastic metaphors to themselves to understand the issue
    1. Re:too much thinking by unitron · · Score: 1

      There hasn't been a 15 minute rule for several decades if you mean in the U.S. It's once an hour every hour at or as near as practicable to the top of the hour. It consists of the call letters immediately followed by the community of license.

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

  16. Not the drives, the card! by Saeed+al-Sahaf · · Score: 1

    It's not the drives that set you back with RAID 5. It's the RAID card. SATA drives are cheap now. Not everyone can plunk down the cash for a card that will accomodate RAID 5.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Not the drives, the card! by Anonymous Coward · · Score: 0

      just use ATA drives, and PCI controller cards. then software RAID5 in on linux.

      people will make a fuss about speed, but if that really is an issue (which i doubt it will be--encoding or decoding is not going to be held back by your drive throughput on that machine), use a small, fast, single drive to play your lossless format music off of. in fact, you could do a pre-fetch of the next few hours worth of playlist onto the small drive and let the raid spool down and sleep for a while.

    2. Re:Not the drives, the card! by drsmithy · · Score: 1
      It's not the drives that set you back with RAID 5. It's the RAID card. SATA drives are cheap now. Not everyone can plunk down the cash for a card that will accomodate RAID 5.

      Use software RAID. Performance (in this application) will be just as good and you can use cheap, off the shelf 4-port SATA adapters.

  17. Perl Script by natmsincome.com · · Score: 1

    Probably not the answer your looking for but at my last job (a failed startup) one of the other developers set up a perl script in XMMS(if I remeber correctly). Basically XMMS allows you to point your playlist to a script. This then played for X minutes then added something.

    We used text to speach and got it to say the time or read a fortune. It was fun. The only problem we had was the pause between songs which took us a while to fix.

    1. Re:Perl Script by schweini · · Score: 1

      that sounds cool - do you know of any documentation on this feature? i couldn't find any quickly, but i could really use this...

  18. MPD and monitor client? by HeelToe · · Score: 1

    You could use mpd and preset playlists.

    Run a cron job at 15 before the hour - have the job be a client to the mpd and:

    1. determine the time remaining on the current song vs. clock time and the playtime of the upcoming songs. It should be simple math to decide which song to play the station ID after.
    2. monitor the mpd some more.
    3. stop it when you reach that point.
    4. save the playlist and the current position within it.
    5. load the playlist with the station ID.
    6. play it.
    7. load the original playlist.
    8. start playing at the corred position.
    9. ?
    10. PROFIT!

  19. It's been done by JeffTL · · Score: 1

    Maverick Radio (http://www.mavradio.org/) at the University of Nebraska at Omaha runs on Linux -- Red Hat, if I recall the distro. I think they set their playlists using XMMS when they are in automated mode.

    I've always thought that iTunes on a Mac or a Windows PC wouldn't be a bad broadcast automation system, but a Linux box would be cheaper than a Mac and easier to maintain than Windows.

  20. Do it yourself. by man_ls · · Score: 1

    Do it manually.

    Have an op spend an hour picking from the library of tracks and previously-recorded legal IDs, and make it into some coherant progression.

    That'll give it a human touch, and still keep you legal.

    That's what I did when I worked for a station in Atlanta, I'd oftentimes come in off-hours, and set the computer system to play specific tracks in order, interspersed with legal messages, so that I was controlling the station but not actually on the air. It was great that way.

  21. FCC Rules: CFR 47, Part 73.1201 by jmanforever · · Score: 1

    73.1201 STATION IDENTIFICATION.

    (a) WHEN REGULARLY REQUIRED:
    Broadcast station identification announcements shall be made: (1) At the beginning and ending of each time of operation, and (2) hourly, as close to the hour as feasible, at a natural break in program offerings. Television broadcast stations may make these announcements visually or aurally.

    (b) CONTENT:
    (1) Official station identification shall consist of the station's call letters immediately followed by the community or communities specified in its license as the station's location...

    There you go - the answer. There is no "5 minute" rule, nor is it required to be right at the top of the hour, just as close as feasible.

    Yes, I AM a broadcast engineer, and I DO hold a commercial FCC license.