[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/apng/ - Animated PNG

RIP in pieces GIF

Catalog

See 8chan's new software in development (discuss) (help out)
Infinity Next update (Jan 4 2016)
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 3 per post.


File: 1451343616797.webm (450.67 KB, 720x404, 180:101, IMAJEW.webm)

 No.365

So, /apng/. The other day I saw someone posting a soundless webm. Now this triggered my autism something fierce, so I went about trying to convert it to an apng. I opened up my trusty terminal emulator and converted the webm to a png image sequence using avconv (ffmpeg). I then assembled the image sequence into apng using apngasm. The result was a terrible, steppy mess. Like it lingered on each frame for too long. No matter how I adjusted the framerates, I just couldn't get it right. I tried again with a much, much shorter mp4 and the result was the same, so it's likely not the length.

/apng/, what's the best way for a humble GNU/Linux user like myself to convert a short video clip to an apng without using gif as an intermediate step? The gif format just fucks with the quality and is better left out of the process.

 No.366

What do you mean by it lingering on each frame for too long? Have you taken a look at your image dumps to see if there's some sort of repetition going on in the areas where it lingers?

I normally use VirtualDub to dump my frames and don't experience anything like this, so maybe it's a problem with FFmpeg? Apngasm seems to currently still be the best at optimizing APNGs, so you're doing the right thing by dumping to frames first and then re-assembling them.


 No.367

File: 1451429594565.png (3.17 MB, 720x404, 180:101, IMJEW.png)

>>366

>What do you mean by it lingering on each frame for too long?

I mean that it looks like pic related. It's definitely animating, but it's as if the frame rate is way slower than apngasm's default 1 per 1/10sec.

>Have you taken a look at your image dumps to see if there's some sort of repetition going on in the areas where it lingers?

There's a little repetition, but it's lingering on the non-repeated frames too. The whole thing is lingering.

>so maybe it's a problem with FFmpeg?

Either that or the user. The end result is super fucked up; the full apng file is over 30MB, which is why I'm just posting the tail end of it here.

The command I'm using is this:

[code]avconv -i " + vid + " -r 30 -f image2 %04d.png[/code]

Is there something wrong with that?


 No.368

>>367

>[code]avconv -i " + vid + " -r 30 -f image2 %04d.png[/code]

I mean:

avconv -i vid.webm -r 30 -f image2 %04d.png


 No.369

File: 1451444874094.png (2.95 MB, 720x404, 180:101, 25fps.png)

>>367

According to APNG Disassembler, the frame display for all of your frames was 268 delays/269 sec. Should be 1/25 right? APNG Assembler does have a rather confusing way to describe frame delays.

>the full apng file is over 30MB

As for this, you will often end up with a large file if you just try converting a real-life video (not animated) to AGIF or APNG due to the lack of opportunities to save space via transparency replacement between frames (especially bad with lossy compressed video because lossy video format compression schemes create more motion between frames due to compression artifacts). Now there are techniques to try and cut the file size further such as reducing the amount of colors, reducing the number of frames, or even freezing the background to make a cinemagraph. This is not the strong point of animation formats like AGIF and APNG though, and it is often a better idea to just keep video like that in a dedicated video format like WebM, especially if it's a somewhat large resolution like your source.


 No.370

>>367

Also I don't really know avconv's syntax well but isn't your source video 25 fps? Shouldn't it be -r 25, or does that really even matter with frame dumping?


 No.371

File: 1451528333104.png (3.17 MB, 720x404, 180:101, 25.png)

>>370

>Shouldn't it be -r 25

Apparently not.

I'll just install wine and get virtual dub.


 No.372

>>371

Your frames were intact, I just had to alter your frame display times. So your use of Apngasm seems to be the problem, not the frame dumping step.


 No.373

>>372

What command exactly did you give it?

For >>371 I put in:

apngasm 25.png 0*.png 1/25


 No.374

>>373

I usually use the Windows GUI version but I think you may have the syntax wrong for the command line version. According to the sourceforge page you would do it like this, with a space instead of a slash between the two frame delay components:

apngasm 25.png 0*.png 1 25


 No.375

I just realized I don't see any options for how to set the frame delay for a specific set of frames in the command line version of Apngasm. Seems like you have to set them all at once, whereas the GUI version lets you pick and choose.


 No.376

I figured it out. Avconv does something fucky when it dumps the frames. I just tried again with another short webm and got the same laggy result. Then I ran the frames through GIMP before assembling the apng and it worked perfectly.


 No.380

>>375

>I just realized I don't see any options for how to set the frame delay for a specific set of frames in the command line version of Apngasm.

If you have frame5.png and frame5.txt with delay=3/25 inside, that text will override the command line, but only for that particular frame.

If you specify 1 25 in the command line, all frames will have 1/25 sec delay except for 5th frame, it will have 3/25 sec delay.


 No.381

>>380

Yeah that definitely doesn't make me want to use the command line version over the GUI version. I wish there was a GUI version for Linux instead of just Windows.




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]