How do I convert videos to apng (Animated Portable Network Graphics) files? I tried using ffmpeg and Shutter Encoder, but I couldn't open them normally and when I did, there weren't any animation.
+ Reply to Thread
Results 1 to 19 of 19
-
-
I was able to find quickly many examples how to use ffmpeg to create apng - as you not providing more details about your tries then i strongly recommend to try something from bellow links:
https://stackoverflow.com/questions/43795518/using-ffmpeg-to-create-looping-apng
https://video.stackexchange.com/questions/32865/how-to-convert-a-black-and-white-video...g-a-color-as-t
https://www.reddit.com/r/steamgrid/comments/detym1/guide_for_creating_your_own_apng/ -
Oh yeah, my previous attempted were successful, but I couldn't open them with XnViewMP (which was supposed to support them) and I went opened them using GIMP, there weren't no animation. I also set the frame rate in Shutter Encoder, by the way.
-
Maybe this MPEG Streamclip can be of any use? It have some PNG choices such as Apple PNG, Apple Animation and some other similar ones... it does not look like the specific APNG is there though!
Edit: I think ive seen some sort of a-png thing somewhere before, ill try find it and re-post it here what is was, if i can find it again!
For XnView there is alot of Addons/Plugins avalible, maybe there is one that can be installed with XnView MP to help load the previously created A-PNG's? There is some addons/plugins to help create/produce things allso, maybe can get something going from there allso!Last edited by Swedaniel; 25th Dec 2023 at 00:16.
-
-
I got this in XnViewMP when I used the code.
[Attachment 75748 - Click to enlarge] -
-
-
-
-
Because it's 10bit444 source, ffmpeg will auto convert to 16bit RGB by default, instead of 8bit RGB. But 16bit RGB apng will not be compatible with most browsers or applications
Use -vf format=gbrp to convert it to 8bit planar RGB. In this example, I also downscaled it to 640x360
Code:ffmpeg -i ggg.mkv -vf format=gbrp,scale=640:360 -plays 0 -c:v apng output.apng
-
-
ffmpeg auto converts to 16bit RGB from 10bit YUV source because that's the way it's coded right now. Maybe behaviour will change sometime, ffmpeg is a fluid, always changing project
16bit RGB filesizes are massive and incompatible for most display scenarios . Browsers are meant to be light weight, fast transfers . If you have to wait an hour before the apng even loads, it's pretty silly . Some people in rural areas, some countries have very slow internet
Ask the developers/programmers for your various software why it's not compatible , maybe they have other reasons -
-
Framerate of output should be automatic same as input file in ffmpeg . You can force a different framerate with -r as an input option
Or for full control you can use other software such as apngasm with individual frames. You can specify different frame delay times
If the framerate doesn't look the same, it might be the program is having difficulty playing back apng with large sizes at full speed. And/Or your hardware is too slow . apng is not a playback optimized format
Plus, for Shutter Encoder, how do I adjust the RGB to fix it to 8 RGB?
If I didn't downscale, just keep 8bit RGB the apng is massive - 12.7MB source video balloons to 474MB (!)
Even with downscaling it's still 59.3MB .
No downscaling plus 16bit RGB ballons to 1.15GB(!!)
apng's are meant to be used in very specific display scenarios, not general use
Similar Threads
-
Transparent background MOV to Apng animation output size difference
By stealthrt in forum Video Streaming DownloadingReplies: 1Last Post: 26th Jan 2022, 18:14 -
opinion please on tenlab/sign video/data video tbc/ace video
By victoriabears in forum RestorationReplies: 8Last Post: 1st Aug 2019, 03:52