Streaming video to a web client? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- BlueIcaro · 2021-01-15 15:16 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 · 2021-01-15 17:13 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 ---------------------------------------------------------------------- benohb · 2021-01-17 11:02 Motion jpeg https://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP ---------------------------------------------------------------------- BlueIcaro · 2021-01-18 09:19 Quote from: benohb on January 17, 2021, 12:02:54 pmMotion 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 · 2021-01-21 06:32 hello, Quote from: BlueIcaro on January 18, 2021, 10:19:16 amBecause 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 ---------------------------------------------------------------------- af0815 · 2021-01-21 07:28 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. ---------------------------------------------------------------------- BlueIcaro · 2021-01-21 08:21 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 · 2021-01-22 01:47 hello, you can try also motion. you can find it in the Ubuntu packages : QuoteMotion 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 filesit 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