How can I select the video from photo folder or video folder and its file name which must be in iphone locally through programming?
Is there any way to check the video is already in iPhone locally, when i get file name of that
video from the internet?
I'm not 100% sure, but I think you might be looking for the UIImagePickerController.
If you want to pick a video from the library, or let the user record a video, use UIImagePickerController with the appropriate media types.
I don't think you'll be able to get its file name, though.
Related
I want to access songs from media library and then want to cut a part of that song.
I have written function to cut a song from bundle and it is working fine.
Now I want to allow user to select song from library, how can I do that?
Just like how you access all other media in ios- using AssetsLibrary, more about this here:
http://developer.apple.com/library/ios/#documentation/Miscellaneous/Conceptual/iPhoneOSTechOverview/MediaLayer/MediaLayer.html
Be aware that all the media is read only and you can manipulate only a copy of the songs and not the original.
I want to create physical .mov or .wmv file from sequence of images for an iphone app, means user will provide me with some images and i will create a video for the user, and if user wants .mov or may be .wmv file, then in that case i will create a video file for the user, and i also want to add sound in that file, now i have searched a lot for this but didn't find anything very use full, can any one tell me is there any tutorial or help full material to do this, or provide me some guidance for how to go about this, thanx and regards Saad
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.
Why is it that if I pick a video from the library in my application I'm given this horribly pixelated/compressed video but if I take the video with the camera in my application I'm given a nice video file, this is on the iphone 4.
Sample of video taken w/in the app:
http://photos.smugmug.com/photos/912709066_Kcc8p-1280.mp4
Sample of video picked from the library:
http://photos.smugmug.com/photos/912709325_hw7Bv-1280.mp4
Both are 720p. Setting videoQuality to 'UIImagePickerControllerQualityTypeHigh' doesn't help, which makes sense really since that appears to be just for setting the recording resolution when using the camera.
Sam
i had the same assumption as Shizam till i saw an FTP app upload a video just fine on an iPhone 4. its not the quality of the imported video thats the problem. if you download the app's sandbox and look at the imported video you will see its fine.
go to Window/Organizer and select your device. there will be a list of Applications in the bottom right. select the app in question and click the expansion triangle. you will see "Application Data" click on the little black downward arrow and tell it when to save the data. then go look at the video in the tmp folder. you will see its fine.
the problem comes when you try to send it out via HTTP. for what ever reason Apple decided to add an extra crappy video compression to videos sent over HTTP. if you FTP the file to the server the video quality is actually very good similar to what you get when you email the video to yourself. Apple gives you a working example of how to FTP to and from a server.
See my post here. You can improve the quality by changing some settings.
Avoid Video Compression when Selecting Movie with UIImagePickerController?
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