Giter VIP home page Giter VIP logo

Comments (16)

roflcoopter avatar roflcoopter commented on May 10, 2024 2

I have just learned about this project and have not yet tried it out (using ZoneMinder currently, but very interested in viseron), but if I may add: an unmodified stream with minimal delay would be great. My usecase would be to stream the video to a Nest Hub when someone rings the doorbell. To be compatible with various camera and display models I can imagine to have multiple configuration options:

  • forward original stream from the camera (useful when using VLANs and the display shouldn't be allowed to directly communicate with the camera / view the original stream)
  • raw or transcoded original stream to specific format depending on the used display (rtsp, mjpeg, mp4, hls etc.)
  • modified stream with options like the objects, masks, custom resolution, output stream format (again rtsp, mjpeg...) etc.

So essentially a way to take whatever input data is available and display it with the least amount of consumed resources, ideally without any transcoding if camera and display share the format, and transcoded if one of the two doesn't match.

Edit:
Thinking about it, I think it would be nice to do most of this using query parameters. Something like http://viseron.local/camera1/stream?format=mjpeg&original=1 or http://viseron.local/camera1/stream?format=webm&objects=1.

Thanks for showing interest in Viseron! And thanks for the input.
Right now i have the basics down, using query parameters as you described.
However no transcoding is dine right now and its only in mjpeg format. But i feel the transcoding part would be a good addition in the future.

I am sorry this has taken so long to implement, I have had a lot going on with work lately. I do have some vacation now before and after christmas so i will post a new beta with a first implementation of this, problably monday or tuesday

from viseron.

roflcoopter avatar roflcoopter commented on May 10, 2024 2

A first version of this is now available in 1.8.0b1

from viseron.

mario-tux avatar mario-tux commented on May 10, 2024 2

@mario-tux May I ask you how you are sending the stream to the Google Nest device?

I use catt (https://github.com/skorokithakis/catt) to cast a custom HTML page (+JS) that show all my cameras (using MJPEG).

from viseron.

roflcoopter avatar roflcoopter commented on May 10, 2024 1

Yes this is probably a good idea @mruettgers, heres what im thinking:

cameras:
  - name: Front Door
    mjpeg_streams:
      - endpoint: my-mjpeg-stream
        draw_objects: true

And then the stream would be accessible at http://ip:port/front-door/my-mjpeg-stream

from viseron.

roflcoopter avatar roflcoopter commented on May 10, 2024 1

Latest beta release now improves a lot upon this idea.
Static mjpeg streams as suggested by @mruettgers is now available, see here for more information.

There are also more options to process the stream, rotate and mirror as suggested by @danielperna84

from viseron.

roflcoopter avatar roflcoopter commented on May 10, 2024

Yepp this is a fair feature request. I am already drawing the frames, but sending them to MQTT to be consumed in Home Assistant. Shouldnt be too much work to just restream it to MJPEG instead

from viseron.

akohlsmith avatar akohlsmith commented on May 10, 2024

Do either of you have a neat trick for grabbing and decoding the images sent over MQTT? I can do it manually but perhaps there's an easy utility that I'm not aware of?

from viseron.

roflcoopter avatar roflcoopter commented on May 10, 2024

Just a question on this, right now i draw objects, motion, zones and masks on the image sent to Home Assistant over MQTT. Is this desired here aswell or do you expect to see the frames unedited?

Also the image sent over MQTT is only sent after either the motion detector or object detector has processed a frame, is this okay or do you expect to see every frame? This would cause problems with drawing motion/objects since not every frame is analyzed

from viseron.

mario-tux avatar mario-tux commented on May 10, 2024

It would be nice to have it configurable. If enabled, it should be enough to have "drawn" only the analyzed frames (blinking effect).

from viseron.

roflcoopter avatar roflcoopter commented on May 10, 2024

Great then I know what to work with, thanks!

from viseron.

danielperna84 avatar danielperna84 commented on May 10, 2024

I have just learned about this project and have not yet tried it out (using ZoneMinder currently, but very interested in viseron), but if I may add: an unmodified stream with minimal delay would be great. My usecase would be to stream the video to a Nest Hub when someone rings the doorbell. To be compatible with various camera and display models I can imagine to have multiple configuration options:

  • forward original stream from the camera (useful when using VLANs and the display shouldn't be allowed to directly communicate with the camera / view the original stream)
  • raw or transcoded original stream to specific format depending on the used display (rtsp, mjpeg, mp4, hls etc.)
  • modified stream with options like the objects, masks, custom resolution, output stream format (again rtsp, mjpeg...) etc.

So essentially a way to take whatever input data is available and display it with the least amount of consumed resources, ideally without any transcoding if camera and display share the format, and transcoded if one of the two doesn't match.

Edit:
Thinking about it, I think it would be nice to do most of this using query parameters. Something like http://viseron.local/camera1/stream?format=mjpeg&original=1 or http://viseron.local/camera1/stream?format=webm&objects=1.

from viseron.

danielperna84 avatar danielperna84 commented on May 10, 2024

One more thing that came to my mind that would be nice as a query parameter: rotation and mirroring / flipping the image. Sometimes it's not possible to mount the camera in the direction that would match the display. So it would be nice to be able to do that as well. πŸ‘

from viseron.

mruettgers avatar mruettgers commented on May 10, 2024

Works like a charm πŸ‘.
Thank you!

@mario-tux May I ask you how you are sending the stream to the Google Nest device?

from viseron.

mruettgers avatar mruettgers commented on May 10, 2024

The streams of my cameras are working without any problems so far, but in my opinion, it would be better to define the parameters of the streams in the config file, because then we can feed the clients out of the same queue after post-processing the stream. Right now the CPU load increases every time a new client requests the stream. A better approach would be the use of a buffer that is used to feed all of the requests without the need of doing post-processing for each client.
Alternatively the query parameters can be hashed to build a buffer for each unique combination of parameters.

from viseron.

akohlsmith avatar akohlsmith commented on May 10, 2024

Not re-opening, just a question about whether it's possible to "layer" video with ffmpeg -- i.e. unedited image as the base layer, with the bounding box/etc. on another layer and have the video player select the base stream or the base+drawing stream? I'm sufficiently inexperienced with ffmpeg and video streaming in general to know if this is a dumb question. :-)

from viseron.

roflcoopter avatar roflcoopter commented on May 10, 2024

I guess it could be done, the problem would lie in trying to sync them up properly.

What's your use case? Are the MJPEG streams not sufficient since they only show "processed" frames?

from viseron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.