Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Export - Animated Gif..., the code need seriously some rework :)
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
trodas
  Posted: Oct 26 2012, 12:41 PM


Advanced Member


Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07



Some people made a fantastic previews of videos by animated gifs. Usually it is like 30 to 40 frames from all the video. Or from the best and most interesting places only anyway. I wonder, if VirtualDub can be used for this and sadly - it can't. Even there is the option to Export - Animated GIF... then the result is somewhat useless. This is a start from some randomly choosen video to best show the result:

Original screenshot looks like this:
user posted image

However the start from the vide looks exported using VirtualDub 1.9.11 this way:
user posted image

I could easily upload the video (rapidshare.com, depositfiles.org or sendspace.com), but it does not make sense... VirtualDub does this with all the videos - just this black sky show the problem very very prominently smile.gif

Aside from the bugreport, I would also like to suggest something to add and that is the possibility to choose, for the gif export, processing only each X frame. Default at 1 (process each frame), but can be set to 2 (every second), 3 (every third) and etc. That way will be possible to open video, scale it down to the wanted gif size and then easily export it, taking from like 10 242 frames only every 341 frame, thus ending with 30 frames GIF from the whole vid smile.gif

That would be IMHO easy to implement and that (when the GIF export produce functional result, of course) make the VirtualDub usable for just another interesting video purpose tongue.gif


I hope this was not such a bad idea, after all.


PS. Damn! In the browser the GIF is shown okay... only my old ACDSee v3 seems showing the gif with weird artefacts all around the night sky sad.gif Time to investigate this futher, as the other people gif previews did not show that... And all right! It is not just a "old ACDSee", the Jasc Animation Shop failed too when tried to open this VD produced gif. Just crash... Other GIF can open w/o problems...
Okay, it is a version 3.04, but regardless, resulting GIF should work fine in every software.
The old version is then there: http://www.sendspace.com/file/e3w78i (7zip compressed file)
(pass: testovaciheslonarapid )
...and the bug will be well-visible on the gif above...

--------------------
"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire
...just keep folding, just keep folding... :) my config - my caps
 
         Top
dloneranger
Posted: Oct 26 2012, 01:27 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



I usually test gifs by dragging them into firefox

Re decimating the gif - doesn't the option on the video menu->frame rate work? (the decimate option)

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
trodas
  Posted: Oct 26 2012, 01:51 PM


Advanced Member


Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07



Well, no. It does work, but it does also preserve the timeframe for the images, and that result in very long waits between the images (341 frames are missing there) and fixing this will require load it into Animation Shop and as you well know by now, it crash right away on GIF from VD.
The sad fact, that Firefox accept almost every GIF imaginable does not change a thing.

The old Animation shop (before the GIF wars) is then there: http://www.sendspace.com/file/kx72p1 (7zip compressed file)
(pass: testovaciheslonarapid )
So anyone can test how fast it crash when one try to load it up with GIF from VD...

--------------------
"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire
...just keep folding, just keep folding... :) my config - my caps
 
         Top
trodas
Posted: Oct 27 2012, 05:07 PM


Advanced Member


Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07



As MS GIF Animator 1.01 (latest, lol) crash when attempting to open the GIF from VirtualDub:
http://rapidshare.com/files/360301023/MS%2...ator%201.01.zip
http://depositfiles.org/files/t4hu5n2h0
http://www.sendspace.com/file/jylmnm

...so definitively the GIF is not healty. However Trouts GIF Optimizer open the gif fine and reduce it's size considerably... finally a way to save the gif in "working state", as then it can be open with all other programs smile.gif

Yet the display glitches in ACDSee not disappear. Probably something with the 0 color or transparency?

--------------------
"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire
...just keep folding, just keep folding... :) my config - my caps
 
         Top
phaeron
Posted: Oct 28 2012, 07:54 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



VirtualDub creates animated GIFs with palette changes across delta frames to improve color depth, which some programs can't handle. If you need an animated GIF that only uses 256 colors total across the entire animation, currently you'll need to use another program to do this as VirtualDub generally doesn't handle palettization across a video.
 
    Top
MaxS
Posted: Oct 30 2012, 05:09 AM


Advanced Member


Group: Members
Posts: 83
Member No.: 24361
Joined: 13-October 08



trodas, you can use this mod to export video to APNG:
http://sourceforge.net/projects/vdubapngmod/

Then you convert APNG to GIF using this:
http://sourceforge.net/projects/apng2gif/

That way you'll get a nice one-palette GIF that works everywhere.
 
     Top
trodas
Posted: Oct 30 2012, 08:11 PM


Advanced Member


Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07



phaeron - dear phaeron, optimizing palete for each frame to get as good image, as possible, is something that all programs do. Paletization is never wanted or asked on.
What is strange are, that two good programs (Animation Shop and MS GIF Animator) crash right away when opening gif that VD produced.
And one show (ACDSee) the gif, well, weirdly. Perhaps it just did not like changing the ZERO color and handle it to be always black or same, or I don't know...

And when I push the very same gif thru the Trouts GIF Optimizer, both programs stop crashing. Did I say that the gif is, yet optimized, still the same? There is no color reduction or something like it. Still use different palete for each frame, etc.

