Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For your 'Potential Features' item 'Webcam Stream' #27

Open
deepcoder opened this issue Sep 6, 2022 · 0 comments
Open

For your 'Potential Features' item 'Webcam Stream' #27

deepcoder opened this issue Sep 6, 2022 · 0 comments
Labels
suggestion New feature or request

Comments

@deepcoder
Copy link

Not a problem report, just some input. First, thank you for your work on this project, a helpful add on to OctoPrint!

For your 'Potential Features' item 'Webcam Stream' :

My work is still in progress, however I mashed up a first version of displaying the output of your program on the video streams I have from two webcams on my AnyCubic Kobra printer. I struggled to get the webcam daemon that OctoPrint uses to display video. So moved to VLC's command line tool cvlc. I added the overlay of some of the data out of your program to the two feeds. Two 640 by 480 video feeds at 15 fps keep a Raspberry Pi 3 4 core at about 60% utilization while OctoPrint is printing. I still have work to do. Below is two examples of cvlc displaying your data and the requisite bash scripts generating the data from your octoprint-cli print status command. I am currently running each of the four tasks in individual tmux sessions. Note, you need to install your app, gawk and vlc on your OctoPrint machine. Good hunting!

#put in tmux session
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}'

#put in tmux session
cvlc -v v4l2:///dev/video0:width=640:height=480:chroma=yuyv:fps=15 --sout '#transcode{vcodec=mp2v,acodec=none,fps=15,sfilter=marq{file=endo.txt,size=-2,color=16776960}}:rtp{mux=ts,sdp=rtsp://:8889/live.sdp}'

# put in tmux session
watch -n 5 "octoprint-cli print status | gawk -F':' '/Extruder Temp: /{print strftime(\"%H:%M:%S \"), \$0; exit}' > endo.txt"

# put in tmux session
watch -n 5 "octoprint-cli print status | gawk -F':' '/Progress: /{print strftime(\"%H:%M:%S \"), \$0; exit}' > bed.txt"

cvlc_example_01

@deepcoder deepcoder added the suggestion New feature or request label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant