VTM writes too much data, when creating WebMs + Suggestion for ffmpeg switches

All about the program
Post Reply
procs
Posts: 1
Joined: 08 Nov 2016, 22:51

09 Nov 2016, 01:25

Uhm, I just noticed that VTM writes over 1GIG of data to create one single WebM file with 10sec length. :roll:
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"
corrections:
"-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"
Request:
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.
User avatar
admin
Site Admin
Posts: 1373
Joined: 03 Jun 2014, 22:14

05 Dec 2016, 21:04

Hello.

I am short of time, so I dicided not to bother with framerate and made it fixed.
I will review Webm as soon as I will have time for it.
Thank you for your post.
User avatar
admin
Site Admin
Posts: 1373
Joined: 03 Jun 2014, 22:14

25 Apr 2017, 21:46

Hello procs.

Just a status update.

I implemented new approach without disk writing, with corrections and optimizations.
Advances animation capabilities will be available as well.
Tech demo is finished, but a lot of GUI work and integrations are still required for new animation features.

Stay tuned and thank you once again for your post!
kmfan
Posts: 9
Joined: 21 Apr 2016, 18:31

27 Apr 2017, 20:49

I like the idea with the self detecting frame-rate very much :D
User avatar
admin
Site Admin
Posts: 1373
Joined: 03 Jun 2014, 22:14

29 Jun 2017, 16:31

procs, your comments have been implemented in VTM 10.0.0.0.
Thank you for your help!
Enjoy ;)

Same changes in Videonizer will be implemented in version 4.
Post Reply