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

Present mjpeg stream instead of h264 #56

Open
ghost opened this issue Jan 16, 2019 · 4 comments
Open

Present mjpeg stream instead of h264 #56

ghost opened this issue Jan 16, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 16, 2019

I have a project where I would like to present the video as mjpeg over http. I know the info is in the Onvif standard how to do this. But its alot of info to go thru.
Perhaps someone here could point out some directions or fill in some additional info?

@RogerHardiman
Copy link
Collaborator

The starting point is GetProfiles and GetProfile.
Look at the XML that these return.

They return a Video Profile which ties up 3 other data structures
VideoSourceConfiguration (eg the camera and the camera resolution)
VideoEncoderConfiguration (eg H264 or MJPEG)
PTZConfiguration (PTZ related stuff)

So you will need to adapt the VideoEncoderConfiguration to describe some MJPEG capabilities.

Then you will need to sort out the RTSP server so it streams mjpeg video.

@RogerHardiman
Copy link
Collaborator

It would be really nice if we could implement H264 and MJPEG together. The problem currently is that we use the v4l2 driver for the Raspberry Pi cameras and that driver can only deliver h264 or mjpeg (and not both).
It would be nice if we could get raw YUV from the camera and then feed into a H264 encoder and a MJPEG encoder and stream both of those. It looks like that may be possible building on work from @Schwaneberg to use GStreamer as the video pipeline. I believe there are some GStreamer plugins to access the Pi Hardware H264 encoding so performance with HD could be maintained.
This could also get us a JPEG Snapshot (another ONVIF command) that is currently implemented by a ffmpeg hack.

But a starting point is probably a flag in rposConfig.json for H264 or MJPEG and then running one codec or the other.

@ghost
Copy link
Author

ghost commented Jan 16, 2019 via email

@Schwaneberg
Copy link
Contributor

Schwaneberg commented Jan 25, 2019 via email

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

2 participants