Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
The Media

Removing Ads from a Live Audio Stream in Unix? 25

Soothh writes "A local radio station here is finally doing streaming audio again on the net so i can listen at work. The catch, they go through Hiwire, which only supports Windows Media Player. Their tech page says that this technology has 'proven difficult to implement on the Unix platform.' Is there any validity to the claim that WMP is the only cost effective way to remove commercials. Anyone know other ways to get streams from real radio stations on a *nix platform?"
This discussion has been archived. No new comments can be posted.

Removing Ads from a Live Audio Stream in Unix?

Comments Filter:
  • by PD ( 9577 ) <slashdotlinux@pdrap.org> on Tuesday August 20, 2002 @02:09PM (#4106204) Homepage Journal
    Copied it straight out of the link. This might help with those who didn't read the article.
    7. Why don't you support Linux/Unix/Solaris? (Unix)

    Supporting Unix is more complex than simply offering a Windows Media Player for Unix. There was a ruling in favor of AFTRA, the actor's union, which states that commercials made for radio cannot be re-broadcast onto the Internet without payment of huge royalties. Therefore, if you want to stream your radio station on the Internet you need to remove the commercials. Our software enables us to automate the process of removing radio commercials and replacing them with Internet safe ads on Windows platforms. This technology has proven difficult to implement on the Unix platform. At this point we have no plans for supporting the Unix platform.

    • Note also #5, which says essentially the same thing about MacOS.

      Do any multimedia-savvy readers have any idea what the issue is? Or is it just a euphemistic way to say, "We're getting the Mac client out when we get to it, and don't see any reason why supporting Unix would be cost-effective."?

    • This technology has proven difficult to implement on the Unix platform. At this point we have no plans for supporting the Unix platform.

      Uhh... this is server-side technology, unless they're doing something very dumb (like streaming the raw audio, ads and all, along with a replacement set of ads to be inserted instead?!). All they need to do is send the same audio stream they send to WMP clients, but encoding in MP3, Ogg Vorbis, RealAudio or whatever. Hell, you could even do it by piping the Line Out from a Windows client into a Real/Darwin/whatever streaming server for rebroadcast!

      I don't know what the problem really is, but this "explanation" certainly doesn't hold water - either they're talking BS, or the PHBs have taken over the asylum and fallen for some really dumb FUD!

  • by PhaseBurn ( 44685 ) <PhaseBurn@PhaseBurn.net> on Tuesday August 20, 2002 @02:51PM (#4106448) Homepage
    I've been doing this for several months now, it does work, but it takes some doing...

    Start off with the streaming URL that your radio station offers... You'll want to open this in wget, and download the data inside. You'll have a 2nd stream inside this file, and some other info as well... The stream is what we're most concerned with... Download that stream with ASFRecorder. Link here [freshmeat.net]. This will take up some disk space so don't leave it going when you're not listening (I usually let it write for 8 to 9 hours a day, and it fills up 100 megs or so, which I delete at the end of the day). Now, you can use the AVI plugin for XMMS to play this file on your computer. Link here [freshmeat.net].

    I hope this helps, if you have any questions, you're more than welcome to e-mail me at phaseburn at phaseburn.net and I'll try to help ya out...

    Best reguards
  • Low Tech Solution (Score:4, Insightful)

    by FattMattP ( 86246 ) on Tuesday August 20, 2002 @02:53PM (#4106474) Homepage
    It's not like this is rocket science. Plug sound output of machine with stream from windows media player into input of machine with Shoutcast encoder (or whatever). Distribute your stream to the masses in MP3 from new server. So you'll lose a little quality from the re-encoding. Big deal, few people will probably notice.
  • I would think the adds would be stripped at the sending/server end. The client should not have to do eanything but convert digits to audio. If they are depending to the client to strip the adds then they are sending them out over the internet even if it is not played at the far end.
  • Here at ibiblio we have a machine with a radio tuner attached to the line in on the unit's sound card. We then run darkice, a GPL icecast/icecast2/shoutcast live streamer capable of delivering streams to multiple hosts simultaneously. The ogg and mp3 streams produced are then whisked off to our icecast and icecast2 servers which serve up simulcasts. Works pretty well for us. I haven't looked into any facility for removing ads from the stream, but it seems like you could hack the code to add some sort of DSP filter before the encoding is done.
  • It isn't a matter of the player engine, it's a matter of the engine providing the audio stream with the ads cut out.

    Radio stations use low frequency tones to indicate when a commercial block starts/stops. They are run through a notch filter so the end user listening over the internet, or on a regular FM radio, will not hear the tones. But these tones activate equipment on the radio station's side. Presumably this is what Hiwire is doing. They have some sort of server software to detect the tones and start showing custom advertisements on your browser (instead of the radio station's.)

    If they wanted, they could probably make a shoutcast-based solution. But maybe it's not cost effective to them. (After all, probably 95% of their online listener base would be using Windows anyhow.)
  • Assuming you don't want to go through the trouble of dedicating a computer to receiving the stream and re-encoding the audio to another format, it would probably just be easiest to use Media Player. Use CodeWeavers CrossOver Office [codeweavers.com] to run Media Player on Linux.
  • Apparently Hiwire does some sort of client-side ad blocking. To me that seems like a recipe for disaster. Especially when they say that huge penalties can apply if it fails.

    Why don't stations do it on their end? They play a song and then a commercial goes on. Great. The server just feeds the broadcast commercial to the broadcast feed, and the internet commercial to the internet feed and all is well. Not only that, but then someone can't grab the feed with a non-hiwire client, run it through a hacked codec and cause the station to be liable for huge fines.

    Furthermore, if it would be done server-side they wouldn't have to spout out the garbage that it's too complicated to implement without an activeX control.

  • DIY (Score:2, Interesting)

    by Evro ( 18923 )
    If you really want to listen you could just setup your own streaming server at home or whatever and plug the radio into the line in jack. Assuming you have an always-on connection, of course. If you set the bitrate low enough you shouldn't have any bandwidth issues, but the sound quality would obviously suffer. But then again that probably won't matter if it's talk radio.

    JWZ had some perl scripts for doing this... http://www.dnalounge.com/backstage/src/icecast/ [dnalounge.com] . It looks like the app doing the actual streaming is Icecast.
  • The problem is detecting when an ad plays. You can run off the clock and just know that ads play between 2 and 3 after the hour or you can encode a sub audible tone into the ad and use that to mark it. After that all you need is to make live recording and play silence via the clock or using the sub audible tones. I had a system once that could use the clock (make sure to sync with atomic time) to replace the top of the hour news (the news agency didn't want internet play) with an Internet friendly newscast. I had the tone detectors worked out but the problem was getting the stations to take the time to put sub audible tones in the commercials they didn't want played on the Internet. I had the whole thing running on Linux cranking out an Mp3 stream, which pretty much every player could decode. The biggest problem that I had to work out was being able to cut from one mp3 to another without clicks. I had to record directly to a mp3 and then had to cut from the middle of the mp3 to another mp3 (that was being recorded live also). I was always about 5 to 10 seconds behind the actually broadcast but hey, I'm was streaming it anyway.
  • Comment removed based on user account deletion
  • If anyone wants to check it out, its x103.com
    its not a bad station, its the best we have in Indiana, but back in the day, when i was a truck driver i heard alot better. tho i do LOVE their morning show. I have the codeweaver plugin, but havent tried it yet. Going to try the freshmeat ASFrecorder too, and possibly run it over an mp3 server. I was just ticket that they dont even have a concern to try to make it work for *nix,
    when i really doubt they would have that much trouble making it work, id bet they could use realplayer or something, im not a fan of real, but atleast they make a linux client.
  • I am afraid that Cliff is misleading all of you. The FAQ that he partially quoted is: "7. Why don't you support Linux/Unix/Solaris? (Unix) Supporting Unix is more complex than simply offering a Windows Media Player for Unix. There was a ruling in favor of AFTRA, the actor's union, which states that commercials made for radio cannot be re-broadcast onto the Internet without payment of huge royalties. Therefore, if you want to stream your radio station on the Internet you need to remove the commercials. Our software enables us to automate the process of removing radio commercials and replacing them with Internet safe ads on Windows platforms. This technology has proven difficult to implement on the Unix platform. At this point we have no plans for supporting the Unix platform. " For those of you that don't know how streaming works and why radio stations are streaming online, bear with me and I will try to explain. When a radio station provides a stream to Internet listeners they have to pay a fee per listener, per byte to their streaming provider. The "On-Air" commercials must be striped out, therefore losing any added value to the advertisers. AFTRA will NOT allow the regular "On-Air" ads to play through without paying huge royalties. http://www.aftra.org/resources/negotiations/2000Ra dioComm.html (Section 10) One way that they recoup that cost is to sell ads on the Internet streams. This is where Hiwire, Inc. comes in. Our technology strips out the "On-Air" commercial and inserts an Internet Safe ad that was made in compliance with AFTRA. Our technology works both on the encoding side at the radio station, and on the client side. The client side for Linux/Solaris/Unix/Macintosh is where the problem is. Internet Explorer/Netscape and Windows Media Player are required programs for this to work. Internet Explorer and Windows Media Player for the Macintosh (as an example) do not have the same functionality as it does on the Windows platforms. That is why it is not as simple as offering a Windows Media Player stream to the other platforms. If a listener was to attach to the streaming URL without a Hiwire tuner, they would not hear any ads, the radio station could not off set the cost of the stream, Hiwire would not make money and go out of business. We are a start-up with limited recourses (money and staff). When developing any type of product you must look at your return on investment and weigh the pros and cons. The greatest return on investment is supporting the Microsoft platforms (excluding NT 3.5 and 4). This is not to say that Linux/Solaris/Unix/Macintosh will not be supported in the future. Hiwire did not go into business to upset the non-Microsoft users. Please be patient and remember that the Technical Support representative does not have the ability to make decisions for the company and is only the messenger.

It is easier to write an incorrect program than understand a correct one.

Working...