Videos too heavy #1726

Open
opened 2026-02-28 00:52:36 -05:00 by deekerman · 7 comments
Owner

Originally created by @Saku241 on GitHub (Jul 24, 2020).

Hello
I run MotionEye 0.42.1 with Motion 4.3.1 on Raspbian 10

I record video on motion with H264/OMX on quality 100% on resolution 1280x720@10 fps and video are quite heavy

Like each second of video its equal to an average of 4MB

I quietly have multiples videos of 60+MB

Do you know a better solution to fix this ? Another codec but with a low cpu usage or anything ?

Thanks

Originally created by @Saku241 on GitHub (Jul 24, 2020). Hello I run MotionEye 0.42.1 with Motion 4.3.1 on Raspbian 10 I record video on motion with H264/OMX on quality 100% on resolution 1280x720@10 fps and video are quite heavy Like each second of video its equal to an average of 4MB I quietly have multiples videos of 60+MB Do you know a better solution to fix this ? Another codec but with a low cpu usage or anything ? Thanks
Author
Owner

@zagrim commented on GitHub (Jul 25, 2020):

Don't record with quality set quite as high as 100%? 😉 I mean, a slight drop in quality might mean a significant drop in size.

I don't think there are any other codecs that would have hardware support on Raspberry Pi, so anything else will probably be too heavy for the CPU.

@zagrim commented on GitHub (Jul 25, 2020): Don't record with quality set quite as high as 100%? :wink: I mean, a slight drop in quality might mean a significant drop in size. I don't think there are any other codecs that would have hardware support on Raspberry Pi, so anything else will probably be too heavy for the CPU.
Author
Owner

@Saku241 commented on GitHub (Jul 25, 2020):

Don't record with quality set quite as high as 100%? 😉 I mean, a slight drop in quality might mean a significant drop in size.

I don't think there are any other codecs that would have hardware support on Raspberry Pi, so anything else will probably be too heavy for the CPU.

If I put a value under 100%, it starts to drop frames due to compression and a more cpu usage

@Saku241 commented on GitHub (Jul 25, 2020): > Don't record with quality set quite as high as 100%? 😉 I mean, a slight drop in quality might mean a significant drop in size. > > I don't think there are any other codecs that would have hardware support on Raspberry Pi, so anything else will probably be too heavy for the CPU. If I put a value under 100%, it starts to drop frames due to compression and a more cpu usage
Author
Owner

@zagrim commented on GitHub (Jul 25, 2020):

I haven't actually ever thought that 100% might somehow by-pass compression. Live and learn. Then again, my setup uses movie_passthrough option to completely avoid needing to encode on the Pi. If you don't need overlays (text or privacy masking by MotionEye) and you have a suitable camera it might also work for you, though.

@zagrim commented on GitHub (Jul 25, 2020): I haven't actually ever thought that 100% might somehow by-pass compression. Live and learn. Then again, my setup uses `movie_passthrough` option to completely avoid needing to encode on the Pi. If you don't need overlays (text or privacy masking by MotionEye) and you have [a suitable camera](https://motion-project.github.io/motion_config.html#movie_passthrough) it might also work for you, though.
Author
Owner

@Saku241 commented on GitHub (Jul 25, 2020):

I haven't actually ever thought that 100% might somehow by-pass compression. Live and learn. Then again, my setup uses movie_passthrough option to completely avoid needing to encode on the Pi. If you don't need overlays (text or privacy masking by MotionEye) and you have a suitable camera it might also work for you, though.

Also I don’t understand because when I switch on movie passthrought on MotionEye I still get videos with text overlay and such things.

And as I read this documentation, this should work with my camera because I need to put « v4l2_palette=8 »

But I’ll try again

@Saku241 commented on GitHub (Jul 25, 2020): > I haven't actually ever thought that 100% might somehow by-pass compression. Live and learn. Then again, my setup uses `movie_passthrough` option to completely avoid needing to encode on the Pi. If you don't need overlays (text or privacy masking by MotionEye) and you have [a suitable camera](https://motion-project.github.io/motion_config.html#movie_passthrough) it might also work for you, though. Also I don’t understand because when I switch on movie passthrought on MotionEye I still get videos with text overlay and such things. And as I read this documentation, this should work with my camera because I need to put « v4l2_palette=8 » But I’ll try again
Author
Owner

@zagrim commented on GitHub (Jul 25, 2020):

The Motion configuration document I linked should give all the details to be able to successfully use movie passthrough, I think. Did you also notice that the camera "must be specified using the netcam_url parameter and the v4l2 prefix"?

@zagrim commented on GitHub (Jul 25, 2020): The Motion configuration document I linked should give all the details to be able to successfully use movie passthrough, I think. Did you also notice that the camera "must be specified using the `netcam_url` parameter and the `v4l2` prefix"?
Author
Owner

@Saku241 commented on GitHub (Jul 25, 2020):

The Motion configuration document I linked should give all the details to be able to successfully use movie passthrough, I think. Did you also notice that the camera "must be specified using the netcam_url parameter and the v4l2 prefix"?

URL to use if you are using a network camera, size will be autodetected. Available prefixes to the URL:

How should I use it ? Since I don’t use a network camera it’s directly using USB on my Pi

I tried in the « Extra Motion Option »
I put this

v4l2_palette=8
netcam_url=V4L2:///dev/video02

But it seems when I add the line « netcam_url » my v4l2 palette is now ignored

EDIT: I managed to make movie passthough working but now it’s even bigger files size

@Saku241 commented on GitHub (Jul 25, 2020): > The Motion configuration document I linked should give all the details to be able to successfully use movie passthrough, I think. Did you also notice that the camera "must be specified using the `netcam_url` parameter and the `v4l2` prefix"? ``` URL to use if you are using a network camera, size will be autodetected. Available prefixes to the URL: ``` How should I use it ? Since I don’t use a network camera it’s directly using USB on my Pi I tried in the « Extra Motion Option » I put this ``` v4l2_palette=8 netcam_url=V4L2:///dev/video02 ``` But it seems when I add the line « netcam_url » my v4l2 palette is now ignored **EDIT:** I managed to make movie passthough working but now it’s even bigger files size
Author
Owner

@Saku241 commented on GitHub (Jul 25, 2020):

Ok I found a solution at this problem

• I need to remove the movie passthought because It gives me too bigger files but the frame rate is amazing. (Approx. 5MB/s)

• I put again H264/OMX but I reduced the movie quality to 70%. The frame rate is worse than 100% (like approx. 8 fps) BUT the size is about 0.7MB/s !

So I guess I need to sacrifice some FPS to a much smaller video size, that sounds logic but still...

@Saku241 commented on GitHub (Jul 25, 2020): Ok I found a solution at this problem • I need to remove the movie passthought because It gives me too bigger files but the frame rate is amazing. (Approx. 5MB/s) • I put again H264/OMX but I reduced the movie quality to 70%. The frame rate is worse than 100% (like approx. 8 fps) BUT the size is about 0.7MB/s ! So I guess I need to sacrifice some FPS to a much smaller video size, that sounds logic but still...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/motioneye#1726
No description provided.