On RaspPi3, switched from on board video cam to USB with VLC, how change command line code?

About encoding, codec settings, muxers and filter usage
grandkodiak
New Cone
New Cone
Posts: 1
Joined: 20 Nov 2022 13:13

On RaspPi3, switched from on board video cam to USB with VLC, how change command line code?

Postby grandkodiak » 20 Nov 2022 13:26

Hello all, I've had no luck in the pi or arducam (camera manufacturer) forum with any responses so figured I'd go right to the source.

I have a raspi that had the ribbon cable camera that I use as a security cam. Right now it works fine with a script that starts up automatically that uses VLC to put the stream to port 8083 via http so with port forwarding, I can access it very easily anywhere I can install VLC again. Anywho, the low light performance is terrible, so I saw the same company offered a lolight version but its USB. I can't figure out how to get VLC to stream that to 8083 now. The original code used raspivid which does not support USB access.


raspivid -o - -t 0 -w 1280 -h 720 -fps 30 | cvlc -vvv stream:///dev/stdin --sout ‘#standard{access=http,mux=ts,dst=:8083}’ :demux=h264


the codes I've tried to replace it with so far finding via interweb searches seem to be close but no cigar.


cvlc v4l2:///dev/video0:chroma=h264 --sout :standard{access=http,mux=ts,mime=video/ts,dst=:8083}

(this starts to run but it reports 1 line back and doesnt proceed past it:
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)


cvlc v4l2:// :v4l2-dev=/dev/video0 | cvlc -vvv stream:///dev/stdin --sout ‘#standard{access=http,mux=ts,dst=:8083}’ :demux=h264

(this starts a VLC instance and shows the camera video, but there is nothing being broadcast to 8083, plus i imagine having the video being shown in a VLC instance on the pi the entire time would kill the already iffy frame rate with a second remote viewing)


cvlc v4l2:///dev/video0:chroma=h264 | cvlc -vvv stream:///dev/v/stdin --sout '#standard{access=http,mux=ts,mime=video/ts,dst=:8083}' :demux=h264

(this starts a vlc instance like above too but no stream but shows below:)
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
libEGL warning: DRI2: failed to authenticate



any help would be greatly appreciated, i'm not savvy on command lines beyond copying what i see any making adjustments to the obvious.

thank you!

ps. if it matters,its arducam 1080p low light wdr cmos imx291, from the box: number x002hzmsph ub020201
and shows up as "Bus 001 Device 004: ID 0c45:6366 Microdia" on lsusb. the camera is definitely working, and using the VLC gui app I can see video by selecting the capture device or the 1 code above that. i also tried using the gui vlc stream guide but that wasnt working either and it doesnt let you select a port. i tried putting in the dst=:8083 in the code it generates for you and without, but still didnt work. it would show the video in vlc, but no stream starts that i could find even at 8080 which i read was the default.

cryypt
New Cone
New Cone
Posts: 2
Joined: 23 Feb 2023 20:56

Re: On RaspPi3, switched from on board video cam to USB with VLC, how change command line code?

Postby cryypt » 23 Feb 2023 21:10

You may wish to try libcamera since they are deprecating the raspicam utilities.

This is what I've been using to stream rtsp:

libcamera-vid -t 0 --inline -o - | cvlc stream:///dev/stdin --sout '#rtp{dst=192.168.1.18,port=8554,sdp=rtsp://192.168.1.18:8080/cam.sdp}' :demux=h264

be sure to use raspberry pi's version of libcamera: git clone https://github.com/raspberrypi/libcamera.git
and the libcamera apps: git clone https://github.com/raspberrypi/libcamera-apps.git

caveat 1: you will need to build these. the docs on pi site are good. beware, that if you have an existing version of libcamera or libcamera-dev on the pi. you may have problems when building the libcamera apps as cmake will find the other version first. look in /usr/lib for a libcamera file or in /usr/include. try uninstalling or reflash pi from scratch was my solution, then build libcamera before installing/building any other stuff that uses the cam (cmake finds the right version in this scenario)

caveat 2: i'm running ubuntu 22.10 on a pi4, not the Pi OS (which may not really be a problem)


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 10 guests