Using AudioFileOpenUrl to play a remotely hosted audio file

I was playing around with the iPhone SDK and I wanted to write a trivial app (UIView with UIButton, press button, play file) that played a remotely hosted mp3 file. It seems like this should be simple:
NSString *filepath = @"http://www.server.com/legal.mp3";
CFURLRef audioFileURL = CFURLCreateWithString(NULL, (CFStringRef) filepath, NULL);
AudioFileID audioFile;
if (noErr != AudioFileOpenURL(audioFileURL, fsRdPerm, 0, nil)) {
NSLog(@"Error - : could not open audio file. Path given was: %@", audioFileURL);
Why doesn't this work? What am I doing wrong?
Thanks in advance.

QuickTimeKirk wrote:
Very difficult request because the Apple TV can only play one file at a time. It doesn't have a "loop" feature.
You could use QuickTime Player Pro to "join" the audio files into one file. The hard part would be adding the five minute video chunks via copy/paste as each would be added as a new "video" track. QuickTime .mov files can have up to 99 "tracks" and the .mov container is supported by Apple TV.
So this new file would have a new video track (actually just a copy of the original) that played up to 98 times. A five minute source video would end up being a bit over 8 hours in duration.
The 98 track video could be "flattened" into one video track via export. The same for the audio track movie.
Other options:
Set the Quicktime Loop flag in the movie inspector properties.
Make a video playlist, adding the file to the playlist lots of times - make sure playlists are enabled in Settings for video not just music.

Similar Messages

  • Re: How to play  the remote shared audio file  by JMF?

    did u connect from the client host to the remote host.(use ping to test it)?
    if the test is ok, test the palyer by playing file in ur client host?

    yes,i have tried to connect the remote and copy the remote file to local host ,
    the file could be played in my local host!

  • How do I play a video and audio file at the same time on Apple Tv?

    I need to play a video loop (with no audio) on my apple tv and also play some music in the background. Its a video loop with no audio and then I need music to play in the background. The loop needs to repeat all day because its only 5 min long and the audio is an entire play list that's several hours. This is for a lobby flat screen setup.

    QuickTimeKirk wrote:
    Very difficult request because the Apple TV can only play one file at a time. It doesn't have a "loop" feature.
    You could use QuickTime Player Pro to "join" the audio files into one file. The hard part would be adding the five minute video chunks via copy/paste as each would be added as a new "video" track. QuickTime .mov files can have up to 99 "tracks" and the .mov container is supported by Apple TV.
    So this new file would have a new video track (actually just a copy of the original) that played up to 98 times. A five minute source video would end up being a bit over 8 hours in duration.
    The 98 track video could be "flattened" into one video track via export. The same for the audio track movie.
    Other options:
    Set the Quicktime Loop flag in the movie inspector properties.
    Make a video playlist, adding the file to the playlist lots of times - make sure playlists are enabled in Settings for video not just music.

  • I just moved my itunes library from a win 7 computer to a win 8.1 computer. Getting an error message "iTunes has detected a problem with your audio configuration. Audio/Video playback may not operate properly. Can't play CDs or get audio file from web!

    Help! I just moved my itunes library from a Win 7 computer to a new Win 8.1 computer following the instructions on the itunes website. Everything is good except I'm getting an error message on the Win 8 computer if I try to play a CD or get an audio file off of the internet. I get an error message that says "iTunes has detected a problem with your audio configuration. Audio/Video playback may not operate properly. I don't know where to look for or fix the audio configuration on the win 8 computer. As far as I can tell the iTunes configuration looks the same as on the other computers in the house. At this point I don't dare plug my ipod touch into the Win 8 computer for fear it will get messed up.

    I have the same problem and I know that it is due to my PCI Audio driver not being compatible with WIndows 8.1.
    iTunes isn't the only program that can't direct sound to the built-in speakers anymore. The obvious solution would be to update the drivers, but unfortunately Dell does not provide an updated driver for my model, so I am stuck with that.
    However, saying that, only my laptop speakers are affected by this. I can use sound fine on applications where I can choose the output device and direct sound to the head phones, but for some reason iTunes does not let you choose the audio device manually.
    To listen to music I imported the iTunes Library in Windows Media Player and changed the audio output using the following instructions: http://windows.microsoft.com/en-us/windows7/c00d11ba
    However, I would also like to rent movie's from iTunes, 
    Would be great if iTunes would let you choose the output device, too, like most other applications using sound  from Skype to Windows Media Player,...

  • Play back for Archived audio file

    First of all, forum users, please pardon my ignorance with Documentum...my first experience with this after many years in SAP.
    I don't see any posts or articles on this subject.  I'm attaching a WMA file to Documentum.  I need to be able to play that back, using the user's PC player, in this case Windows Media Player.  Has anyone seen documentation on how to call media player from frontend services and pass the audio file, or can you suggest the "best practice" for this?
    My PDFs display easily using ARCHIVOBJECT_DISPLAY, and I suppose I expected that FM to decide how to handle the file, but it seems to work only for PDFs, so far, for me.

    Found way to do...
    read file back from documentum
    download to desktop
    call frontend services execute.

  • Is it Possible to Play More than 1 Audio File Parallelly ?

    Friends,
    Is it possible to run more than 1 audio file at a time using Player or Processor ???
    For example, i have
    Audio1.MP3, which play for 2 minutes (which has only music).
    Audio2.MP3, which play for 1 minute ( which has only voice).
    I want to start with Audio1.MP3 and when it reach 1 minute, Audio2.MP3 should parallelly run with Audio1.MP3, so that 2 audio file should finish at same time.
    I want my music and voice should be mixed... (i.e) i want to mix two audio tracks..
    Is it possible thru JMF ????
    Regards
    Senthil

    I dont know if its possible with JMF, but it is with javax.sound
    You write a method to play a file, and then you create two threads where each one plays a different sound file, and tell one of them to wait 60000 millis.
    R. Hollenstein

  • Audio bug with WAV files: use mp3, not wav for syncing long audio files

    Just a tip:
    I've noticed another audio bug in Presenter (including 7.05) but there is a workaround. I often export the audio as a single, long clip from pre-recorded lecture videos, and sync it with the powerpoint slides in Presenter. I've found it easiest to import the long audio file into the first slide, then sync using the Edit Audio window. I find that much easier to use than the Sync audio window.
    However, If you use WAV format for the imported audio file, sometimes Presenter will simply refuse to play back anything beyond about 5 minutes into the timeline in the Edit Audio window. Nothing fixes it - restarting, re-importing, etc. However the problem goes away if you save the audio as mp3.
    Ellen
    http://thedesignspace.net

    Why did you post this in the LiveType forum?
    I would recommending posting your question in the Final Cut Pro forum.
    Have you tried trashing your preferences?
    Anyways... here is a thread with a similar problem:
    http://discussions.apple.com/thread.jspa?threadID=656515

  • Itunes doesn´t import and play PCM 5.1 audio files bounced by Logic Pro X

    Hello Evebody!
    I use to make many surround mix in logic pro X, and it bounces a PCM 5.1 surround files (.wav)
    How I need to organize and Play this mix the itunes should be the best software to do it, however
    Itunes don´t reconize this .wav file when I try to drag on its list. The preview by space bar plays the
    surround very well the QuickTime as well but Itunes do not accept this kind of file.
    If someone knows how to help me with this issue please let me know. I read that itunes accept DTS 5.1 formats
    but I want play only the audio file not a movie track.
    Thank´s
    Paulo

    Fool Of God, thanks much! I will give this a try. Man, if it's not one thing it's another! I love Apple, but if they keep breaking things, they're going to help Microsoft!
    **UPDATE** This work-around did work for me as well, and you're right Fool Of God, makes NO sense at all. The M4A file is 83 MB while the MP3 is only 63. So it has to be a glitch with importing MP3's of any size. Seems that 50MB is the limit. Thanks again, you saved my day!

  • No audio play through when uploading audio file

    Hello. I have been trying to use GB '08 to upload audio files of recorded interviews. Problem is when I begin uploading, no audio plays so I can't adjust levels, etc. I've tried looking through preferences/other tools for "play through" features but can't find any. It doesn't do me any good to try to upload interviews if I can't hear them to make sure the audio quality is good enough. Can anyone help with this? Thanks!

    Yes, I am importing the audio from an external recording device. I set up a basic track and then hit record but then I can't hear anything except the metronome or the timing clicks. So I have to stop it after a few minutes to check that it has recorded the audio properly - levels OK, etc. And then if the voice levels are too low or some other problem, I have to guess that I'm adjusting the input levels OK, and then I hit record again and repeat the process. I want to be able to hear the audio while I'm recording. That's what I can't seem to fix.

  • My iPhone 4 (iOS 4.3.5) can't play my protected AAC  Audio files

    When i try playing an older song i have purchased in iTunes, of the "protected AAC audio file" type, my iPhone just skips it. And this is on both my new acount and my old acount. I made two playlist to test this issue, and the older "protected" files does not work, but all the new "purchased" files work fine.
    I should think this is a software problem, and more people are experiencing this, but i couldn't find any ohter threads with this issue...
    HELP! I want to listen to the Johnny Cash album i purchased in 2006...

    five computers... not devices!?
    anyhooo, i de-authorized all devices for that acount and re authorized, then tried syncing again... no result!

  • HT2375 Using logic 9: play back of all project files now has problems:  Track volumes are way off - if panning is set to center then you cant hear that track? Even if pan is adjusted tracks are low and or distorted I have looked at core/built in audio

    Been having project play back problems for about a month.  Sometimes when I open a project the volume of certain tracks is low and or distorted.  Oddly if a midi track is panned to the center (0) its volume is too low and if I pan right or left the track becomes louder.  Sometimes this doesn't help and if it is an audio track things become distorted. 
    Although things have been working good for about a year now I think it has something to do with the fact that I have to take the laptop to work and use headphones/built in audio for play back and then take it home and use different audio interface but I can't be sure.  The settings in preferences/audio/devises seem to be correct.
    I have not added any plug-ins recently.  I have not downloaded any new programs recently other than a NI tutorial video (shouldn't have any affect) but I am trying to use a new midi controller but again that shouldn't have any affect on play back of existing track?
    Any suggestions?

    Thank you for the replies.  Everyone was correct about the jack, interface, and phasing problems.  I have been unplugging my motu audio interface and then using headphones at work.  I have not changed any detailed audio output settings in logic.  When I read that the jack might be a problem I tried switching headphones.  This actually helped.  I am using dre-beats headphones and they seem to be having issues with the mac/jack-(the phasing/panning problems.  I can use these headphones with other devices but not the mac.  I have to use ipod ear buds and the phasing seems fixed.  Hopefully this information is helpful to someone else. 
    If anyone knows how to correct this issue please let me know its difficult to know what my final mixes are going to sound like and I have had to keep bouncing everything into i-tunes- sync to ipod and then listen in my car radio. 

  • I'm getting an "unable to play this type of audio file" message.

    I have a ton of music on my Incredible but don't listen too often.  I tried the other day and keep getting the message that it's unable to play or can't find any music.  Music files are MP3 and m4a files but I never had a problem in the past.  Does anyone know if a recent upgrade changed something or if I need an App, etc.?

    Hi Shadow9809!
    I have an article here that addresses this issue, and can help you troubleshoot it further:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1717
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • Powerpoint - audio file not playing

    Hi I created a PP presentation using PP 2010 and I inserted an audio file to play automatically throughout the whole presentation. I email it to a friend and it plays perfectly on her computer at home. However, when she tries to play it on her laptop at
    school (they have Office 2007) the music doesn't play at all.
    I've told her to delete the audio file and insert it again but it still isn't working - any suggestions?
    Viv
    Viv Haig

    What's the format of that audio file? Convert its format to .wmv and re-insert it.
    Please copy the audio file onto desktop and directly play it through Windows Media Player, does it work?
    Tony Chen
    TechNet Community Support

  • Audio file not playing - CS6 After Effects

    I am taking a Motion Design class and the .mov file that has the audio clip I need was provided by the instructor and worked in class using CS5 After Effects. When I try to work on the movie at home, the audio file does not play. Does the audio file have to be a different file format to work with CS6?

    Hi there
    I'd try posting your issue over in the general After Effects forum: http://forums.adobe.com/community/aftereffects_general_discussion
    The folks over there are After Effects gurus and experts who will be able to help you out effeciently and knowledgably.
    Cheers!

  • How to play 5.1 audio files

    I have ripped my The Crystal Method Legion of Boom DVD-A to 5.1 FLAC files then converted to Apple Lossless (ALAC) using either Amadeus Pro or XLD. The resulting m4a files play in quicktime and preview but won't even import in iTunes. The info properties of the file show 6 channels of audio. I have tried other settings when converting, (24bit, 16bit, AAC instead of ALAC) and the results are the same. Here is the funny thing if I change the filetype from m4a to m4v it shows up in itunes and plays and says in the channel info Multichannel. Obviously it shows as a video. Is iTunes yet capable of playing multichannel audio files? If so what is the best converter to show up as proper 5.1 surround?

    I used to play multichannel quicktime .mov audio files with iTunes. AAC and AIF.But not 24 bit AIF.
    You need a multi output audio interface for this.
    iTunes can play AC3 files only on bought movies or with perian installed via optical out. But problems with jumping from one file to the next or changing audio tracks leading to complete hangs of iTunes made me switch to PLEX, which plays everything perfectly even DTS and 5.1 AAC files over spdf optical into 5.1 receiver.(Converting AAC to DD on the fly).
    Back to your question,
    if you have a multi output audio interface and Quicktime Pro, you can generate multi channel .mov files and define what track goes to what output.

Maybe you are looking for

  • Premiere Pro CC 2014 on Mac and AMD Firepro 7000

    Hi, Just got a new Mac Pro... Processor  3.5 GHz 6-Core Intel Xeon E5, Memory  32 GB 1867 MHz DDR3 ECC, Graphics  AMD FirePro D700 6144 MB X 2, OS X 10.9.4. Machine looks like a kettle whiteout a spout, but other than that, fantastic! Set it up via T

  • TS2634 has anyone else had problems displaying playing movies with the Apple Digital AV adapter

    Bought the Apple Digital AV Adapter for my I-pad 3. When I coonect it to the Ipad and my HD TV to play a movie, (even rented movies from Apple), I get an error message that says that the content is protected and cannot be displyed on my device. Has a

  • Business systems  for Soap to file scenario

    Hi Experts,    I am working on a soap to file scenario.Which type of business systems shall i  create i.e Third party,As ABAP,As Java etc.Please suggest. Thanks Veeru

  • MRP Generating Purchase Reqs for Materials Needed in 2013

    Hi, all.  We're running MRP and it's generating a massive amount of purchase requisitions (18,310 to be exact). The following is a typical part setup: Lot size = EX Planned delivery time = 5 days GR processing time = 2 days Individual/collective requ

  • Get the qty from the unrestricted stock

    Hi,    My Requirment is below      Select material (MATNR), plant (WERKS), unrestricted stock (LABST) from table MARD where material (MATNR) IN S_MATNR AND plant (WERKS) IN S_WERKS. Inner join the selection above with table MAKT to retrieve the mater