I know that gif production is not something, that VD is aimed for (but somehow at for example http://clips4sale.com people are producing wast amount of gifs from videos...), however at least the programs should not crash, when the ACDSee problem will be overlooked. Yet once again, I can produce like million animated gif's, that show up in the abovementioned ACDSee w/o a glitch... and everyone I produce by VD does show weirdly. It is not all the colors, just the one.

Investigating the ACDSee glitch is IMHO not worth it (and out of the scope of VD development after all), but the crashes, that is IMHO different issue.



For fun - this image show up just great in ACDSee: http://i.imgur.com/Mwb1T.gif
...but after optimizing the image with Trouts GIF Optimizer ( http://rapidshare.com/files/1040551407/Tro...20Optimizer.zip - http://depositfiles.org/files/7tw6tf0rp - http://www.sendspace.com/file/b9ustp ) it show different (more color affected, IMHO) far more intensive glitches, but similar to VD produced gif smile.gif



MaxS - I don't understand. You want suggest me to use another version of VD to produce animated PNG files and then comvert them into GIFs? That means two new apps = possibly at least 4 new problems. I suggest that you rather should done a plugin for the PNGs wink.gif Then it could be interesting.
So far I managed work around the quirks - VD gif I blast thru the Trouts GIF Optimizer, set the speed as I like and that it is smile.gif Ready for upload.

--------------------
"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire
...just keep folding, just keep folding... :) my config - my caps
 
         Top
MaxS
Posted: Oct 31 2012, 05:35 AM


Advanced Member


Group: Members
Posts: 83
Member No.: 24361
Joined: 13-October 08



QUOTE (trodas @ Oct 30 2012, 08:11 PM)
MaxS - I don't understand. You want suggest me to use another version of VD to produce animated PNG files and then comvert them into GIFs? That means two new apps = possibly at least 4 new problems.

You undestand correctly, except there will be no problems.

You should try it anyway, at least to compare the size/quality of the result.

And I would also recommend switching from ACDSee to XnView.
 
     Top
phaeron
Posted: Nov 5 2012, 08:42 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



I figured out the problem. At least in the case of the MS GIF animator, the problem is that its GIF89a decoder is non-compliant and doesn't handle deferred clear codes properly -- its decoder overflows the LZW table past 12 bits and crashes. There is a side note in the GIF89a spec that asks encoders not to use this feature until 1991 due to problems with broken decoders... apparently 2008 was too early. I guess I have no choice but to force a clear code whenever the table fills up.

Update:
1.10.3 test-9 now has the updated GIF export code with the workarounds and some other improvements -- give it a whirl.

This post has been edited by phaeron on Nov 5 2012, 11:22 PM
 
    Top
trodas
  Posted: Jan 20 2013, 06:06 PM


Advanced Member


Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07



Oh, I almost forget where to get for it... lol Found it now:

http://sourceforge.net/projects/virtualdub...b-experimental/

...and tested the gif output. And yes! It works now w/o crashing of either MS Gif animator or the Jasc Animation Shop. Good, thanks for the fix, phaeron!

Colors stays weird in ACDSee v3.0 (but that it is it's own problem, seems... maybe v3.1 will do it better?) and yet the MS Gif animator joined the weird colors, the Jasc Animation Shop show perfect colors. But now I can at least in the very small thumbnail show, wheat I mean when speaking about weird colors:

user posted image

Jasc Animation Shop:
user posted image


Also I noticed that the GIFs are somewhat smaller and Trout's GIF optimizer become useless - eg. no reduction in size. Someone tweaked the code well, congratulations phaeron! Good job!

--------------------
"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire
...just keep folding, just keep folding... :) my config - my caps
 
         Top
trodas
  Posted: Jan 22 2013, 07:19 PM


Advanced Member


Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07



Got a idea how to show the GIF trashing by ACDSee (just PrtScr when showing the gif, easy, lol):

Gifs like this one:
user posted image

...looking in ACDSee v3 this way:
user posted image

Interestingly, all similar gifs from clips4sale and such sites show just fine in the very same ACDSee v3... Just not the gif images made by VirtualDub. Anyone know, if the more recent v3.10 or v3.1 do a better job on the gif example? laugh.gif Kinda old software, huh?

--------------------
"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire
...just keep folding, just keep folding... :) my config - my caps
 
         Top
MaxS
Posted: Jan 25 2013, 05:05 AM


Advanced Member


Group: Members
Posts: 83
Member No.: 24361
Joined: 13-October 08



I switched from ACDSee to XnView years ago, and never looked back.
 
     Top
trodas
  Posted: Feb 10 2013, 08:11 PM


Advanced Member


Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07



I was thinking about ACDSee v3.1 ... but not conviced yet that it will work as well, as v3 ... for years. Only problem are with these gifs... and many and may gifs from Clips4sale, for example, works fine even with ACDSee v3... Weird smile.gif

--------------------
"It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire
...just keep folding, just keep folding... :) my config - my caps
 
         Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
12 replies since Oct 26 2012, 12:41 PM Track this topic | Email this topic | Print this topic

<< Back to Testing / Bug Reports