-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4l2multi_stream_mmal low res mjpeg to frontend #2128
Conversation
@popoviciri I have just pushed a change to v4l2multi_stream_mmal mjpeg bitrate option. Previously the specified mjpeg bitrate was used directly in the mjpeg encoder which is very different from the mjpeg output stream bitrate. Now the mjpeg bitrate actually sets the output bitrate, and the internal mjpeg encoder bitrate is calculated from mjpeg_bitrate*video_framerate/mjpeg_framerate, and it's clipped at a maximum of 25Mbps. Unfortunately, this affects your PR, which sets the default mjpeg bitrate at 2000000. A new default of 800000 is a good start. Sorry about that. |
Thanks @jasaw. I changed the defaults and consolidated the values across the two files. |
let "GOP=$((video_framerate))*2" | ||
raspimjpeg_opts="${raspimjpeg_opts} --intra $GOP ${mjpeg_opts}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably check whether intra
is specified in raspimjpeg.conf
file before setting a default of framerate*2
because line 94 will pick up the intra
config.
@@ -59,7 +59,7 @@ | |||
('incandescent', 'Incandescent'), | |||
('flash', 'Flash'), | |||
('horizon', 'Horizon'), | |||
('greyworld', 'Greyworld') | |||
('greyworld', 'Greyworld') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nitpick... I would remove the trailing spaces.
This PR looks good. I like the idea of defaulting the Thanks for your hard work ! |
@popoviciri I have reverted |
- check whether intra is specified in raspimjpeg.conf; if NOT, then intra = 2 * framerate - check is v4l2loopback module is loaded before trying to remove it
Hi @jasaw. This is in fact your work. I merely made minor changes to what you already pushed here. Anyway, I made the required changes and added a check for v4l2loopback module before calling rmmod. Thanks again! |
PR looks good. @ccrisan Have you reviewed this PR? |
Looks good to me. Let's have it merged :) |
This PR simply brings the mjpeg options in the frontend, when using FNC
v4l2mmal_multi_stream
app written by @jasaw. These aremjpegbitrate
,mjpegwidth
,mjpegheight
andmjpegframerate
complementing #2120. A screenshot:Recommended merging order
streameye.sh
I couldn't resist).Looking forward to have this implemented upstream.
Cheers!