Date: Sat, 5 Dec 2020 06:12:35 +0300 From: Anatoly <anatoly@kazanfieldhockey.ru> To: freebsd-ports@freebsd.org Subject: Re: replacing ffserver? Message-ID: <20201205061235.6d847252@asd2> In-Reply-To: <24522.44593.292701.122459@jerusalem.litteratus.org> References: <24521.30595.80033.88955@jerusalem.litteratus.org> <CAJuc1zM=G7TbuuF8MDO_YgdzxDudV_PNYJZN5Og60EGgroQRPQ@mail.gmail.com> <24521.46760.296586.537444@jerusalem.litteratus.org> <20201204075132.7fd3fee4@asd2> <24522.44593.292701.122459@jerusalem.litteratus.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 4 Dec 2020 16:46:25 -0500 Robert Huff <roberthuff@rcn.com> wrote: > Let me restate the issue. > My goal is to be able to have someone visit (e.g.) > "https://webcam.example.com:9999" and have the feed from the webcam > appear in their browser. > What I have at the moment: > > a) a system running: > > FreeBSD 13.0-CURRENT #0 r365372: Sun Sep 6 10:51:26 EDT 2020 amd64 > > b) a working webcam > c) the latest version of webcamd, which finds the webcam and > creates video0 and video1. > > So: I need to make the contents of video0 available on port > 9999. I have been unable to find a concise current method for how to > do that. (Including anything with Apache, which seems like an obvious > step.) > > > Respectfully, > > > Robert Huff > Again, simplest thing to try is multimedia/vlc. In that setup browser will pull and play single "endless video file" from server. Web server is vlc built-in. Fo this to work vlc must be built from port with options set [X] VORBIS [X] VPX Start from GUIMenu: Media->Capture Device->(choose your device). Choose "Stream". Tick "display lically" to be able to preview camera image in vlc vindow. Next -> HTTP -> Add Check/enter listening port number and url Next -> choose "VP80 + Vorbis (webm)" Write down generated command line transcoding parameters. Press "Stream" and point web broeser to ip:port/url See if it works or not. Do some adjustments, try again (turn off sound encoding? scale? fps? bitrate?) When everything is ok, start it without GUI (cvlc) with transcoding parameters you wrote previously. There is need to add input and output specification to command line however. So it may be look like cvlc -vvv "v4l2:///dev/video1" --sout "#transcode{vcodec=VP80,vb=800,acodec=none}:std{access=http,mux=webm,dst=0.0.0.0:8080}" I streamed webcamera 24/7 on the wild internet for a 6 months in 2012 similar way. I've used not webm/Vp8, but asf/msmpeg4, support of which was abandoned in all browsers somwere around 2014. So streaming today as I've done that is impossible. Again, other way is to use HLS. This should be more compatible, but more complex. I never tryied this myself, so can't give ready receipe. But Google returns some if I searching "ffmpeg HLS apache" "ffmpeg HLS nginx". For ex. first of them https://www.bogotobogo.com/VideoStreaming/ffmpeg_http_live_streaming_hls.php Idea behing that is ffmpeg will capture video and compress to h264, packing it into "mpegts" container, writing many short *.ts files into web directory, from where web server serves it. Also ffmpeg updates single "playlist m3u8" file there. Web browser (java script on page) pulls "playlist" and plays files one by one as new files appear. Old may be deleted. I think there's no OS specific except ffmpeg must be built with [X] X264 or [X] OPENH264 or both -c:v openh264 is way faster than -c:v libx264, but may be somehow more glitchy.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201205061235.6d847252>