That's not a good practice, especially for SSDs...
For one 10sec WEBM file, VTM creates 200 png files in:
%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\
And then rewrites those 200png files 3 times over:
1st run: screenshots (200pngs x 400KB)
2nd run: adds timestamps/scaling (200pngs x 1,5MB)
3rd run: creates thumbsheets (200pngs x 3,6MB)
That's over 1 gig of data written on HDD just for a single 10sec WebM!!!
Can't you at least use 95% jpegs instead of pngs, if you continue to use this workflow to keep our HDDs from degradation?
FFmpeg:
Another thing that i notices is the way you call ffmpeg to render the WebM videos is wrong.
For 10 sec Webm you do it with:
Code: Select all
ffmpeg.exe -y -f image2 -i "%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\snapshot_animated_%%03d.png" -c:v libvpx -b:v 1500k -c:a libvorbis -r 20 "<path to output file>.webm"
"-r 20" should stand before input, since that way you tell ffmpeg which framerate should be used for your image-sequence.
Putting "-r" before the output file is wrong and it will result in incorrect time/lenght of WebM.
"-c:a libvorbis" makes no sense here, since the created webms don't have audio streams. You should use "-an" (no audio) instead.
suggestions:
add "-threads 32" to the call. That way ffmpeg will use multi-threading, instead of just one thread. All available cpu-cores will be used and webm-video rendered MUCH faster!
Code: Select all
ffmpeg.exe -y -f image2 -r 20 -i "%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\snapshot_animated_%%03d.png" -threads 32 -c:v libvpx -b:v 1500k -an -f webm "<path to output file>.webm"
1) Would be cool if you can make the ffmpeg-call editable in VTM, for users to change framerate / bitrate and to add other ffmpeg switches.
2) VTM should extract correct number of frames, based on framerate of the source video, when creating Webms.
Currently you don't check the video framerate of source videos before extracting frames. That's why some Webms created by VTM play slower or faster than the original videos. For example, if the source video has 23,976fps, you need to extract 240 frames to be able to make 10sec Webm with correct speed. Currently, you just extract 200 frames for 10 sec and that's why the Webm video will play slower than the original video.