Video writing, which codec/format for smallest file size

760 views
Skip to first unread message

Amina Kinkhabwala

unread,
Jun 8, 2021, 3:54:03 PM6/8/21
to Bonsai Users
Hi there,
I'm using VideoWriter to write a tiny video (resized to 190 x 300 pixels in size) but it ends up still being quite large. I've tried writing to .avi with FMP4 and DIB but both are writing fairly large files. Am I missing something on how to downsize my video? 

Gonçalo Lopes

unread,
Jun 13, 2021, 8:19:36 PM6/13/21
to Amina Kinkhabwala, Bonsai Users
Hi Amina,

Is the video color or grayscale? You can try compressing with DIVX instead of FMP4, it might give smaller files.

Otherwise, you probably need to control the exact compression parameters. For that you would need to use FFmpeg pipes. There are some examples of this in the forum:

and also one in the gallery now in Tools > Bonsai Gallery > FFmpeg Writer Example.


Hope this helps,

On Tue, 8 Jun 2021 at 20:54, Amina Kinkhabwala <amina.ki...@gmail.com> wrote:
Hi there,
I'm using VideoWriter to write a tiny video (resized to 190 x 300 pixels in size) but it ends up still being quite large. I've tried writing to .avi with FMP4 and DIB but both are writing fairly large files. Am I missing something on how to downsize my video? 

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/ba168301-5096-4553-bcca-ef6221211122n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages