Closed khseal closed 6 years ago
I don't think it is currently possible to have RTSP server running and doing image capture.
This is bad =( I understand that are using one and the same program in both cases.
Yes, but the camera device is blocked after you start the stream. The device can be used only by one application at a time.
I propose this solution. Works when v4l2rtspserver-master running and when not running. https://kszere.gitbooks.io/xiaomi-dafang-api/content/en/action/getsnaphot.html
Can you please submit your Version of avconv to the public? :) In my opinion the best way would be to merge your changes with the original repo, so we don't have too many steps to get a fully working dafang - the Things you did are fantastic, so why don't integrate them in the main hack?
I not compiled avconv, this make by @Jhyrachy Please see here (download)
Ah, sorry. I must have been blind. So I'll update my plans for the Weekend :) Thanks! :)
Okay. I think we first have to make the http-segmentation configurable. I managed to get a proper picture from the mjpeg. But when trying to fetch a single frame from the h264-stream I get only garbage. When I disable segementation, everything is fine. For my personal use-case I'm fine with mjpeg and the segmented h264-stream breaks even my vlc - but I want to have a nice solution enabling people to use the feature without accessing the console (hmkay, let's say "working" - i definitely can't design anything in html and my code is sometimes working, but not really nice :)
At this moment I think about:
Okay, included all these in my newest commit.
Hey everyone,
I released a new Version, which is capable of creating a JPEG-Snap when running in MJPG-Mode. It doesnt stop the stream, its just using IPC to transfer the binary image.
I assume that creating a JPEG-Snap when running on H264 is also possible, but it needs some tweaking.
About your commit @shinebar1001: Many thanks, but i need to refactor the code before merging it. There are some issues with the changed structure.
Okey, i managed to create "both" streams at the same time. Now you can stream with H264 and get a Image. Still need some solution for the nightvision mode.
Also there is now a possibility to have some kind of OSD on the Camera. Many thanks @nik0
Excellent, everything works. Need to automatically switch to black and white mode ...
Great news here!
@EliasKotlyar
About your commit @shinebar1001: Many thanks, but i need to refactor the code before merging it. There are some issues with the changed structure.
No worry! If it helps you I can try to do that as well. Otherwise I would start to make the OSD configurable.
@EliasKotlyar, new binary v4l2rtspserver-master not works with -W
and -H
param
Hello @kszere,
Thanks for poiting out. There was a bug when chaging the resolution. Now it should work fine, i uploaded a new Version which resolve this issue.
Greatings Elias
@EliasKotlyar Thanks for the quick resolution. Quick related question: will running it with the above settings be enough to have 1920x1080?
@pplucky : Yeah, it should work. I tested it few minutes ago. Its required that you have a custom bootloader for running in FULLHD.
@EliasKotlyar I found more info about it here, but the last comments mention lag in the stream. Does this really happen or it was already solved?
@EliasKotlyar
Okey, i managed to create "both" streams at the same time. Now you can stream with H264 and get a Image. Still need some solution for the nightvision mode.
Great release! I just did some testing, the quality of the h264-Stream is now 100% like the mjpeg-stream, with 10% of the bandwith. So in most environments there is no need for the MJPEG Stream anymore. Thank you very much!
@EliasKotlyar can you commit new version support -W
and -H
param?
Hello @kszere ,
Sorry, i forgot to commit it to the right branch. Now it should be fine.
Greating Elias
Sometimes the image contains artifacts below.
Closing this as it should be solved in principle. Open a new issue if the artefacts persist.
Problem get image after start mjpeg