No.3
SO YOU WANNA MAKE APNGS?This thread is for tools of the trade. Here are some tools I have found useful so far.
http://gif2apng.sourceforge.net/Convert your decrepit old GIFs to glorious APNGs.
http://vdubapngmod.sourceforge.net/VirtualDub mod for APNG dumping and loading support. Allows you to create APNGs from AVI files. If you're planning on using a frame rate that GIF doesn't support you should start here! VirtualDub usually doesn't make the most optimized GIFs or APNGs so that's where GIMP and other optimizing tools come in.
http://registry.gimp.org/node/24394GIMP GAP plug-in for opening and saving as APNGs.
I haven't gotten this damn thing to work properly myself but as I use GIMP regularly for making GIFs I imagine it would be extremely useful for those that can get it working.
http://sourceforge.net/projects/apng/files/APNG_Optimizer/Optimizes your APNGs. Doesn't quite do it as efficiently as GIMP GAP but you take what you can use.
http://sourceforge.net/projects/apngasm/Sort of useful tool for assembling from individual image files, could really use a visual display though; there's currently a funded kickstarter project to build one from it
https://www.kickstarter.com/projects/374397522/apngasm-foss-animated-png-tools-and-apng-standardihttp://littlesvr.ca/apng/A nice list of APNG tools, haven't gotten around to evaluating them all yet.
No.5
>>3Oh and unfortunately APNG Optimizer seems to like to crash when your animation has too many frames. Not sure what exactly the threshold is yet.
No.6
>>5Also crashes if your resolution is too high. This really isn't as useful as it should be.
No.12
>>5The author here. After 2 years, Optimizer needs a major code rewrite anyway.
Meanwhile, you could use apngdis+apngasm combo instead.
It's basically the same thing, except the code in apngdis/apngasm is more recent and more reliable.
No.13
>>12Whoa, nice to meet ya! I'll give it a try when I have some time.
Since you're the author, what's your take on GIMP's GAP plug-in animation optimization? It's the best I've ever encountered personally. The only thing it really competes with is Photoshop, but even Photoshop is often not as efficient in terms of arranging alpha channels to save the highest amount of file space. One thing I've also noticed a lot of GIF/PNG optimizers don't attempt to do is discard identical frames and accumulate the display time between them. Something to keep in mind if you decide to rewrite it. You might want to wait and see what that Kickstarter project is going to add to put together first though.
No.15
Ah yes, apngasm does seem to create smaller APNGs after all. You can use VirtualDub to dump to frames in addition to apngdis.
No.16
On another note, I may have thought up a way to get around GIMP's APNG plug-in failing to actually save to APNG. If I can just find an APNG assembler that doesn't alter the frames at all, then one can still take advantage of GIMP GAP's excellent transparency optimization by assembling from dumped images.
No.17
Aha, it seems you actually can get APNG Assembler to put one together without altering individual frames. Strangely, you specifically have to
uncheck Optimize palette and
check Optimize colors under Compression Settings. As you can see, this results in a smaller file because GIMP is just that good at optimizing alpha channels.
Pretty tricky, but those interested will want one of the many scripts or plug-ins to dump GIMP layers as individual images. Here's what I've been using:
http://registry.gimp.org/node/28268 No.18
>>17Aww damnit, what did I do wrong here?
No.19
>>13>what's your take on GIMP's GAP plug-in animation optimization?I'm not familiar with that, but I'll take a look.
>One thing I've also noticed a lot of GIF/PNG optimizers don't attempt to do is discard identical frames and accumulate the display time between them. Something to keep in mind if you decide to rewrite it. It's in TODO list, yeah.
No.20
>>16>GIMP's APNG plug-in failing to actually save to APNG.At one point, I looked at that plugin code and it's such a buggy mess. No wonder it crashes so much.
APNG Assembler by itself does a bunch of optimizations tricks (but only lossless), including saving only changed pixels:
http://littlesvr.ca/apng/inter-frame.html No.21
>>20Hey can you explain to me the practical difference between the different kinds of compression schemes available to APNG? How do I decide whether to use zlib over 7zip and others? What about the number of iterations as well?
No.22
>>217zip can compress better than zlib, and it's fast enough.
zopfli can compress even better than 7zip, but it's kinda slow.
More iterations means better compression, but it might take a long time to process.
It's worth to try all of them on some GIF.
No.38
>>22Let's test this out. Animated GIF converted with gif2apng. 15 iterations were used for both 7zip and Zopfli compression, while zlib compression has no iteration selection. Conversion with zlib compression went extremely quickly compared to the other two which were about an order of magnitude slower. Zopfli was a fair bit longer than 7zip. So greater compression definitely scales with creation time.
But you only have to create something once. How do each of these load/play in a browser? Is there any noticeable difference? That's what I am really interested in.
No.59
thank you masters
No.63
>>38Weird… On Safari (WebKit), on all three of those, the time between frames progressively increases, whereas on Firefox, they all play smoothly.
I've never seen Safari do that with any other APNG, though… it can't seem to handle that particular one no matter how it's compressed, for whatever reason.
No.64
>>63You mean the frame rate actually slows down with greater compression?
No.68
>>13>One thing I've also noticed a lot of GIF/PNG optimizers don't attempt to do is discard identical frames and accumulate the display time between them. Something to keep in mind if you decide to rewrite it.APNG Assembler 2.9 is out, and it can do that trick:
https://sourceforge.net/projects/apngasm/files/2.9/ No.69
>>68Awesome, thanks for adding that! That step was proving to be quite laborious for me. 'Optimizing for GIF' in GIMP just to find them, and then manually handling the step from APNG assembly via frame dump… It was time consuming.
No.70
>>64I don't think so. They all behaved the same. I don't really understand what's going on… hard to describe…
No.75
>>70Do they just load more slowly with more compression?
No.112
No.113
>>112That's… Odd. Not sure why you would want to use ffmpeg to encode PNG.
It will be nice viewing animated PNGs with IrfanView though.
No.114
>>113"dec" in pngdec.c stands for decoding.
They want to be able to read APNG, which makes sense.
No.115
>>114Ah right, for converting to a video format.
No.142
No.144
>>142If you have the original video that's made from it might be easier to convert the white to transparency.
No.156
>Create pngs from image sequences
Oh boy testing.
No.157
>>156That's pretty huge. If that isn't already optimized (did you use apngasm?) then you're probably just better off introducing lossiness or converting to a video format.
No.158
>>157Yeah I used apngasm with 7zip compression, it is huge because it's 640x480 which is the minimal for Worms Armageddon replays, and has 16 frames per second aprox with a total of 1000 frames, plus lots of colors which is a common characteristic of the series.
The thing is, replays in WA are exported in individual pngs, so it's extremely convenient to make apngs.
I will try to introduce lossiness, it will probably do the trick, I did another different replay 1000 frame apng at 25 fps and the size doubled to 12mb for some reason, (Probably crossed some threshold with the palette, I don't know exactly how the format works but that might be it).
No.161
>>3>Allows you to create APNGs from AVI fileThat's certainly limited. Is it possible to extract h264 files and wrap it in AVI, or would I be forced to convert it?
No.162
>>161You mean limited because of only reading AVI? VirtualDub has ways to read other formats like MP4 and MKV now, though I haven't checked to see if you can do them with the APNG-modded version.
In any case you should be able to extract h264 video from MP4 at least and put it back into an AVI container without re-encoding.
I don't use use vdubapngmod much anymore because dumping to frames and then creating an APNG with apngasm results in a better optimized file than going the save to APNG -> APNG Optimizer route. I
would dump it to APNG and optimize through GIMP because its alpha channel optimizing it still the best around; however, I still have not managed to get that crummy APNG plugin to properly save files to APNG.
No.163
>>162For MP4/MKV I tried copying my plugins in VirtualDub to the APNG version and it didn't work. I don't even use VirtualDub anymore, but I still have it around.
Screw messing with frames. I never want to mess with individual frames again after GIF.
No.164
>>163Have you ever made any GIFs in GIMP? Tweaking individual frames is useful for getting just the right animation sometimes. Though in this case it's more like simply dumping frames to a temporary folder and then restating the frame rate in your APNG assembler.
No.165
>>164I've never used GIMP. I've been using Photoshop CS6 for a while, and that's where I also made GIFs. My problem was when I wanted to frame dump using virtualdub from an MKV (since I was on /a/ a lot) the colors were never accurate. It was like it ignored madvr, so I had to screencap one by one using my media player. ffmpeg frame dump had the same color problem and was also worse quality. It sucked ass, but no one seemed to understand what I was talking about so I could never figure out a proper solution.
Also, Photoshop's GIF optimization is trash. It says it'll only update parts of the frame that change to keep file size down, but it only half works. If there's even a spec of grain it would be considered new and your GIF would bloat with no discernable visual change due to a smaller resolution. So, I had to copy+paste parts of an image as a new layer over multiple frames to make the GIF go from 7MB to 3MB.
I really don't like GIF. Some of the above is my fault, but I never looked back after WebM appeared so I never figured out solutions. These days I'm learning all about video editing and if it doesn't invole special effects I got a good handle on it.
No.166
>>165Just a thought, but… You weren't dumping your frames to some lossy image format like JPEG were you? Another thing that's possible is your program was changing the color mode from RGB to indexed in the process of frame dumping, which can end up altering your colors. I believe I've noticed such a thing when processing GIFs from VirtualDub before.
I didn't know Photoshop's GIF optimization was that bad. I've always assumed it's at least competitive with GIMP's but if that's the case then GIMP really does have the best animation optimization around. I wish it would get better APNG support to take advantage of this. I tried assembling an APNG from GIMP-dumped frames after letting it optimize the alpha channels once a while back, here
>>17but I couldn't figure out how to make it work right.
No.167
No.169
>>167I dunno why but every APNG viewer I have tried so far seems to take ages to open files with a lot of frames. This one seems to also have trouble playing things at the correct frame rate. Meanwhile Firefox does it instantly and always play them at their correct speed.
No.170
>>166>Another thing that's possible is your program was changing the color mode from RGB to indexed in the process of frame dumpingThat must be it.
It's still happening even with the APNG Virtualdub. I have no clue how to fix it.
No.171
>>170This is definitely an issue that I would like to solve. According to my old GIF making notes here, it's actually
GIMP that automatically converts GIFs to indexed color mode when you save one. VirtualDub saves GIFs and APNGs as RGB.
So… Are you sure it's not your MPC screencapping/display that's altering the colors perhaps?
No.172
>>171>Are you sure it's not your MPC screencapping/display that's altering the colors perhaps?Why have I never considered this…
VLC screenshots look like VirtualDub images. However, in the VLC player it looks like MPC albeit worse quality.
If VLC screenshots match VDub, but actually watching it looks like MPC then I'm inclined to believe something is going wrong before it's displayed. Turning off madVR and LAV doesn't change anything but the quality; the colors still look similar.
I was messing around with settings for about 40 minutes before I submitted this post.
No.173
Okay, here's the thing:
In VLC if I turn off Hardware YUV->RBG Conversions the colors are just like Vdub. Turned on it's like MPC; the washed out colors was Nvidia using 16-235 range so I fixed that.
I did a clean install of MPC and it still has the same colors. If I could figure out how to turn this off in MPC I'd be set, but as of right now VLC actually works better.
No.174
I'm not alone, but I can't post a reply because "get more reputation. :^)", and it was posted this month.
https://superuser.com/questions/876899/video-color-is-different-in-different-programs-which-one-is-correctI put the mkv in Avisynth.
MPC is displaying BT.709
VirtualDub displays BT.709, but extracts BT.601
I swap between the two and I swap between the different images.
If I add
[code]ColorMatrix(mode="Rec.709->Rec.601")[/code]
to AVISynth, VirtualDub extracts the frames that I see in MPC.
So, there.
Whatever.
I still don't know what I'm actually supposed to see.
This had some useful info as well.
http://forum.doom9.org/showthread.php?t=164378 No.175
>>173>>174This is fascinating, I never knew players altered colors on purpose like that.
No.176
>>175Probably the end of this journey. Here's the media info for three videos.
Gunsmith Cats & CCS don't have a tag, so MPC assumes BT.601 and BT.709 respectively based on the resolution.
Utena does have a tag, so MPC uses BT.709.
Since Utena does have a tag, this means that without a doubt VirtualDub is extracting frames using the wrong colorspace unless I add that ColorMatrix line.
APNG because this is /apng/ after all.
No.177
>>176Some of your terms are new to me. So how can I tell when I need to explicitly state the color depth in VirtualDub to ensure I get an identical frame dump of a video? Don't use AVIsynth myself.
No.178
>>177I don't know how to do it without AVISynth/AvsPMod. If it's BT.709 (Probably anything high resolution) then you use:
ColorMatrix(mode="Rec.709->Rec.601")
to make VirtualDub extract correct frames. This will exaggerate the colors even more in the preview; the petals around Sakura will be a lighter shade, but it will extract the frames correctly.
If it's BT.601 then you won't need to do anything, as VirtualDub seems to use only that one.
However, if it's a low resolution video and it needs to be adjusted to BT.709, then you flip the numbers in the ColorMatrix line.
ColorMatrix(mode="Rec.601->Rec.709")
I think this has something to do with the GPU hardware. VLC only did BT.601 until I told it to use Hardware RGB->YUV Conversions, then it began to react like MPC-HC. I'm assuming VirtualDub doesn't go through Hardware RGB->YUV so it gets stuck in BT.601 mode. Or something, I'm not too knowledgeable on how all of this actually works, I just know that line manages to correct it well enough where I can't see much difference, if there is any.
Here's ColorMatrix for AVISynth.
http://www.solidfiles.com/d/92040e1b2d/ColorMatrixv25.ziphttp://avisynth.org.ru/docs/english/externalfilters/colormatrix.htmAttached picture is me selecting a recording codec in Dxtory. I use that one for recording video games, and you see some very familiar numbers for the UtVideo ones. I discovered ColorMatrix because I accidentally recorded footage in YUV420 BT.601 and I needed to correct the colors during encoding.
Addendum: A quick glance in VirtualDub video filters I see a Convert Format. There's a 4:2:0 (rec.709) (full range), so that might be how to do it in VirtualDub.
No.179
No.185
>>184Does this mean native APNG support in Safari now?
No.186
Safari had APNG support since Yosemite 10.10 and iOS 8 but it's a bit buggy.
The problem is that Apple implemented it outside of WebKit for some reason, and kept it closed source.
This new code mostly helps other WebKit-based browsers.
No.187
>>186Oh wait… Does this mean native APNG support in Chrome now?
No.188
No, Google forked WebKit two years ago, and renamed it Blink.
So now Chromium is Blink-based, not WebKit-based.
Not a lot of alternative browsers use WebKit these days, most (like Opera and Yandex) are build on top of Chromium.
But still, it's a good news because if one day Chromium devs would change their minds about APNG, they could simply borrow the code from WebKit.
No.214
>>169
Have you tried XnView?
No.215
>>214
Yeah, it's one of the programs I was referencing. Took a full minute to open this file for instance, and it had trouble playing it at full speed when it finally did.
No.224
>this converted APNG is larger than its GIF
First time I've ever encountered this, and I've converted a lot of GIFs with gif2apng now.
What the heck is going on here?
No.229
>>224
Aha, perhaps the problem is I have no idea how the original GIF was optimized so well in the first place. Unoptimizing and re-optimizing the transparency layers through GIMP (one of the better GIF optimizers out there) produces a considerably larger file.
Whatever the original GIF did, gif2apng isn't doing a straight conversion of the GIF's transparency layers.
I guess I was mistaken in ever assuming apng2gif did.
No.232
>>229
APNG is predictable like PNG it was extended from. More of the same color at one area = smaller size
No.233
>>232
In this case the noise in the original gif is bringing you down.
No.234
>>233
Indeed, but why is the converted PNG still larger than the GIF? As far as I'm aware the only thing GIF should be better than PNG at when it comes to file size is animating simple things with very low numbers of colors.
No.242
What's a good imageviewer that actually show animated png? Am I the only cretin with this problem?
No.243
>>242
No I have it too. I've tried several of them now and they all seem to suck compared to simply opening one up in Firefox. HoneyView and XnView in particular both have this problem of slowing to a crawl when attempting to display APNGs with a significant number of frames.
No.250
No.254
I use apngasm. It's actually quite nice and isn't too hard to use.
Also sorry if this board is SFW.
No.255
>>254
It isn't, but if people could spoiler their porn at least that would be nice. Don't want people to have to shield their eyes to learn about this format.
No.259
>>215
This seems to have a really small file size for it's length. Is it really 50fps?
I remember I was close to that good at pokemon puzzle league
No.261
>>254
You sir are a fucking dick.
No.262
>>254
That's kind of impressively big
No.269