Posts: 1
Joined: Wed Feb 19, 2014 1:39 pm

Raspivid File Size

Wed Feb 19, 2014 1:47 pm

Hello Raspberry Pi Community, I have a daft question for you.

I have managed to setup my RPi camera and have gotten it to start recording to a file. Great. However, I'm curious as to why the file sizes are so large, given that this is H264, and that I'm recording a non-moving backdrop (most of the time). I'm no expert on this, but my current (albeit lower spec) H264 security camera is around 700MB an hour for a 720P image @ 8Mbps. As far as I can tell, the RPi is clocking nearly 3GB an hour.

Are there some settings that are more suitable for a static(ish) image?


PS Apologies if this has been answered before... I wasn't exactly sure what search terms to use! Nothing pertinant came up.

Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Raspivid File Size

Mon Feb 24, 2014 9:00 am

You can always vary bitrate or framerate and resolution to meet your demands.
The camera easily supports full HD @ 30 fps (which is default) ... tation.pdf

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 33216
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspivid File Size

Mon Feb 24, 2014 9:25 am

Hmm, really must get that PDF updated to the latest spec.

Anyway, the size is defined by the bitrate. Your bitrate is 8MBits/s, raspivid by default is 17Mbits/s, so over double the size without changing anything. Also relevent is the intraframe period. This is the time between keyframes (I frames). Make this larger, and you get less keyframes over time, they are larger than B-frames (difference frames between I frames), and will push up the overall size.

So tweak the settings, and see what you get. You need to compare oranges with oranges.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Meet me and the Pi team at Embedded World in Nürnberg, April 9th-11th, 2024
Hall 3A Stand 138

Return to “Camera board”