How to download and save audio and video in wp7 mediaLiabrary? - windows-phone-7

Can you please tell me how to save or store sample audio and vidio into mediaLibrary.From my application if i long press on a picture i get a save picture option that saves the picture under saved pictures category in MediaLibrary. Similarly how do i save a mp3 and mp4 file.
I am able to downloadcontent and play the audio on emulator directly but not able to save any mp3 file from the web onto the MediaLibrary. Is there any other way to add songs to MediaLibrary?
Please Help me.
Thanks

The Windows Phone 7 API does not allow saving audio and video to the Media library, only on the isolated storage of the application itself.
This is in contrast to Pictures, which like you said you can save to the Media library.

Related

how can I play a video by file path (saved in photo gallery) using AVPlayer or MPMoviePlayer? - xamarin.ios

Actually, I am capturing video using AVCaptureSession+AVCaptureMovieFileOutput and then storing file path in SQLite. Now I want to play recorded video using that file path.
so, my question is how can I play a video by file path (saved in photo gallery) using AVPlayer or MPMoviePlayer?
I am working in xamarin.ios
You will need to use PhotoKit to first request access to the photo gallery, then you can query and get a PHAssetCollection with the images/live images/videos you are interested in.
With a PHAsset in your hand you can use PHImageManager to request a AVAsset to display in your video player.

How add video from app to collection?

My app downloads video from server and saves it in IsolatedStorage.
Can i add this video to phone collection?
No, it's not possible in Windows Phone 7. You can use MediaLibrary that will give you access to metadata related to existing songs and pictures, but that's about it. You cannot currently read or write videos stored on the phone.

Store and Retrieve mp3 files in windows phone?

I'm new to windows phone development. I need to save and play audio files in my project. for that i need to store mp3 files into the database. I got idea from net, either we can store mp3 files directly to DB or store mp3 files to Isolatedstorage and store only URL in the database.
Now i was confused, we could be an easy way to achieve me expectation ? Suggest me which is one best? Also pls share some sample code....
Thanks
SheikAbdullah
Store the mp3's in Isolated Storage in the App/Shared/Media folder, then tell the Zune player to play them.
How to: Play Background Audio for Windows Phone

Is it possible to grab a snapshot from a previously recorded video on Windows Phone 7?

I'd like to know if it's possible to grab snapshots from previously recorded videos. Those videos are recorded in the app itself.
By the way, I'd like to grab the snapshot from a video file saved in IsolatedStorage without having to play the video.
Is it possible? If so, how can I do it?
Cheers,
Rafael
I am not aware of an official platform feature to do this. However, if the video file is within your app's isolated storage, you might be able to:
Send the video to a server to do the processing
Add codecs/C# code to your app to process the raw MPEG4 frames.
Try using WriteableBitmap to capture a specific frame when using the media element. Since most media is handled in hardware, however, it is possible that the frame will be blank.
I solved the problem by creating the thumbnail while recording the video (captureSource.CaptureImageAsync()). To do that, I used the same instance of the CaptureSource I'm using to record the video.

How to show audio details when played using MediaPlayerLauncher?

In my application i am playing an audio file (let it be .mp3) using MediaPlayerLauncher. File is downloaded from network and stored in IsolatedStorage.
I managed to play the audio but it was a bit disapointing to see that there is absolutly no details about the played track.
Is there a way to show picture and/or track name when launched with MediaPlayerLauncher? Or am i forced to use MediaElement?
Unfortunately, if you're just playing an audio stream using the MediaPlayerLauncher there si no way to specifyu additional (meta) data for the launcher to also display.
If you want additional information displayed then you'll need to create the UI yourself and play the track via a MediaElement (or background audio).

Resources