Slashdot Mirror


Software to Buffer and Delay Audio Playback?

NaDrew asks: "Fox has seen fit to use two of its worst broadcasters (Joe Buck and the horrid Tim McCarver) for the upcoming World Series. I'd love to just turn down the TV and listen to the Giants' regular broadcast team (Duane Kuiper, Mike Krukow, Jon Miller) on my local Giants affiliate radio station, but as a DirecTV user this doesn't work. Why? Think about it: The radio signal traverses the 20-odd miles from Sutro Tower to my home in Palo Alto in a fraction of a second, but the video signal goes from KTVU's broadcast center in Oakland via satellite to DirecTV's operations center in Boulder, then via satellite again to my home--22,500 miles x 4 bounces equals almost 100,000 miles. Coupled with the MPEG processing done at DirecTV's operations center, this adds up to a delay of about six seconds. What I would like to do is buffer the audio from my radio for the appropriate amount of time and then play it back in sync with the video. Ideally I'd like a software solution that will run under Win32. A Google search yielded some specialized hardware solutions but nothing for my purpose. Ideas, pointers, even 'you idiot it's right here' flames are welcome. Thanks!"

33 of 86 comments (clear)

  1. play the radio back through a windows box by Fo0eY · · Score: 2, Funny

    you should get all the delay you want that way

  2. Radio Delay by yasth · · Score: 5, Interesting

    Actually I am suprised that you aren't hit by a seven seccond radio delay. A simple way would be to write the data to disc, and use annother program to follow behind it. I.e. use some program to record the stream, and then 6 secconds later set winamp on the still recording stream, that should work, but no promises.

    --
    I'd do something interesting, but my server can't handle a slashdotting.
    1. Re:Radio Delay by Blkdeath · · Score: 3, Informative
      A simple way would be to write the data to disc, and use annother program to follow behind it. I.e. use some program to record the stream, and then 6 secconds later set winamp on the still recording stream, that should work, but no promises.
      I was thinking exactly that. DarkIce is probably exactly what the submitter wants. It has a built-in delay function which would do exactly what he's looking for.

      Record the radio via the Line-In, set it to stream with a 5 second delay. Send the stream through IceCast and connect with XMMS/WinAmp and away you go. Heck, you could even use one of these and connect your soundcard's line out to your television and control the whole she-bang with your remote control.

      --
      BD Phone Home!

      Shameless plug. Like you weren't expecting it.

  3. Old fashioned method.. by Anonymous Coward · · Score: 2, Informative

    Take two tape recorders apart (actually only one needs to be able to "record") and mount the guts side by side on a board. You will have to do some modification of the drive assembly so that both mechanisms run from the same motor. Take apart a cassette tape and remove the actual tape. Run this piece of tape through the two tape recorder mechanisms and loop it back over itself -- some scotch tape will hold the two ends together nicely.

    Place the sound input to the one of the recorder mechanisms and take the sound output from the other mechanism.

    You can controll the amount of delay between the two by varying the speed of the motor.

    1. Re:Old fashioned method.. by adamjaskie · · Score: 2

      However, once the tape got recorded over a few hundred times, it would start to sound like CRAP with all the residue of previous recordings building up. You would have to use a really long tape loop to have it be reasonable sound quality after 15 minutes or so of recording and re-recording.

      --
      /usr/games/fortune
  4. Hmm, six seconds eh by gowen · · Score: 5, Funny

    Put your speaker about 1.167 miles away and turn them up *really* loud...

    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  5. Use your imagination by pbulteel73 · · Score: 2, Funny

    Seriously, imagine what the radio comentator says, then use the video to verify it. If it doesn't match, you need to work on your imagination.

    -1 Offtopic +2 Funny -3 Funny = doh!

  6. Multi-purpose audio tool by fingal · · Score: 5, Informative

    Why not download PD from here and have a play around. Creating a delay between the audio inputs and outputs is very easy...

    --

    The only Good System is a Sound System

  7. Simple Solution by Henry+V+.009 · · Score: 2

    Very simple solution using 1980's tech. You need a video tape and a cassette tape. Record the television signal on one, and the radio on the other. Afterwards, just cue them up, and you can watch everything in sync.

  8. DMCA Violation by Anonymous Coward · · Score: 5, Funny

    Somebody Arrest this person.

    The modulation of an analog audio signal over a high frequency carrier wave is an "effective" copy control mechanism.

    By turning up your speakers really loud so that anybody can hear the broadcast is a circumvention technology that is not only illegal to implement under the DMCA but is also illegal to tell anybody else how to implement it.

    You sir are an INTELLECTUAL PROPERTY THIEF and are no better than the cranked up dope head that steals the purse of the poor widowed pensioner to pay for his next hit.

  9. Simple... by qengho · · Score: 2, Informative

    Get a TiVo (you know you want one anyway), start watching the game, pause for six seconds to fill its buffer, then resume watching, happily in sync with the radio.

    1. Re:Simple... by Geek+Boy · · Score: 2

      I think you have it backwards. The radio comes in before the satellite feed does.

    2. Re:Simple... by qengho · · Score: 2

      I think you have it backwards.

      Right, sorry. Somebody mod that down (-1, Poor Grasp of Chronology).

      Fortuntately, I'm compatible with my wife. We have a VCR with "commercial advance", a feature that marks commercials after a show is recorded and automatically skips past them on replay. After viewing a few shows this way, we were watching live TV and a commercial came on. "Why are we watching this?", she says. "Can't you just fast forward through it?"

    3. Re:Simple... by dschuetz · · Score: 2

      Get a TiVo (you know you want one anyway), start watching the game, pause for six seconds to fill its buffer, then resume watching, happily in sync with the radio.

      I'd laugh, if it weren't for the fact that I catch myself starting to do this *almost every week*, before I remember, dammit, it doesn't work this way!

      My current solution (which I haven't even begun to work on yet) is to:

      * Get an FM radio card
      * Hook it to a linux box in the basement
      * Get streaming shoutcast working
      * Point my Rio Receiver at it

      Somewhere in there I'm going to have to add a delay, either at the shoutcast level, or (if necessary) as a separate process in the FM->shoutcast pipeline. Extra points awarded if I can make it easily variable (and controllable from the Rio), but that's even lower on the priority scale.

      Of course, until the Redskins start winning again, I won't have much enthusiasm for this.

      LONG-term plan? Replace the single FM card with one of those cool high-end A/D converters and get GNUradio running, so I can select any of my favorite off-air radio stations on the fly, and listen to 2-4 of them at once. :)

      But I gotta mow the lawn, first.

  10. Hardware solution for this by Geek+Boy · · Score: 5, Funny



    Get a spool of about 1,800,000 km of wire and use it to connect your speakers to the radio with carefully placed signal boosters/repeaters.
    YMMV

    1. Re:Hardware solution for this by Geek+Boy · · Score: 2

      Which would be rather close to the number I provided. I used km, if you look more closely.

  11. Got a TiVo? by cybermage · · Score: 4, Interesting

    If you have, or can get, a TiVo that is seperate from your DirecTV receiver, you can try the following:

    1. Run the DirecTV Video straight to the tube.
    2. Connect the Audio from your Radio Tuner to the Audio In on the TiVo.
    3. Watch the DirctTV feed and listen to the TiVo feed.
    4. Pause/Fast Forward the TiVo until the audio is in sync with what you're seeing.

    To make sure the TiVo doesn't decide to change channels or anything, you might program it to record something as long as the game (like the game.)

    1. Re:Got a TiVo? by zsmooth · · Score: 2

      You sir are the one that doesn't understand. His suggestion is to watch the DirectTV feed (which is delayed 6 seconds) and listen to the radio feed (which isn't delayed) through the Tivo, using the Tivo to delay the audio.

      Moderators, please mod parent down.

  12. you aren't using the right google search string by HughsOnFirst · · Score: 2


    http://www.google.com/search?num=100&hl=en&lr=la ng _en&ie=ISO-8859-1&q=freeware+windows+audio+recordi ng+real+time+effects+delay&btnG=Google+Search

  13. Some nitpicking by uradu · · Score: 2

    > 22,500 miles x 4 bounces equals almost 100,000 miles. Coupled with
    > the MPEG processing done at DirecTV's operations center,
    > this adds up to a delay of about six seconds.

    Given an overall system processing delay more than an order of magnitude larger than the total signal propagation delay through space, why even bother mentioning it, let alone do the math? That 100K miles adds only a small fraction of a second to the many seconds of processing on the ground and in the transponder.

  14. MPEG doesn't contribute to delay by MrResistor · · Score: 4, Informative

    All professional TV broadcasters have equipment that does MPEG processing in realtime (I'm one of the techs that fixes it when it breaks). Yeah, I guess maybe it could contribute a few ms of delay, but nothing you couldn't compensate for with the delay setting in a good reciever, and it is still probably less than the delay introduced by retransmitting, which still doesn't account for the 13-15s your talking about (6s + typical 7-8s delay on live radio).

    It's much more likely that KTVU has a playback delay set on their video server, mainly for the same reason that radio has one: bleeping out profanity before it hits the air.

    DirecTV certainly has a playback delay of at least 4s, which gives their automation system (which I also service) time to switch to an alternate stream if something goes wrong with the current one.

    Anyway, my point is your placing blame on the wrong parts of the process. That doesn't help with your case, of course. But my suggestion is to do exactly what the broadcasters are doing (except a lot cheaper):

    Run sound from your reciever to the line in on your soundcard. Record that with any sound recording program (the default Windows Sound Recorder will work just fine). Have a player up with the record target file ready to play, and start playback manually when you think the time is right.

    I haven't tried this so it might not work if Windows locks the record file during recording, but essentially that's exactly how it's being done on the video servers the broadcasters are using. I'm sure there's a better way to do this in Linux, but I haven't got around to playing with any of the Linux media tools yet.

    --
    Under capitalism man exploits man. Under communism it's the other way around.
    1. Re:MPEG doesn't contribute to delay by MrResistor · · Score: 2

      Which explains why I heard J.T. Snow screaming "FUCK!" very loudly after screwing something up last week? I'm often surprised at what gets on the air on baseball broadcasts.

      That's pretty funny!

      Anyway, any bleeping is done by a human, and they're bound to make mistakes, especially since they're just sitting in front of a switcher waiting for a good time to cue the commercials. I doubt a professional announcer would do something like that if he didn't think there was somebody manning the button, they can get in serious trouble for that.

      DirecTV MPEG processing was the only other thing I could think of that might affect it.

      Actually, the MPEG processing is probably happening at KTVU. That's pretty much the state of the industry at this point. DirecTV might further compress it in their facility (or recompress it, I guess), but that would add any significant delay.

      The playback delay would be at both sites, though, and there are a lot of reasons for it. The 2 most practical reasons I've already listed, but when I'm testing the servers I usually delay playback up to 40s. Sometimes you can have some wierd issues if the playback starts too soon. I wouldn't expect that in a real world situation it would be nearly as critical, though, since I run them at or slightly above the maximum sustainable bandwidth of the RAID controllers for a minimum of 2 days.

      --
      Under capitalism man exploits man. Under communism it's the other way around.
  15. use winamp by jilles · · Score: 3, Informative

    and set the streaming buffer to a suitable size. By default it will probably be something like 64 KB which depending on the bitrate of your audiostream may be enough. Otherwise just make it a bit larger. For a 128kbit stream you probably want to set it to 96 KB. Winamp will try to keep the buffer filled so, effectively there will be a delay proportional to the buffersize.

    --

    Jilles
    1. Re:use winamp by jilles · · Score: 2

      There's no way it can fill the buffer faster than the data is coming in. The data is coming in in real-time and is going out in real-time. So there must be a period of time between the moment the data enters the buffer and leaves it. Of course the server can momentarily send the data faster than real-time, however not on a continuous basis (certainly not in the case of a live transmission).

      --

      Jilles
  16. AudioMulch might just do the trick by i_am_nitrogen · · Score: 4, Informative

    I don't know if it's still around, but there was at one point a program called Audiomulch that worked kinda like a modular synthesizer setup. It has input and output modules, and a delay module, so you can just hook the audio out from the radio to your sound card, and connect the delay in-line between the input and output.

  17. Cheap hardware solution by stinkydog · · Score: 3, Informative

    Get a digital effects module with a delay feature
    .

    I have an Alesis Nanoverb that I use for sound design work. You can get them on Ebay for under $100. Acording to the specs you can get over 1200ms delay per channel (loop left out to right in for 2400ms or about 2.5 seconds). Correcting the delay involves turning a nice analog knob.

    The Alesis QuadraVerb has a full 5 seconds of delay per channel and should do the trick for you for about $130 .

    SD

    --
    âoeWho knew something as harmless as willful ignorance could end up having real consequences?â
    1. Re:Cheap hardware solution by afidel · · Score: 2, Informative

      still too short, he talks about a 15-16 second delay, which is a lot more then any hardware delay box I have seen could do.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
  18. A TiVo for radio? by Papineau · · Score: 2, Funny

    So you want a TiVo for your radio? We're sorry, but with ClearChannel you just need to wait a few minutes before it's broadcast again, so there'd be no market.

  19. The easiest solution by Wonko42 · · Score: 2
    I've seen one comment hint at this, but everyone else seems to be suggesting complex technical solutions when this is really quite simple. Winamp will stream MP3 files even while they're being written to, so all you need to do is this:
    1. Encode the audio from the radio to MP3 in realtime using the Winamp Live Input plugin.
    2. In another Winamp session, manually start playback of the file after the appropriate delay.

    Voila, it's that easy.

    1. Re:The easiest solution by forsetti · · Score: 2, Insightful

      Will Windows let you read from and write to the same file as the same time?

      --
      10b||~10b -- aah, what a question!
    2. Re:The easiest solution by Wonko42 · · Score: 2

      Sure, as long as the file isn't locked. I do it all the time with MP3s...I'll start an encoding process and then listen to it as it encodes to make sure it's working okay. This is also why you can listen to MP3s as you download them via Gnutella, etc.

  20. Old school or digital.. by Ogerman · · Score: 2

    Musicians have long done audio delay using an analog tape machine with playback "taps" for trippy overlayed sound effects. Just look for DSP software designed to replicate this functionality. There are numerous possibilities for Linux or Windoze.

    Then again.. this is all a lot of work just to watch a silly sports event. (:

  21. Echo unit... by Gordonjcp · · Score: 2

    ... it's obvious folks. Get something that will let you do real-time effects (Reaktor springs to mind here). Set up a delay that's 6 seconds minus the latency in the sound card. Tweak for best results.

    Forget all this "set up a wma streaming server" etc. It's too complicated for this job.