Saving location information of a video using UISaveVideoAtPathToSavedPhotosAlbum - iphone

I have a video recording app. I sync the recorded videos to the iPhone Camera Roll using UISaveVideoAtPathToSavedPhotosAlbum. However when I read the synched videos from the Camera Roll using AssetsLibrary framework and access the location information using valueForProperty: ALAssetPropertyLocation API, I do not get valid location. How do I save the location when I sync the video?
Thanks,
Sahana

Hi there is no officially supported way to do this. What you may do: Store the info you want to save in a seperate database. The downside however is that such information is then only available in your app.
What exactly are you trying to accomplish?
Cheers,
Hendrik

Related

How can you access audio files saved on an iPhone using PhoneGap?

I'm trying to make an application on the iPhone using PhoneGap. I know that you can access photos stored in the phone's photo library using navigator.camera.PictureSourceType.PHOTOLIBRARY. Is there an equivalent of this for accessing audio files on the phone? I've looked through the documentation for PhoneGap, but haven't been able to find anything.
Thanks in advance!
Firstly iOS give us the limited access to the media files . By navigator.camera.PictureSourceType.PHOTOLIBRARY you can only access the camera roll. you cant access the pre stored video also using this code . SO i don't think you can access the audio files stored in the iPhone by using any way .

Is it possible to access raw iphone audio output?

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.

Play specific local IPhone Video

I am in need for some help as I am stuck with a problem with my current IPhone application. I won't go into every details but the mainline is as follow:
I am currently playing videos from a remote URL. Everthing up to this point is working. But we need to add a certain validation as if the video exists on the local IPhone, play this version and otherwise, get the remote version. I get these informations from an XML feed and have the name of the video and it's remote URL.
I've implemented the ALAssetLibrary as a way to retrieve the locals video and transfered 3-4 videos with custom names. After some struggling, I could play these local video. But while I loop through them, all I get is names like 00001.jpg, etc.
Is there any way to get a local video name ? I don't mind if this needs another library but I would appreciate if someone could point me a way of doing it.
Thanks for your time,
AP
You don't have access to the local filenames, and even if you did those filenames would probably not be what you are expecting (i.e. Apple can and probably does rename them while saving them to the Camera Roll).
You can check the metadata on the ALAssetRepresentation for the video to see if a suitable name or other identifier can be found in there. You might also be able to retrieve the raw data and hash it, but that would fail if Apple does any recoding or metadata alteration when saving the video. If your program itself downloads and saves the videos to the Camera Roll using writeVideoAtPathToSavedPhotosAlbum:completionBlock:, you could store the returned assetURL to remember the correspondence. Or you could save the videos to your app's local storage instead of to the Camera Roll, but that would prevent the user from managing the videos with Apple's photo application and such.

Save audio file from app to iPad/iPhone library

I have been trying to figure out how to do this for most of the day, but I haven't been able to find much help. We have this multimedia app that allows users to view pictures, videos, and music/ringtones about the particular subject. I know you can save images using UIImageWriteToSavedPhotosAlbum and you can save a video file using UISaveVideoAtPathToSavedPhotosAlbum. But I can't figure out how to allow the user to save an audio file. All the files are stored within the app, so its not like I'm trying to stream or download them from the internet. Does anyone have any pointers on how to do this?
The official SDK only allows you to retrieve information with MPMediaLibrary, no write access.

Accessing the music files in iPhone

I need to build a system which backup and restore system in which all the phone datas
including audio, video, pictures. From iPhone 4.0 , there is support for accessing the videos
and photos from the library . Is there any way to access the music files. I need to convert those music files into binary format . Is there any way to accomplish this...
awaiting for the response
Best Regards,
Mohammed Sadiq.
Mohammed,
Please see the Add Music example on Apple's website:
http://developer.apple.com/iphone/library/samplecode/AddMusic/Introduction/Intro.html
-Rob