Recent

Author Topic: Streaming video to a web client?  (Read 2524 times)

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Streaming video to a web client?
« on: January 15, 2021, 04:16:51 pm »
Hello, I want to stream video to a webclient, like firefox.
I have a program, that captures a Image from a usb camera. Also I can capture image at some rate.
It's working on linux. My program is based on Sdpo components.

But I'm not how to start to stream the video to webclient. I have a mess on my head. I think I have to program a webserver, but I don't know who I can serve video. I was looking samples of webserver, but all of then serves Html, with text and image.

Or maybe I have to programa a RTSP server. Or a webGL....

I'm not sure if I explain my problem.
Thanks
/BlueIcaro

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Streaming video to a web client?
« Reply #1 on: January 15, 2021, 06:13:14 pm »
I'm not sure I'm a good person to comment, but I think that the questions you have to ask yourself are (a) frame rate and (b) client capabilities.

I did it /years/ ago and worked on the basis of a plain client- potentially with JavaScript disabled- pulling updated JPEGs from security cameras every second or so. These days I think there's probably /lots/ of server and client software that will do this, noting in particular things like ZoneMinder and for that matter VLC.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

benohb

  • Full Member
  • ***
  • Posts: 213
Re: Streaming video to a web client?
« Reply #2 on: January 17, 2021, 12:02:54 pm »

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: Streaming video to a web client?
« Reply #3 on: January 18, 2021, 10:19:16 am »
Motion jpeg
https://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP

Thanks you that's what I need. Because my program will run in Linux embedded system without GUI.

Do you have some examples to take a look?

Thanks
/BlueIcaro

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Streaming video to a web client?
« Reply #4 on: January 21, 2021, 07:32:23 am »
hello,
Because my program will run in Linux embedded system without GUI.
what is your linux embedded O.S ? can you install packages like  nginx ? ffmpeg ? vlc ? on it.
what is the cpu of your O.S ?

Friendly, J.P
« Last Edit: January 21, 2021, 07:33:59 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

af0815

  • Hero Member
  • *****
  • Posts: 1288
Re: Streaming video to a web client?
« Reply #5 on: January 21, 2021, 08:28:27 am »
Maybe gstreamer is a soloution. So a Lazarus/FPC programm is only controlling gstreamer and gstrreamer handle the rest in the background. This soloution can work on all plattforms with gstreamer.
regards
Andreas

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: Streaming video to a web client?
« Reply #6 on: January 21, 2021, 09:21:21 am »
Hi, I working on a Jetson Nano from Nvidia, with Ubuntu 18.04. But without GUI.
https://developer.nvidia.com/EMBEDDED/jetson-nano-developer-kit

@Jurassic Pork I didn't try to install that package. But I going to try it.

@af0815 I didn't know that library. I going to take a look. Thanks

For the moment I found some links that may be can help it. I'm working with them:
https://stackoverflow.com/questions/25653820/delphi-indy-streaming-http-server
https://stackoverflow.com/questions/2060953/httpwebresponse-with-mjpeg-and-multipart-x-mixed-replace-boundary-myboundary
https://stackoverflow.com/questions/33287437/how-to-stream-a-motion-jpeg-using-owin-katana?noredirect=1&lq=1

/BlueIcaro




Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Streaming video to a web client?
« Reply #7 on: January 22, 2021, 02:47:35 am »
hello,
you can try also motion. you can find it in the Ubuntu packages :
Quote
Motion is a highly configurable program that monitors video signals from many types of cameras.
Set it up to monitor your security cameras, watch birds, check in on your pet, create timelapse videos and more.
Create videos or save pictures of the activity
Passthrough recording from many IP cameras
View live stream of cameras
Invoke scripts when activities occur
Log activity into multiple types of databases
Fully customizable masks for privacy or motion detection
Full tls(https) support with authentication for webcontrol and streams
Use Motion with many types of devices
Network cameras via RTSP, RTMP and HTTP
PI cameras
V4L2 webcams
Video capture cards
Existing movie files
it has a http server to stream video and you can see video in a browser.
Example of configuration file motion.conf in the attachments (i have replaced webcam input with a sample mp4 file)
chrome browser display in attachments.
be carefull. Check if motion doen't write too much on the storage device (  may be a sd card killer)
Friendly, J.P

Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

 

TinyPortal © 2005-2018