I would like to know if there's a way to create an animated GIF from a .mp4 file. I've researched it a bit and it seems like there is just one option:
Creating a GIF manually by getting each frame of an .mp4 video using a MediaPlayer's VideoFrameServer
I'm willing to use any open source projects that could help as well.
Related
so I have a .MOV file that has a transparent background (I think it means it has a alpha channel?). I want to play it back using WPF, but the MediaElement control is not able to play .MOV files natively. I tried using this library to play the file but it didn't work.
Is there any library that is able to play these types of files and also maybe play other files too like a MP4?
Thanks.
I'm developing an app that consumes the 8tracks API. Some of the playlists have gifs as the playlist art and I would like to have those gifs play in the app. UWP does not support native gif playback so i'm trying to figure out a way to make them play. So far I have tried using XamlAnimatedGif but its performance is bad, especially on phones.
Now i'm using Giphy API to upload the gif which also creates an mp4 version of the gif and plays back smoothly in a MediaElement. I can play up to 10 MP4s at a time smoothly(not that ill ever need that many playing at a given time). I'm wondering if i can eliminate Giphy and have the computer/phone just take each frame from the gif and then encode them to an mp4(or other video file). Is this a good option? what would be any cons to doing this vs. what im already doing with Giphy? If i decide to at least try this Is there any where i can read up on decoding the gifs to frames and encoding them to a video?
You could use the GifBitmapDecoder to get the frames
https://msdn.microsoft.com/en-us/library/system.windows.media.imaging.gifbitmapdecoder(v=vs.90).aspx
and there are a number of options here to convert stills to a video:
How can I create a video from a directory of images in C#?
My question is easy: Is it possible to create an animated GIF file from a Windows Phone app (7.8 or 8, or both) using C# ?
I searched on the internet for this and I found these tutorials:
http://bloggingabout.net/blogs/rick/archive/2005/05/10/3830.aspx
http://www.codeproject.com/Articles/11505/NGif-Animated-GIF-Encoder-for-NET
They are really cool and work perfectly for desktop app, but I can't make them work on a Windows Phone app, many classes are unavailable and I can't find a workaround. Is it really impossible to create a GIF file from images on a Windows Phone ? Is it due to the devices limitations ?
Thanks
Ok i don't know how far Ill be able to help. But if you are facing limitations in displaying a gif Image then you can use a nuget package named image tools
Blog for Image tools
And on the other hand if you want to display a number of images then I can suggest a work around. But it will be app specific.
use storyboards or timers to continiously animate an Image object or a Grid back ground.
Creating an image I guess is not possible due to device limitation
still if you have a sprite image
then you can use
<ImageBrush.Transform>
<TranslateTransform X="-380" Y="200" x:Name="tfDieImage"></TranslateTransform>
</ImageBrush.Transform>
Transforms to animate the image at regular intervals by changing the X and Y :)
In fact there is a very interesting way to create animated GIF. It is from VB6 days.
Just create every frame as separate GIF file with same color palette (this is the tricky part). strip GIF header from files except first file and then concatenate them with following magic 0x0021F9.
Animated GIF format is actually an extension to the GIF format so, application does not understand animated GIF can still be able to display first frame. As far as I remember that each frame can have its own color table, but I do not remember how.
The real trick is to create series of images sharing same color palette, which I haven't done it before. I just used this to load animated GIFs.
Why don't you try to do it by yourself? GIF format now is free, so if you need only to create GIF files, you can just implement specification or only part of it.
http://www.w3.org/Graphics/GIF/spec-gif89a.txt
Ok.
I will suggest you one post that shows that how to display a GIF formatted pictures or Animated pictures in windows phone.
Please Refer this link.
Show OR Create the GIF kind Images in windows phone.
This shows that there is like a GIF image but actually there is not a GIF but its a multiple jpeg files Array.
I hope you get the Solution.
Good Luck.
My own tests have shown that GIF images saved to the Windows Phone 8 MediaLibrary always get converted to JPG. Is there any way around that other than managing my own library - which I'm already doing?
As far as i know you can not directly save .gif file into Media Library, you can try to save in Camera Roll using Image Tool Library.
Hope it helps
Just to clear up some misconceptions here, WP8 does in fact save gifs from IE, MMS, emails etc as full gif files, NOT jpgs. It is just that when displayed in the Picture hub, only the first frame is displayed. WP7, however, did convert gif to jpg on save.
You can prove this yourself by downloading the GIF Viewer app which will allow you to browse and play gifs in your media library.
I want to save the video streams that is captured by Kinect's Color camera to .avi format video, I tried many ways of doing this but nothing was succeeded. Has anyone successfully done this? I'm using Kinect for Windows SDK and WFP for application development
I guess the easiest workaround would be to use a screen capture software like http://camstudio.org/.
There is also post with the same question her:
Kinect recording a video in C# WPF
As far as I understand you need to to save the single frames delivered by the kinect by into a video file. This post should explain how to do it How to render video from raw frames in WPF?.
You can use the AVIFile Windows API using interop:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd756808(v=vs.85).aspx
or you can use a wrapper like this one, done by Corina John
http://www.codeproject.com/Articles/7388/A-Simple-C-Wrapper-for-the-AviFile-Library