Skip to content
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

DietPi-Software | Raspimjpeg does not stream mjpeg with Lighttpd #1747

Closed
fieldOfView opened this issue May 4, 2018 · 10 comments
Closed

DietPi-Software | Raspimjpeg does not stream mjpeg with Lighttpd #1747

fieldOfView opened this issue May 4, 2018 · 10 comments
Assignees

Comments

@fieldOfView
Copy link

fieldOfView commented May 4, 2018

Creating a bug report/issue:

When installing raspimjpeg (package 59) with Lighttpd as the webserver, streaming mjpeg does not work. Getting jpeg stills in rapid succession (the "default stream" option) does work. Streaming mjpeg does work well when selecting nginx as the webserver preference.

Required Information:

  • DietPi Version 6.7
  • SBC: RPi ZeroW
  • Power supply 5v 1A offbrand
  • SD card used 8Gb class 10 offbrand
  • Distro: Stretch (4.14.34+ 1110 Mon Apr 16 14:51:42 BST 2018 armv6l GNU/Linux)

Additional Information (if applicable):

  • Software title raspimjpeg (59: RPi Cam Control)
  • This issue can be replicated on a fresh installation of DietPi

Steps to reproduce:

Open the rpicam webpage in a browser (and see the camera stream working)
Go to System and press "mjpeg stream"

Expected behaviour:

An mjpeg stream should be received by the client one frame at a time from a single http connection

Actual behaviour:

No data is arriving at the client, and after a while the client times out (if it is well-behaved)

Did you submit a dietpi-bugreport?

No

Extra details:

This is an upstream issue between raspimjpeg and lighttpd, some more information can be had here:
https://www.raspberrypi.org/forums/viewtopic.php?t=63276&start=4250#p1210885

For DietPi, this is mostly a documentation issue. Since selecting the raspimjpeg package in the dietpi-software already pops up a dialog, that dialog could include a warning about the incompatibility and an advisory to use nginx (or apache?) instead.

@Fourdee
Copy link
Collaborator

Fourdee commented May 5, 2018

@fieldOfView

Many thanks for the report 👍

We'll open for investigations.

@Fourdee Fourdee added this to the v6.8 milestone May 5, 2018
@Fourdee Fourdee self-assigned this May 5, 2018
@Fourdee Fourdee modified the milestones: v6.8, v6.9 May 6, 2018
@Fourdee
Copy link
Collaborator

Fourdee commented May 6, 2018

Moved to 6.9 so we can focus on 6.8 wrap up and release.

@Fourdee
Copy link
Collaborator

Fourdee commented May 24, 2018

Confirmed bug, apologies for the delay @fieldOfView. We'll investigate and resolve.

@Fourdee
Copy link
Collaborator

Fourdee commented May 24, 2018

Notes:

  • https://elinux.org/RPi-Cam-Web-Interface:
    By default the system generates the live preview as a continuous set of captured images as this has maximum browser compatibility. MJPEG streaming may be selected but this may not work on all browsers.

@fieldOfView
Copy link
Author

Yes, repetitive jpeg “faux-streaming” works fine. I am using raspimjpeg as an alternative to mjpegstreamer for an OctoPrint instance, and that requires mjpeg streaming.

@Fourdee Fourdee modified the milestones: v6.9, v6.10 Jun 4, 2018
@Fourdee
Copy link
Collaborator

Fourdee commented Jun 14, 2018

https://github.com/jacksonliam/mjpg-streamer/blob/master/mjpg-streamer-experimental/plugins/input_raspicam/README.md
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=45178

🈯️

G_AGI subversion libraspberrypi-dev cmake libjpeg8-dev build-essential imagemagick libav-tools libv4l-dev
wget https://github.com/jacksonliam/mjpg-streamer/archive/master.zip -O package.zip
unzip package.zip -d /opt
cd /opt/mjpg-streamer-master/mjpg-streamer-experimental
export LD_LIBRARY_PATH=.
make -j $(nproc --all)
make install

#Camera must be stopped in RPi cam control web interface.
./mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so -x 1280 -y 720 -fps 15"

http://IP:8080
image

@Fourdee
Copy link
Collaborator

Fourdee commented Jul 16, 2018

Moving this out of milestone for the following reasons:

  • Low priority. Does not effect usage of RPi cam software currently.
  • This is an additional feature request, which requires further investigations at a later date when time permits.

@Fourdee Fourdee modified the milestones: v6.12, Known/Outstanding Issue Jul 16, 2018
@MichaIng MichaIng changed the title Dietpi-software: Raspimjpeg does not stream mjpeg with Lighttpd DietPi-Software | Raspimjpeg does not stream mjpeg with Lighttpd Oct 14, 2018
@MichaIng
Copy link
Owner

MichaIng commented Jul 7, 2019

@fieldOfView @Fourdee
This should be retested with the new Raspbian Buster-based image: #2935 (comment)
It was not an issue with some older Jessie-based image (checking the linked RPi forum thread), so it is not a general issue with Lighttpd.

@MichaIng MichaIng modified the milestones: Known/Outstanding Issue, v6.26 Jul 7, 2019
@MichaIng
Copy link
Owner

MichaIng commented Aug 11, 2019

@fieldOfView
I just found by chance that the extended device tree has some mjpeg support.
Could be tested with:

G_CONFIG_INJECT 'start_x=' 'start_x=1' /DietPi/config.txt
reboot

... ähm otherwise this should have been set already when enabling the Pi cam. Regardless worth to assure that it is enabled, and test with new Buster image, now life as default download for RPi.

@MichaIng
Copy link
Owner

I have no RPi camera to test, but generally it should work with Lighttpd (now), as the web interface and it's own installer is actively developed and has a Lighttpd block.

I updated our install code to especially use the dedicated Stretch-compatible raspimjpeg binary on Stretch systems, but otherwise it looks good. Would be awesome if someone with an RPi camera module could test it, but I mark this issue as closed now. Please open a new issue if anything does not work or any feature is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants