Can I use this code to save a recorded video in the Camera Roll?
Medialibrary.SavePictureToCameraRoll(fileName, Stream);
where Stream is photo stream or video stream.
You can't save videos in the camera roll from a third party application at the moment. That API can be used just to save pictures.
Apparently it is. Have you tried it yet?
A quick google's come up with this:
http://wp.qmatteoq.com/how-to-save-a-picture-captured-with-the-new-cameras-api-in-the-camera-roll-in-windows-phone-8/
Related
How can I overlay an image onto a video without changing the video file?
I have many videos and I want to be able to open them and overlay a ruler onto them and then measure the distance an individual moved visually. All I want is to play a video and then to open up an image with some transparency and position the image over the video. This way i would be able to look at the video and see how far the individual moved.
I would like to do this without having to embed the image like a watermark, because that is computationally expensive. I would need to copy the video, embed it with the ruler and then watch the video, then delete that video file. This seems unnecessary. I would like to just watch the video and have a transparent image over it while I a watching.
Is there a program that does this all together?
Alternatively, is there a program which I can use to open an image and make it transparent and then move it over the video that is playing?
Note: I am using Windows.
It sounds form your requirements that simply overlaying a separate image layer over the video will meet your needs.
Implementing this approach will depend on the video player client you are using, but you could implement an HTML5 based solution and play the videos locally with this (or even from a URL on the web if you have them there).
There is a nice answer with a working fiddle which shows how to do this with HTML5 here: https://stackoverflow.com/a/31175193/334402
One thing to note - you have not mentioned scale in your question. If you need to measure how far the person has moved in real distance, rather than in just cm's across the video screen, then you will need to somehow work out the scale of the video. This makes things considerably harder as the video may zoom in and out during the sequence you want to measure, so you would need some reference to calculate the scale for each frame. One approach would be to use the individual as a reference, assuming they are in all the frames you are interested in.
What about using good old VLC for that?
Open VLC go to Tools→Effects and Filters→Video Effects→Overlay and select Add logo checkbox:
Then, add your transparent overlay image and play any video with VLC. The output looks like this:
I have a Xamarin.ios app that needs to play a video from the camera roll. The app records a video from the camera and then saves it to the camera roll. I then need to play this recording in the app. I have the OutputFileUrl from the e.g.
file:///private/var/mobile/Containers/Data/Application/872214F0-8C50-46ED-854C-D0C51AF11508/tmp/64E56883-701E-451D-8964-D974C17CAE7E-294-0000001438002E09.mov
However, if I pass this to the constructor of the MPMoviePlayerController it does not play e.g.
moviePlayer = new MPMoviePlayerController(new NSUrl("file:///private/var/mobile/Containers/Data/Application/872214F0-8C50-46ED-854C-D0C51AF11508/tmp/64E56883-701E-451D-8964-D974C17CAE7E-294-0000001438002E09.mov"));
What am I doing wrong here?
Not sure, but it looks like that might be a temp directory rather than the url of the video in the Camera Roll. I am not very familiar with this, but it might be that once you save it to the camera roll that the temp file is deleted. But the only way I can see to get the URL for the video in the camera roll is to use the UIImagePickerController which allows the user to select a video to play from their photos library. If you don't want to use a UIImagePickerController, then perhaps you should save the video to the App's documents folder as well as saving it to the camera roll?
I'd like to add a poster to my audio player previews just like with the video mode of the mediaelement.js player.
I've checked all the shortcodes and there doesn't seem to be anything for this. Basically all I want is a static image immediately above the audio player that is visible before and during playing.
The reason I want this to be an 'all-in-one' player is because my WP theme allows me to create posts in the 'audio' format so that the audio player appears at the top of my category view of recent posts. It'd be awesome to add that image for each post and have it part of the audio player. Kind of like video but with less overhead.
Thanks in advance.
I want to play video in WP7.
This is my code:
MediaPlayerLauncher player = new MediaPlayerLauncher();
player.Media = new Uri("video link", UriKind.RelativeOrAbsolute);
player.Location = MediaLocationType.Data;
player.Controls = MediaPlaybackControls.All;
player.Show();
This is working fine.
After finishing this video I want to continue playing another video. I want to play two videos one after another.
Is this possible in WP7? How can I accomplish this?
The title asks how to play videos in general. Are you aware of the MediaElement? It can be used to play back video as well and it has an event telling you when video playback ends. And it can also give you the video length.
This blog post has an example of both MediaElement and MediaPlayerLauncher.
The MediaPlayerLauncher does not expose an event or callback for you to find out if and/or when the video has ended. I am afraid it is not possible to hook into these events.
I have an NC541 IP camera, which supposedly does have an MJPEG stream, as in the manual it says "The video is compressed by MJPEG", but I can not find a way of how to get that stream from the camera. Seems that it wants to work only with the build-in program, while I need the way mjpeg stream instead.
Any ideas? Thanks!
I don't have this camera, but on many you can simply right click on the video window in your browser, select properties, and it will tell you the URL of the raw stream. If this is a multi codec camera you may or may not get the mjpeg stream depending on which one is chosen for the camera's home page. This often works for me.