VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 50
Thread
  1. Member themaster1's Avatar
    Join Date: Nov 2006
    Location: France
    Search Comp PM
    Is there a good avi to gif software out there ? Or maybe there is a another animated images format other than gif that i'm not aware of ?? (gif is so 90's...)
    Let me know please ! (virtualdub is not good for this)
    Quote Quote  
  2. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by themaster1 View Post
    Is there a good avi to gif software out there ? Or maybe there is a another animated images format other than gif that i'm not aware of ?? (gif is so 90's...)
    Let me know please ! (virtualdub is not good for this)

    apng (animated png) is lossless, full 8bit / channel color palette (not crappy 256 colors), but only supported by a few browsers like firefox , opera (IE doesn't) . Obviously large filesizes compared to gif
    http://en.wikipedia.org/wiki/APNG



    For gif, photoshop is probably the one of the better ones . You have many options to adjust filesize vs. quality, dithering algorithms, compression . Unfortunately not free

    Gimp can do it, with floyd steinberg dithering, but filesize is larger than photoshop produced gifs at similar quality
    Quote Quote  
  3. VirtualDub's GIF export uses a fixed color palette without dithering. That results in severe banding of smooth gradients. There's a trick you can use that will help though. First save the sequence you want as an uncompressed video file. Then use VirtualDub's Tools -> Create Palettized AVI to make another AVI of that sequence. That AVI will have an optimized palette and dithering. Then open that palettized AVI and export as GIF from VirtualDub. The dithering will be preserved.

    Direct export as GIF:
    Name:  direct.gif
Views: 1066
Size:  162.1 KB

    Palettized intermediate:
    Name:  palettized.gif
Views: 1069
Size:  322.7 KB
    Last edited by jagabo; 7th Jul 2014 at 17:23.
    Quote Quote  
  4. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    But vdub "create palletized AVI" creates a non selective, noisy dither . But at least it's not as bad as some, where the static backgroud has a alternating/flickering pattern as well,.

    A single shade of "grey" - like the "grey" RGB 64,64,64 background shouldn't require dithering. Only when there are transitions or "shades" of grey or colors should be dithered. That non selectivity means excessively large filesizes

    162KB vdub gif
    322KB vdub palettized gif
    259KB ps seletive pattern dither gif

    Name:  ps_selective_patterndither_2.gif
Views: 1113
Size:  259.8 KB
    Last edited by poisondeathray; 7th Jul 2014 at 19:59.
    Quote Quote  
  5. How much does Photoshop cost? Yes, the VirtualDub method was a cheap trick.
    Quote Quote  
  6. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    PS CS2 was actually free a while back, legit from Adobe server. You just needed to register an account

    Here is APNG . But you can't see it animate in some browsers

    (220KB only - usually filesize is larger compared to gif, but it depends on type of content)
    Name:  apng.png
Views: 1037
Size:  220.1 KB
    Quote Quote  
  7. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search PM
    I was always partial to MS Gif Animator. It's free, can work with transparency and has custom palette support.

    Scott
    Quote Quote  
  8. Member
    Join Date: Nov 2002
    Location: United States
    Search Comp PM
    Originally Posted by Cornucopia View Post
    I was always partial to MS Gif Animator. It's free, can work with transparency and has custom palette support.

    Scott
    I used to be until I tried Gif Movie Gear. I paid $12 for it back in the day. I think it's $40 now (version 1 and 2 were free I think if you can still find them). It accepts Adobe PSD files and some AVI files. Setting to preserve 24 bit color. Live Edit allows you to edit frame with Photoshop. Outputs compressed and non-compressed AVI, layered Photoshop PSD, GIF, BMP, PNG (image, filmstrip or animated), JPEG, ICO (Windows icon files), ANI (Windows animated icons), and CUR (Windows cursor files).
    Quote Quote  
  9. Member racer-x's Avatar
    Join Date: Mar 2003
    Location: 3rd Rock from the Sun
    Search Comp PM
    Speaking of animated gifs, here's a little something I made in gimp using IWarp. Yes I know I'm a sick pup.....
    Attached Images  
    Last edited by racer-x; 11th Jul 2014 at 13:10. Reason: Smoother version
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  10. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    haha racer-x GIF boob animations used to be so popular! But now with youtube, video embedding, broadband. GIF's are like the dodo bird ... The art of GIF making is lost

    What makes or breaks a gif in terms of quality/filesize ratio is the processing options, pallete, dithering algorithms, optimizations used. What works well for some types of content might not be appropriate for others - so it's important to have options.

    A free gif optimization program is gifsicle (commandline only). It can reduce the filesize of most gifs, but for already optimized ones like those produced in photoshop, the filesize actually gets larger



    Here are some tests with an animation I did a few years ago (don't take the content too seriously, it was just for fun ) . It's primarily greyscale on a static gradient background, so predisposed to banding as you can see with vdub's default export. But because of those same factors it will also benefit from using a limited palette, adaptive dithering . Some programs like ffmpeg barely have any options , so they suffer immensely. Terrible GIF quality

    gimp 128color, floyd-steinberg 990KB, gifsicle optimized =>961KB
    Name:  gimp_128color_floydsteinberg_gifsicle_optimized.gif
Views: 970
Size:  961.9 KB


    ffmpeg 978KB
    Name:  ffmpeg.gif
Views: 976
Size:  978.9 KB


    photoshop 128color, adaptive 50% diffusion, lossy5 214KB
    Name:  ps_50%diffusion_128color_lossy5.gif
Views: 961
Size:  214.2 KB


    vdub default 241KB
    Name:  vdub.gif
Views: 947
Size:  241.6 KB
    Quote Quote  
  11. Member racer-x's Avatar
    Join Date: Mar 2003
    Location: 3rd Rock from the Sun
    Search Comp PM
    Thanks for that. I tried it out and it produced better quality and smaller file size I think:
    Attached Images    
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  12. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    ahhhh so ffmpeg does have control over dither according to that 1st link by pandy with sws_dither

    Code:
    ‘sws_dither’
    
        Set the dithering algorithm. Accepts one of the following values. Default value is ‘auto’.
    
        ‘auto’
    
            automatic choice
        ‘none’
    
            no dithering
        ‘bayer’
    
            bayer dither
        ‘ed’
    
            error diffusion dither
        ‘a_dither’
    
            arithmetic dither, based using addition
        ‘x_dither’
    
            arithmetic dither, based using xor (more random/less apparent patterning that a_dither).



    For reference, the other free gif utility , gifsicle link
    http://www.lcdf.org/gifsicle/
    http://www.lcdf.org/gifsicle/man.html
    Quote Quote  
  13. Member racer-x's Avatar
    Join Date: Mar 2003
    Location: 3rd Rock from the Sun
    Search Comp PM
    This is the string I used in Aviutl ffmpeg export plugin:

    Code:
    -vf scale=640:-1:sws_dither=a_dither -r 10 -pix_fmt rgb8 -loop 0
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  14. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Same animation with ffmpeg sws_dither options


    Looks like "auto" used error diffusion , the default one posted above (the seizure inducing flickering POS )

    ffmpeg_a_dither 77.3KB
    Name:  ffmpeg_a_dither.gif
Views: 909
Size:  77.3 KB


    ffmpeg_bayer.gif 66.4KB
    Name:  ffmpeg_bayer.gif
Views: 888
Size:  66.4 KB


    ffmpeg_x_dither.gif 88.7KB
    Name:  ffmpeg_x_dither.gif
Views: 874
Size:  88.8 KB



    These are still terrible for this type of animation IMO. At least the filesize is reduced substantially. But I'll check again if I did something wrong
    Quote Quote  
  15. Code:
    @ffmpeg -i %1 -vf "pp=hb/vb/dr/al|f/tmpnoise|4|4|4,decimate=cycle=2,decimate=cycle=2,scale=w=640:h=-1:sws_dither=a_dither:sws_flags=bicubic+accurate_rnd+full_chroma_inp+full_chroma_int,format=pix_fmts=rgb8,setsar=sar=1/1" -y %1_a_dither.gif
    Decimate usually works better than simple framerate conversion (in gif case)
    Quote Quote  
  16. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by pandy View Post
    Code:
    @ffmpeg -i %1 -vf "pp=hb/vb/dr/al|f/tmpnoise|4|4|4,decimate=cycle=2,decimate=cycle=2,scale=w=640:h=-1:sws_dither=a_dither:sws_flags=bicubic+accurate_rnd+full_chroma_inp+full_chroma_int,format=pix_fmts=rgb8,setsar=sar=1/1" -y %1_a_dither.gif
    Decimate usually works better than simple framerate conversion (in gif case)


    Or you can use avs scripts for decimation, resizing operations, if ffmpeg is compiled with avisynth support

    I don't see a way to adjust per frame delays in ffmpeg, but you can with gifsicle
    Quote Quote  
  17. Member racer-x's Avatar
    Join Date: Mar 2003
    Location: 3rd Rock from the Sun
    Search Comp PM
    Another great use for ffmpeg
    Code:
    -vf scale=1920:-1:sws_dither=a_dither
    is for 3-D animations. I applied it on some 3-D animations I made with blender and it really helped eliminate banding, especially with jpeg sequences. I applied the filter and rendered them out to ProRes 4:2:2 and the results were great with little to no increase in file size.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  18. Originally Posted by poisondeathray View Post
    Or you can use avs scripts for decimation, resizing operations, if ffmpeg is compiled with avisynth support

    I don't see a way to adjust per frame delays in ffmpeg, but you can with gifsicle
    Yes but AVS can be slow, usually gif doesn't require such HQ, there is few option for gif in ffmpeg, delays perhaps are controlled indirectly by framerate - not sure - usually for something fancy i prefer to use imagemagick, for quick ffmpeg.
    Quote Quote  
  19. With a very recent update of FFmpeg (15 Feb 2015: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=9b964690e39928af616d88b3e8ab47a7d...f381231db5b7cd )

    The above methods, and probably even my DGE2 plugin for AviUtl, and pngquant, may becomes obsolete.
    The new options are:
    palettegen
    and
    paletteuse
    as documented here: http://ffmpeg.org/ffmpeg-filters.html#palettegen-1

    I don't know how the author did that, but the speed for color reduction and error dither are amazing...
    Dither quality is much better than the old FFmpeg dither and doesn't look like using Median Cut for color quantization despite the source code comment said it is using the Median Cut method dated back to 1982.

    The only deficiency is that not much optimization is done so the output file is still quite large. Nevertheless, the GIF can be further optimized by using gifsicle.
    AviUtl i18n, plugin developer.
    Member of ふえるわかめ
    Quote Quote  
  20. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Nice find Mav

    The quality is indeed very high, but the filesize also. You can reduce it somewhat by limiting max_colors in the palettegen, and a bit more with gifsicle like you said - but they are still rather larger. It would be awesome if ffmpeg could introduce a lossy scale in their GIF encoder, like -q 1-31 . -q:v or -q doesn't seem to affect it currently

    (and Happy Lunar New Year to you )
    Quote Quote  
  21. Out of a deep reflection on my incapability on this Luna New Year...
    I made these little batch files to help layman to quickly transcode any video supported by FFmpeg to GIF:
    http://mavericktse.mooo.com/wordpress/archives/2084

    Basically, grab the essential binaries, drop them into the same folder as the scripts, then D&D your video(s) on to one of the VBS/batch files' icon.
    There will be two output GIF in the source directory, one as raw output from FFmpeg, one is optimized by Gifsicle.

    Further tests suggest the file size is not particularly large and optimization with gifsicle (with -U -O3) does not make a big difference.
    The impression that the file being large is probably due to better quality, i.e. less clipping and more details being recorded.

    The GIF demo in this post is 14MB, 128 colors bayer-dithered, 24fps @640x360
    Attached Images  
    Last edited by MaverickTse; 20th Feb 2015 at 22:50.
    AviUtl i18n, plugin developer.
    Member of ふえるわかめ
    Quote Quote  
  22. Member racer-x's Avatar
    Join Date: Mar 2003
    Location: 3rd Rock from the Sun
    Search Comp PM
    Thanks Maverick. I downloaded your script v2 and it works fine. I don't really see the need for Gifsicle however. I tried with and without and didn't notice much difference. So I deleted Gifsicle.exe and edited the script to run without it. It works just fine for me.

    In this example, the bubbles were animated in Aviutl using Particle Effect.
    Attached Images  
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  23. Originally Posted by racer-x View Post
    Thanks Maverick. I downloaded your script v2 and it works fine. I don't really see the need for Gifsicle however. I tried with and without and didn't notice much difference. So I deleted Gifsicle.exe and edited the script to run without it. It works just fine for me.
    Gifsicle may be required for transparent background support, since I cannot find the appropriate command in FFmpeg.

    The size reduction by gifsicle, as percentage, is higher for smaller gif (those less than 1MB), but insignificant for large gif

    Nice aquarium!
    AviUtl i18n, plugin developer.
    Member of ふえるわかめ
    Quote Quote  
  24. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    yes nice aquarium. It just needs some fishies

    and yes, ffmpeg (still) can't do transparent gifs
    Quote Quote  
  25. Member newpball's Avatar
    Join Date: Oct 2014
    Location: Northern California
    Search PM
    I like Photoshop to do gifs, great options.







    Ignore curmudgeons!
    Quote Quote  
  26. No money for Adobe stuff
    AviUtl i18n, plugin developer.
    Member of ふえるわかめ
    Quote Quote  
  27. Member
    Join Date: Nov 2002
    Location: United States
    Search Comp PM
    I've played with this for days and the best I can do is with MaverickTse's FFgif program. The second one (the first one did not work).

    I've tried using just ffmpeg with different dithering methods and I tried using just gifsicle. I've tried ffmpeg as the encoder and gifsicle as the muxer but everything that I've tried has left me with a file that is the same size (9,747KB) and looks the same as the others. Well, ed_dither was a little bigger in file size (12,422KB). All of these encodes were using the external encoder in Virtualdub, using every single dithering method except for the error_dither.bat drag and drop encode which looks great. All of the other encodes show some king of artifacts.

    The only way that I could get anything almost as good as (nothing was as good as) the drag and drop, optimized encode which was 22.6MB was by using Photoshop which produced a 17.1MB file. Virtualdub's built-in gif encoder was un-watchable.

    01 error_dither.bat - Gunner Girls 002_optimized.gif
    02 001-ed-dither.gif
    03 Photoshop - 0005.gif
    Attached Thumbnails Click image for larger version

Name:	Gunner Girls 002_optimized.gif
Views:	33
Size:	22.62 MB
ID:	30422  

    Click image for larger version

Name:	001-ed-dither.gif
Views:	28
Size:	12.13 MB
ID:	30423  

    Click image for larger version

Name:	Untitled-0005.gif
Views:	25
Size:	17.07 MB
ID:	30424  

    Quote Quote  
  28. @DarrellS
    What error did you get when using the VBScript version?
    (P.S. On the first day I published FFgif, both archives are Batch file. I replaced the first one with VBScript on the next day)
    or
    No error but the GIF seems corrupted (the *_optimized.gif version)?
    Last edited by MaverickTse; 24th Feb 2015 at 03:32.
    AviUtl i18n, plugin developer.
    Member of ふえるわかめ
    Quote Quote  
  29. From my perspective new functions are definitely progress but still far from this what can be squeezed from gif - Bayer dither is somehow incorrect with low CLUT (even with maximum strength), usually i always have better result with some default color palette than calculated one.
    Sometimes 8 bit RGB (3:3:2) can give better results especially with a_dither.

    big thanks to MaverickTse for hard work and pointing to new features in ffmpeg (btw very important from my perspective is tblend, finally frames can be blended together and later decimated to reduce fps - approach to introduce crude/naive motion blur : tblend=all_mode=average,decimate=cycle=2 ) .
    Quote Quote