Quick Sign In:  

Forum: Video Discussion

Topic: .webp animated to .mp4 [& FFMPEG stuff]
locodogPRO InfinityModeratorMember since 2013
Hi all I'm no expert at this by any means but I spent a while looking how to do this and I didn't find a dummies guide anywhere, so here it is.

.webp ; is a pretty common online format now replacing .gif [way better quality too], but it seems only web browsers support it.

I like using .gif with the slideshow plugin but places like
now store the files as .webp, there may be browser plugins to change formats but I like the simplicity of "right click, save as"
so I download a load of .webp to a folder, also in that folder I drop in
I also need an exe from google's webp library libwebp I need "anim_dump.exe"
[I grabbed latest x64 version.zip ]
anim_dump, takes an animated .webp and breaks it into .png for every frame.

everything in place, lets turn some .webp into .mp4.
First shift+right click in the folder window, "open powershell window here"
with powershell open type
press enter to open old school command line, then type this in.
for %i in (*.webp) do anim_dump -prefix %~ni_ %~ni.webp

my dummy understanding of this is
every file that ends .webp, process it with anim_dump, name the dumped .png files "FILENAME_XXXX" [XXXX being the frame number]

it may take a minute when it's done type.
for %i in (*.webp) do ffmpeg -r 15 -f image2 -s 1920x1080 -i %~ni_%04d.png -vcodec libx264 -crf 15  -pix_fmt yuv420p  %~ni.mp4

my dummy understanding
every filename ending .webp, look for filename_XXXX.png and use ffmpeg to piece then all together to make "FILENAME.mp4"
-r is the fps [I used 15 as a lot of my .webp are really short and it looks pretty 'ravey' ]
-crf is quality; the lower the better but 15 is very good apparently.

after that you'll have .mp4, you can delete all the .png & the .webp
which you could do with
del *.png

del *.webp

As I said I'm no expert, I had no idea how to do this yesterday, I've a lot to learn, hopefully this thread becomes a entry point for ffmpeg newbs.
But as a beginner to CLI [command line interface] there is a satisfaction in how easy this is [once you know the incantations to make the magic happen]

Posted Thu 01 Jul 21 @ 3:52 am
NicotuxHome userMember since 2014
Note webp is a format well known by VDJ (correctly loaded and render by VDJ)

anim is in implementation in ffmpeg and not yet finalized thus VDJ can't currently render
once done VDJ may handle animated webp natively

when added to supported format :
currently static supported webp appear as video (once already used, same as webm)
when unsupported yet webp appear as audio

Posted Thu 01 Jul 21 @ 5:07 am
locodogPRO InfinityModeratorMember since 2013
6 year old ticket though [how long do you want to wait?], I fixed it myself.

Posted Thu 01 Jul 21 @ 5:42 am
NicotuxHome userMember since 2014
average wait time for this kind of patch to review accept and apply seems to be near 7 years ^^

Posted Thu 01 Jul 21 @ 1:16 pm
Used this myself in rare cases, i wanted to use webp in some video editor (that dont suppor the format)

Easy drag and drop for multiple files etc (and 100s of such sites available for easy file conversions)

Posted Thu 01 Jul 21 @ 1:31 pm
locodogPRO InfinityModeratorMember since 2013
I caught a few online ones myself Rune, that one looks a lot better than most I saw. Most of my first page search results were one at a time, or do only 5 as a trial.
[I had 300 .webp, a lot I had changed to .gif earlier but they looked horrible]

Part of the 'fun' for me was figuring it out, if only at a superficial level.

Posted Thu 01 Jul 21 @ 3:33 pm
yeah i know ;-)
Was just if someone looks at or search this topic in future, there are dead simple drop and covert online sites for it ;-)

Posted Thu 01 Jul 21 @ 4:24 pm
locodogPRO InfinityModeratorMember since 2013
best of both worlds, drag&drop online for those that want it quick, or entry level CLI for the curious types;
both our methods will be deprecated... eventually. until then, right now no other dj forum is even talking about it.

Posted Thu 01 Jul 21 @ 5:56 pm
And what about "apng" (supported by VDJ)
quick test one created with old RealWorldPaint:

browsers and site display it ok

Posted Fri 02 Jul 21 @ 1:27 am