Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
|
|
#1 | Link |
|
Registered User
Join Date: Apr 2024
Posts: 518
|
From PNGs to APNGs
I have 227 PNGs. I want to make APNGs out of them where each APNG has 50 frames in them. I also want to make all of the APNGs in one setting. How do I do that using ffmpeg?
Last edited by jay123210599; 16th January 2025 at 16:40. |
|
|
|
|
|
#2 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,418
|
"From APNGs from PNGs",
Typo ?, Maybe "To APNGs from PNGs", or "From PNGs to APNGs". Select EDIT, Advanced EDIT, on first post to edit thread title.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
|
|
|
|
#3 | Link |
|
Registered User
Join Date: Feb 2020
Posts: 577
|
APNG implementaion in ffmpeg is subpar. You use https://apngasm.sourceforge.net/
|
|
|
|
|
|
#4 | Link | |
|
.
![]() Join Date: Jun 2024
Location: South Africa
Posts: 708
|
Quote:
|
|
|
|
|
|
|
#5 | Link | |
|
Registered User
Join Date: Apr 2024
Posts: 518
|
Quote:
|
|
|
|
|
|
|
#8 | Link |
|
Registered User
Join Date: Apr 2024
Posts: 518
|
Well, the default frame delay is 1/10 sec. How do I adjust it so my output APNG has 23.976 fps?
Also, which compressions for the tools are lossless, zlib, 7zip, or Zopfli? How does the number of iterations affect the compression/speed/quality? If I choose to optimize the palette and/or original color type of the PNGs, will it affect the quality of the APNG? |
|
|
|
|
|
#9 | Link | |
|
.
![]() Join Date: Jun 2024
Location: South Africa
Posts: 708
|
Quote:
Last edited by GeoffreyA; 6th January 2025 at 21:12. |
|
|
|
|
|
|
#10 | Link |
|
.
![]() Join Date: Jun 2024
Location: South Africa
Posts: 708
|
Here's a working method for the time being. I tried to do it all automatically, but nested FOR loops are problematic in Windows batch files. So, you will have to change the "start" and "end" variables each time. The first time would be "start=1" and "end=50" and the second time, "start=51" and "end=100" and so on. Your filenames will have to be in the format of "1.png" and so forth, starting from 1. Please run this on a copy of your original folder in case something gets accidentally overwritten. I'll see if I can improve to do everything automatically.
Code:
setlocal EnableDelayedExpansion set start=1 set end=50 mkdir "OUT" (for /l %%i in (!start!, 1, !end!) do @echo file %%i.png) > "Jay2025.txt" ffmpeg -f concat -r 23.976 -i "Jay2025.txt" "OUT\FINAL_%RANDOM%.apng" pause |
|
|
|
|
|
#15 | Link | |
|
Registered User
Join Date: Sep 2007
Posts: 5,669
|
My comments for "pallete optimization" for PNG were "in general" . It's a commonly used lossy technique for web graphics
If you're referring to apngasm specifically , the optimizations used there should be lossless according to the instructions. Quote:
Last edited by poisondeathray; 7th January 2025 at 18:41. |
|
|
|
|
|
|
#17 | Link |
|
Registered User
Join Date: Apr 2024
Posts: 518
|
Here are my test files: https://www.mediafire.com/file/2ooty..._APNGs.7z/file
1-1 and 2-1 uses both color and palette optimization. 1-2 and 2-2 does use color nor palette optimization. 1-3 and 2-3 only uses palette optimization. 1-4 and 2-4 only uses color optimization. All of them use zlib for compression. |
|
|
|
|
|
#18 | Link | |
|
.
![]() Join Date: Jun 2024
Location: South Africa
Posts: 708
|
Quote:
I must say, Jay, I couldn't help but smile seeing the second set of APNGs. Thanks for bringing a bit of humour to the evening. What anime is that? |
|
|
|
|
![]() |
| Tags |
| ffmpeg, png |
| Thread Tools | |
| Display Modes | |
|
|