How: FullHD video > JPG > 4G > FTP server

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Maybe anyone tried to make autonomous video cam system ?
Say: single-board Linux PC + 4G GSM router + video camera + JPG frames from the stream + uploading them to a FTP server.
And remote control via API from own server.

Like CN IP cameras, now there are many 4G models, with Cloud remote control, but, they seem, all are buggy, according to the reviews.
I guess, it's better to build some open-source system based on well-known modules (SBC)...
 

Sandman

Expert
Licensed User
Longtime User
You're not thinking 25 frames per second, or anything like that, right?
 

peacemaker

Expert
Licensed User
Longtime User
Sure, say 0.2 FPS would be OK
 

peacemaker

Expert
Licensed User
Longtime User
For ex.:
1) VPS hosting with own B4J server app: remote control API of cameras
2) Linux SBC with attached camera module
3) some 4G-module for SIM-card, or maybe ready 4G-LAN-router
4) Linux B4J app that: gets JPG-frames from camera, sends them to a FTP server, pings VPS admin API, gets commands\settings
5) All settings are to be customizable
 

Sandman

Expert
Licensed User
Longtime User
Ok, well this project seems easy so I'll give it a shot to get you started.

1. Get a Raspberry Pi (model probably doesn't matter too much) and a nice webcam.

2. Install Debian. (You could do this with many different Linux distros, I'm picking Debian because that's what I've used for many years and feel comfortable with it.) Here's a guide:

3. Install fswebcam to take webcam image from command line:
Bash:
sudo apt-get install fswebcam

4. Install curl to send image by FTP to server:
Bash:
sudo apt-get install curl
(It's probably installed by default, I can't remember.)

5. Figure out how to solve your connectivity, using an USB dongle or whatnot. I'll leave this one to you.

6. Make small bash script: (https://linuxhandbook.com/bash/)
- Take image (https://www.systutorials.com/docs/linux/man/1-fswebcam/)
- Upload image (https://everything.curl.dev/ftp/upload)
- Delete image (https://linuxize.com/post/how-to-remove-files-and-directories-using-linux-command-line/)

7. Add script as a cron-job to run every minute.

Done.
 

Sandman

Expert
Licensed User
Longtime User

Now you're adding extra constraints and requirements, which doesn't make me overly happy after I wrote my answer above. I hope it helped a bit anyhow.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can use mjpeg for the video streaming.


The advantage of mjpeg is that it is simple to implement and you don't need a special client.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…