Is it possible to upload mp3 audio file from ipod library to remote server?
I want to upload a song directly from ipod to reomote server using PHP script, I can access songs library using MPMediaPicket but unable to form a NSData request through it?
No you can't.
audios from iPod Library are protected and you can only access through limit apis that provided by apple.
Only AV Foundation Can access ipod library,So,You can use AVAssetReader + AVAssetWriter to export the music from ipod library to Your document ,then u can r/w it and do anything.
U can reference this QAs:
1.
Extract iPod Library raw PCM samples and play with sound effects.
2.
http://www.subfurther.com/blog/2010/07/19/from-iphone-media-library-to-pcm-samples-in-dozens-of-confounding-potentially-lossy-steps/
3.
http://www.subfurther.com/blog/2010/12/13/from-ipod-library-to-pcm-samples-in-far-fewer-steps-than-were-previously-necessary/
Related
I want to copy the music files of iphone ipod library using MPMediaPicker. Actually using MPMediaPicker I am able to get the path of ipod music library but when I convert music file at url in NSData, the result is null. I doubt that is it possible to get the music file from ipod library. I am not sure as there is no exception or warning while I am trying to convert url item in NSData using [NSData datawithContentOfUrl:ipod-library-path].
If someone has any idea about this or any alternative to copy music files.
Your are getting Asset URLof music files.So it need to be converted into NSData to write into iphone library.
Refer Get video NSData from ALAsset url iOS link.
Now write data into iphone library.
Is it possible access raw PCM data from the iphone audio output?
I know I can embed an MP3 and use AudioUnit. But if the user is playing music in the background from their itunes library, is it possible to access that audio data?
This is for an app that shows visual effects, which react to the music.
From what I can tell, it isn't possible, but that's just from lack of finding any information at all, rather than actual confirmation that it can't be done.
If it isn't possible to access the audio stream from the ipod, is it possible to access raw audio output from the Media Player inside an app, or is pretty much not permitted to access raw audio data from the itunes library at all?
EDIT: I found this question: iOS - Access output audio from background program, which say I can't access the audio from a background app. But is it possible to get the audio data from the itunes library if I play it inside the app?
I am busy coding something similar and as far as I know an AUGraph is needed, the hardware pulling from the recorder. You will have to get the URL of the MPMediaItem from the track the user selected with Apple's MPMediaPickerViewController. Then use the URL with Core-Audio. Core-Audio is a beast.
If your app is playing raw audio PCM samples, then your app has access to those samples. An app does not have access to the audio samples that another app (including the Music player) is playing via any public API.
An app can use AVAssetReader and Writer to convert mp3 files from the iTunes Library into raw audio (WAV) files.
I was looking to code an iPhone application however, i was not sure if the following is possible :
Download an mp3 from an external site (through the application)
Once the mp3 has been downloaded, automatically add it to the usual iPod application, so it is visible in the user ipod songs list.
Same for videos too (download video[mp4] and directly transfer it to the usual videos app)
If the above is not possible, can i directly play the downloaded mp3 in my application ? What would i require to play an mp3 in my application ? Are there open source mp3 players available that i can integrate with my application ?
Thanks for any help, i really appreciate it.
Once the mp3 has been downloaded, automatically add it to the usual iPod application, so it is visible in the user ipod songs list.
No, that's not possible. The iPod library is not writable by third-party apps.
Same for videos too (download video[mp4] and directly transfer it to the usual videos app)
Not possible, either.
If our iphone application uses the inbuilt camera to click any picture, for saving the image into iPhone's photo library, we use UIImageWriteToSavedPhotosAlbum method. Likewise, to store any video recording into the iPhone, we use UISaveVideoAtPathToSavedPhotosAlbum
Is there any method to save any audio file into iPhone's Sounds library akin to both the methods mentioned above?
There is no way to import audio into the iPod application from the phone. iTunes (on the computer) is currently the only way. You do have a few options to save the file though
1) Create a movie on your own with just the audio
2) save it to disk locally (in the documents directory) and provide a way to get it off the phone (such as CocoaHTTPServer)
3) Email it.
4) Upload to a server
How can I stream video data from the network and play it on an iPhone?
First, are you developing a Web app optimized for iPhone or a native application ?
In the first case, your only option is to transcode your video files to Quicktime H.264 (m4v or mp4 extension). You can use Quicktime Pro (use the export menu) or VLC (as a free alternative). Then simply add a hyperlink to the video file on your HTTP server. Make sure it presents the right content-type and stuff (read Safari Web Content Guide for iPhone OS: Configuring Your Server). That'll work for web and native apps (in a native app you would use the MPMoviePlayerController view). So can "stream" (technically called progressive download of a Quicktime movie file).
If you're talking about streaming live content (i.e. content that you produce live or transcode a live feed) there is currently no official way of doing it (as of iPhone OS 2.2). iPhone OS does not support RTSP/RTP streaming. A number of native iPhone applications (such as UStream.tv and Orb Live) have created their custom live streaming solution (most of them transfer a delayed streams with many seconds of latency over HTTP then somehow decode it on the phone using FFmpeg or other libraries).
Are you trying to stream video in your app or just streaming on your iPhone? For streaming video through an app, use the MPMoviePlayerController and pass the URL of your video to it. The MPMoviePlayerController will itself stream the video and play it for you.
If you're looking for a server based solution (with a very affordable Amazon EC2 option), be sure to check out Wowza at http://www.wowzamedia.com/advanced.php
It streams directly to iPhone/iPod Touch without a custom app.
note: I'm not affiliated with them at all... just a fan/customer.
edit: Just noticed how old this question was. :)