You are not logged in.
I hope this was the correct place to post this.
Recently I bought a few cheap small wired cameras off of amazon. I want to wire these into my one rat snake's enclosure. I can hook them to a(n) USB capture card I have, and I would like to configure arch linux to utilize them.
I would like to be able to stream the enclosure at any point, but I would not like it to constantly be actively streaming. As in, I only want the camera hardware running when I, or someone else, logs in to watch. I don't want unnecessary wear on my hardware. I'm also not going to go through any streaming services. I want to embed the stream directly onto a webpage on the systems own webserver. Not many people are going to use it. Me, my cousin, maybe my mother though she doesn't really like the snakes lol.
I know, to start I need to install arch on my host, and then set up the web server. That's not too difficult. I've done it in the past, but apart from that I really don't know where to go. Has anyone done anything similar to this?
I understand that there are super easy ways to do this, but I am also trying to use this as a self teaching tool for myself. I am comfortable using arch, and linux in general, but I still have a lot to learn in it. Being in Computer Science and a very hands on learner, I feel that setting up this system would teach and improve on some skills that will be useful to me in a professional setting. In the past when I would use arch I wouldn't have much of a goal with it. I would have it installed and then be like "Okay, now how do I advance in this??? I need a damn goal." Now I have a goal.
If anyone can point me in the right direction that would be wonderful. Any bit of information is useful.
Offline
This is not exactly Arch specific. You'll end up with an HTML file with some Javascript. You're basically setting up a bunch of webcams. I googled "put webcam stream on html page" and got a number of simple results.
https://www.npmjs.com/package/livecam ??
Last edited by Awebb (2021-03-06 01:27:05)
Offline
Not really a web page but I would do it this way :
First just run a succesfull stream (without the 'on demand' feature) using ffmpeg or vlc for streaming.
Viewing this stream with VLC.
Second : Implement an on-demand feature with some kind of hooks to triger up the streaming script when a connection is done.
Maybe with a script listening on the socket or some kind of iptables/nftable rules.
The advantage is you do not have to manage stream with some kind of web bloat. But maybe it is just because I hate web technologies, or maybe I'm just too into *minimalism / bare metal* mentality
(edit : it remove the pain of setting up a web server and npm modules, and struggling with html and css and browser compatibility and responsive design. Wanna watch a stream ? Use a software design to watch video / send video like vlc)
Last edited by Aeredren (2021-03-09 10:02:11)
Offline
Have a look at the community/motion package.
Offline
Second : Implement an on-demand feature with some kind of hooks to triger up the streaming script when a connection is done.
Maybe with a script listening on the socket or some kind of iptables/nftable rules.
I think this functionality might be built into systemd. I know that by enabling sshd.socket it won't actually start the sshd-service until a connection is received. Might be the same with httpd.
Basically the httpd doesn't run unless until someone attempts to connect, and I think it should stop when there are no more active connections.
Offline