OK, here's the situation:
- I have a .mov video, recorded using QuickTime
- I want to split it into images (which I will use in a js animation)
JS Code :
function pad(num, size) {
var s = num+"";
while (s.length < size) s = "0" + s;
return s;
}
$(function(){
var currentIndex = 1;
setInterval(function(){
$("#theImage").attr("src","img/video"+pad(currentIndex,3)+".png");
currentIndex++;
}, 1000/24);
});
So, I tried with FFMpeg :
ffmpeg -i "video.mov" -f image2 -vf fps=24 video%03d.jpg
This works. But the quality of the sprites is very low.
ffmpeg -i "video.mov" -f image2 -vf fps=24 video%03d.png
This works too. But the quality/size of the sprite is HUGE. I mean every sprite is around 110KB, with a grand total far above the video's size (100MB > 2MB!)
What's going on?
How can I achieve that, without losing any quality and still not having too deal with huge filesizes?