what is an easy to use to convert very short mp4 videos to gif?
+ Reply to Thread
Results 1 to 15 of 15
-
In Virtualdub2
1 File->Open Video File .. load mp4
2 [Mark In] and [Mark Out] Specify the 'start' and 'end'
3 Video->Filters .. if you want apply crop and resize
4 File->Export->Animated Gif.. (infinity loop)
[Attachment 50665 - Click to enlarge]責任者-MDX -
The quality, unfortunately, is not optimal. It seems to build a common 256 color palette over the whole clip. If you have very varying colors, you will notice the quantization. Other tools do a better job here, using partial palette changes, but are not so easy to use (e.g. JASC Animation Shop 3 supports hardly any common video format, not even all VfW codecs in AVI).
-
users currently on my ignore list: deadrats, Stears555, marcorocchini
-
This batch file was posted here in the past. It builds a global palette then renders using that palette and error diffusion.
Code:@echo off ::** create animated GIF w/ optimized palette :: :: https://ffmpeg.org/ffmpeg-all.html#gif-2 :: http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html :: http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality if not exist "%~dpnx1" goto :EOF cd "%~dp1" ::** generate palette @echo on @echo. "c:\program files\ffmpeg\bin\ffmpeg.exe" ^ -v warning -i "%~nx1" ^ -vf "palettegen" ^ -y tmp-palette.png ::** generate GIF @echo. "c:\program files\ffmpeg\bin\ffmpeg.exe" ^ -v warning -i "%~nx1" ^ -i tmp-palette.png ^ -lavfi "[0][1:v] paletteuse" ^ "%~n1.gif" @echo off del /q tmp-palette.png if errorlevel 1 pause goto :eof
A comparison 0f VirtualDub vs ffmpeg using a source with many colors and smooth gradients:
VirtualDub GIF:
[Attachment 50683 - Click to enlarge]
ffmpeg GIF:
[Attachment 50684 - Click to enlarge] -
Wow, that is a clear and noticeable comparison example!
Scott -
Can I have the original, please? Would like to try the same with Animation Shop 3.
-
This was made with VirtualDub's Tools -> Create Test Video -> RGB Color Cube. Cropped and decimated.
-
Not extremely different to the ffmpeg result. It offers two quantization techniques: Octree and Median cut. But they differ obviously only when there are dominant colors.
VirtualDub seems to omit error diffusion. I know there are a variety of such algorithms, too, with more or less spread. -
Gif to mp4
Here a avisynth script with waifu2X(reduction noise and scale), convert any animated video or gif.
https://youtu.be/kdbhFVZ4vIMLast edited by EsteveJohnson; 2nd Nov 2019 at 13:38.
-
I have a three second mp4 (1.3 mb) I'd like to convert to gif but the free upload converter sites are making the output size huge like 6 and 7 mb?
-
Of course. No surprise. Why do you wonder? GIF is not a suitable format for TrueColor sources. It supports at most 256 single distinct colors. To convert 24 bit RGB to 8 bit palette, a selection of the most prominent colors has to be calculated, but every pixel will have a difference to the original color. This error can either be disguised by dithering, then the result will look not too bad, but the compression is low; or it can be ignored, then the result will look ugly but can be compressed a little better. Still, for natural content, modern real video formats like MPEG4 are superior by magnitudes. Animated GIFs will beat MPEG4 video only in case of technical drawings with a low number of distinct colors and sharp edges.
-
It's what LigH said. Also gifs do not use temporal compression in the way modern video formats do, so it's normal for the filesize to get larger
There are various techniques to optimize gifs in terms of reducing filesize; such as decimating frames (and reducing framerate), variable frame timing, reducing the dimensions, filtering such as denoising, using a farther reduced color pallete, different types of dithering (some make the filesize much larger) . Unlikely that free upload converter sites will do a good job of optimizing it. Some of the decisions require human input on what tradeoffs to be made
Depending on what the situation is, or if the target site supports it, there might be some alternative formats that are better in terms of quality and filesize, such as animated webp -
Yup, difference between <1987-era intra-only codec efficiency and >2003-era inter+intra capable codec efficiency.
Scott
Similar Threads
-
Gif to mp4 conversion
By aastakhov in forum Video ConversionReplies: 4Last Post: 29th Mar 2018, 08:39 -
ffmpeg to convert 4k/hdr10 to (i) h.264/10-bit/.mp4 (ii) h.265/10-bit/.mp4
By hydra3333 in forum Video ConversionReplies: 2Last Post: 10th Feb 2018, 19:49 -
How do I convert .mp4 to .ts
By yeto in forum Newbie / General discussionsReplies: 7Last Post: 15th Jan 2016, 01:24 -
Convert to mp4 help
By SWBisbee in forum Video ConversionReplies: 7Last Post: 13th Oct 2015, 16:32 -
Convert 8 mm. film to MP4: How to do it yourself: How and with what ?
By MacPCConsultants in forum Video ConversionReplies: 10Last Post: 14th Apr 2015, 16:06