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

HTTP MPEG Stream #539

Closed
AustinSaintAubin opened this issue Jul 2, 2018 · 22 comments
Closed

HTTP MPEG Stream #539

AustinSaintAubin opened this issue Jul 2, 2018 · 22 comments

Comments

@AustinSaintAubin
Copy link

Any chance that MPEG streams could be implemented?
https://github.com/jacksonliam/mjpg-streamer

@jmtatsch
Copy link
Collaborator

jmtatsch commented Jul 2, 2018

We already have functionality for streaming mjpg in https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/master/firmware_mod/bin/mJpegStreamer . What are you missing?

@AustinSaintAubin
Copy link
Author

Tried, after killing the other streaming processes.....
Every time I would start mJpegStreamer 10, the Wyzecam V2 would lockup.

@AustinSaintAubin AustinSaintAubin changed the title MPEG Stream HTTP MPEG Stream Jul 3, 2018
@AustinSaintAubin
Copy link
Author

'mJpegStreamer' provides an mpeg streams over RTSP.

I need an MPEG stream over HTTP, like what mjpg-streamer is able to do. Its similar to what is done with https://CAMERA-IP/cgi-bin/currentpic.cgi but constantly refreshes based on settings.
Similar to how these streams behave.
Stream needs the option to be over HTTP, not HTTPS.
Here are some sample steams.

@mcheah
Copy link

mcheah commented Jul 17, 2018

Seconding this feature request.
Looking to use this camera as a cheap wifi cam for Octoprint. Octoprint currently only supports http mjpg streams, directly embedded in their web interface, explicitly not RTSP.
I may look into this myself. Is the video interface accessible as a normal video4linux device? Is there a method for compiling directly on the device? Or is cross-compilation the only method for creating code?

@SomebodySysop
Copy link

I create an h.264 rtsp stream from my wyzecam v2 to my iSpy video surveillance server. Then, in iSpy, I create an mjpeg over http stream: https://www.ispyconnect.com/userguide-live-feeds.aspx

@AustinSaintAubin
Copy link
Author

@SomebodySysop I am looking for something more native... that does not require another application just to get an mpeg stream. But thanks for the info.

@AustinSaintAubin
Copy link
Author

Trying a work around to Restream RTSP to M-JPEG.
But I cannot get it to work with the camera... tested H264 RTSP, and MJPEG RTSP streams.

@kalazzerx
Copy link

I am also interested in this feature - in order to connect to https://www.actiontiles.com/ as a tile on my smartthings interface.

@stale
Copy link

stale bot commented May 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 19, 2019
@stale stale bot closed this as completed May 26, 2019
@jneilliii
Copy link

I'd like this thread to be revisited. Native mjpg over http IMO would be efficient and a welcome addition to the project. Like @mcheah mentioned, being able to use this CFW on a Wyze 2 Cam with OctoPrint would be a huge benefit.

@jokesters
Copy link

I've been trying to get this to work with octoprint for a while now.

@redpizza69
Copy link

Just flashed a Neos camera to use with Octoprint... and then read this after I couldn't get it to work.

+1 for mjpg over http.

Anybody found a solution yet?

@jneilliii
Copy link

There are some posts on the octoprint community forum that are basically reencoding the stream using VLC or ffmpeg, but in that situation you still introduce lag.

@crackers8199
Copy link

add me as a +1 for adding this, if possible. i have been unable to get rtsp to work reliably on my phone over openvpn.

right now, i have this running on a server at home re-encoding the RTSP stream...

https://github.com/eroji/rtsp2mjpg

doesn't seem to be much (if any) lag, and stream seems solid so far on my phone (while the H264 RTSP stream viewed in tinycam pro crashes often when i'm connected via VPN). the downside (to me) is that in addition to needing an always on machine to do the re-encode, i can't move the camera from the active stream, since there's no setting for it using a generic camera. having this available natively from the camera would be a huge improvement and a great addition to the firmware.

@jmtatsch
Copy link
Collaborator

Why dont you just stop the H264 RTSP and start the MJPEG RTSP?

@crackers8199
Copy link

crackers8199 commented Feb 27, 2020

I haven't been able to get the mjpeg streamer to work. Even when trying to connect on my home network i have no picture...plus, i don't know if the issue is rtsp itself or h264. If it's rtsp that is the issue, using the mjpeg streamer wouldn't make a difference anyway since it's still going via rtsp...

@jmtatsch
Copy link
Collaborator

You need to shut down the h264 server first. Also check your autostarts.

@crackers8199
Copy link

crackers8199 commented Feb 27, 2020

You need to shut down the h264 server first. Also check your autostarts.

I have done that. I've tried it multiple times, each time shutting down the h264 first. Mjpeg doesn't work. There was an issue that seemed to indicate it is known it doesn't work, but isn't important to fix because h264 works...I'll try to find it but I'm on my phone so it might be tough.

edit: here are several issues that discuss this in one form or another...

#767

#670

#19

@crackers8199
Copy link

can someone re-open this issue? either that or explain how to get MJPG RTSP streaming to work? if it's supposed to work i'm doing something wrong, because i've been trying for weeks and have never been able to get a video feed when using the MJPG RTSP server...

@mathewgreen
Copy link

Yes, this would be awesome! This would be the prefect solution if we could get native HTTP MJPG.

@JamesSimpson
Copy link

I too am interested in this if it could be added.

@drug123
Copy link

drug123 commented Oct 15, 2021

For all OctoPrint users (@crackers8199 @AustinSaintAubin @redpizza69 @mcheah @jneilliii etc.) - you can have a nice workaround for getting it to work with your printer which does not require any transcodings. You basically need to do two things to make it work:

  1. Remove login requirement from /cgi-bin/currentpic.cgi You can do it by modifying /config/lighthttpd.conf on SD card (just find section starting with "# Support letsencrypt SSL cert paths" and replace with code below):
# Support letsencrypt SSL cert paths
# (we don't want to upgrade to SSL nor auth' this path)
$HTTP["url"] !~ "^/.well-known/(.*)|^/cgi-bin/currentpic.cgi" {

	$HTTP["scheme"] == "https" {
		auth.backend				= "htdigest"
		auth.backend.htdigest.userfile = "/system/sdcard/config/lighttpd.user"
		auth.require = ( "/" => ("method" => "basic", "realm" => "all", "require" => "user=root"))
		alias.url = ( "/viewer" => "/system/sdcard/DCIM/" )
		$HTTP["url"] =~ "^/viewer($|/)" { server.dir-listing = "enable" }
	}

I've added |^/cgi-bin/currentpic.cgi over there in regexp to disable password request for getting snapshots.
2. Use https://micam.local/cgi-bin/currentpic.cgi in your Webcam snapshots section (use whatever hostname/IP you have instead micam.local), and also install SnapStream plugin and point it to https://micam.local/cgi-bin/currentpic.cgi

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

No branches or pull requests