This PC has a usb webcam (ID 093a:2468 Pixart Imaging, Inc. SoC PC-Camera) which can viewed with vlc.
Cheese does not even recognize this webcam!
First tried to setup (c)vlc to try to get a http stream for OctoPrint.
CLI command that does send http-video, although not seen by octoprint:
Code: Select all
cvlc v4l2:///dev/video0 :v4l2-standard= :sout="#transcode{vcodec=h264, vb=400, scale=2}:http{dst=:8002/stream.wmv}"
Next command is from
https://community.octoprint.org/t/using ... eeds/46439
Code: Select all
cvlc -v v4l2:///dev/video2:width=640:height=480:chroma=yuyv:fps=15 --sout '#transcode{vcodec=mp2v,acodec=none,fps=15,sfilter=marq{file=bed.txt,size=-2,color=16776960}}:rtp{mux=ts,sdp=rtsp://:8888/live.sdp}'
Changing this to my config:
Code: Select all
cvlc -v v4l2:///dev/video0:fps=25 --sout '#transcode{vcodec=mp2v,fps=25}:rtp{mux=ts,sdp=rtsp://:8002/stream.spd}'
Does not work, not even rtsp to another PC, from cvlc to vlc.
Too much options to find the right one, you must be lucky to get it working.
Sometimes NEED to restart VLC and do exactly the same gives different results?
Logs do NOT show why.
The only one I get working is PC to PC by http-video from cvlc, but octoPrint does not recognize it locally.
Had ones rtp://@:5004 working (PC to PC), but unable to reproduce?
What a stupid way to setup vlc-stream, as the config-setup looks to create others?
But both ways do work with cvlc? It's hard to understand their underlaying code.
And now we only get the following message:
-
SDP required:
A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96).
-
some other options:
Code: Select all
:sout=#transcode{vcodec=h264,vb=400,scale=Auto,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:rtp{dst=192.168.117.160,port=5004} :no-sout-all :sout-keep
We have it working!!!
https://github.com/jacksonliam/mjpg-streamer/issues/248
Has the answer, find (the right)
v4l1compat.so:
It might give you something like
/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so
if you find then use the full path to try loading it:
Code: Select all
export LD_PRELOAD=PUT_PATH_HERE/v4l1compat.so
Then try running your tests again.
With ./mjpg_streamer -i "./input_uvc.so -r 352x288 -fourcc RGB24" -o "./output_http.so -p 8002"
Had to perform this first on CLI:
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so
Following the steps further from
https://community.octoprint.org/t/setti ... ebian/2337
And make sure you use/change the right USER in all the files, if not using it on Raspberry.
Now the camera server is like the OctoPrint Server automatically started and can also be stopped and started by the OctoPrint Menu.
DG.