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

Raspberry Camera Module/Webcam #315

Closed
xraceweb opened this issue Nov 23, 2013 · 20 comments
Closed

Raspberry Camera Module/Webcam #315

xraceweb opened this issue Nov 23, 2013 · 20 comments

Comments

@xraceweb
Copy link

Hey there,

I´ve working Octoprint with my i3 and Marlin Firmware very Nice. Thanks for this great Job :)

Now I´ve added Support for Timelapse, and used a Logitech Webcam. This works really nice when i call the url manually.
But not, in Octoprint. Settings are done as described ..

Branch: Master Commit: f62e868

How to configure to see the Timelapse in Octoprint ?!

Another Question: Is it possible to use the Official Pi Camera Module for Webcam ?!

Thanks :)

@foosel
Copy link
Member

foosel commented Nov 24, 2013

What happens instead of the camera being shown? How does the webcam section in you config.yaml look like and how are you accessing the cam when it does work?

Raspicam is also supported when using Liam Jackson's fork of mjpg-streamer. This is already bundled in the latest OctoPi image and should work there out of the box (plug in the raspi cam when the Pi is powered off, power on, done).

@xraceweb
Copy link
Author

config.yaml:

webcam:
ffmpeg: /usr/bin/avconv
snapshot: http://127.0.0.1:8080/?action=snapshot
stream: http://192.168.1.119:8080/?action=stream
watermark: true

if i´m using my logitech webcam, i can acces the stream (only Safari and Firefox, Chrome just don´t work) when i´m pointing the browser to http://192.168.1.119:8080/?action=snapshot or http://192.168.1.119:8080/?action=stream

This works using the external Webcam and Safari or Firefox.

In Octoprint nothing works, with Timelapse ..
"Timelapse Mode: Off" <- can´t change it ..

I am using the latest OctoPi image .. :/

Thanks
Mike

@foosel
Copy link
Member

foosel commented Nov 26, 2013

Are the lines ffmpeg etc really on the exact same line as the webcam: statement or is this just a formatting issue? As weird as it sounds, this is important. The way it looks up there, OctoPrint wouldn't be able to see the configuration, as it's supposed to look something like this:

webcam:
    ffmpeg: ...
    snapshot: ...
    stream: ...
    watermark: true 

What does "Settings > Webcam" show?

On the control tab, do you get a broken image above the controls, or do you just get nothing there?

@xraceweb
Copy link
Author

Yes, the lines are exact as i wrote in the last post. So one Tabulator should fix this issue ?!

"What does "Settings > Webcam" show?

On the control tab, do you get a broken image above the controls, or do you just get nothing there?"

Exactly. Later today i will try to fix the formatting issue .. hope this helps.

by the way: i have tested the camera module: pi off -> connect camera module -> pi on -> camera module´s led is red -> nothing to see in any browser .. even if i point to ..

@foosel
Copy link
Member

foosel commented Nov 26, 2013

No tabs, it must be spaces! YAML doesn't like tabs, so just use four spaces... or just copy and paste the following:

webcam:
    ffmpeg: /usr/bin/avconv
    snapshot: http://127.0.0.1:8080/?action=snapshot
    stream: http://192.168.1.119:8080/?action=stream
    watermark: true 

FYI, you can also configure all this via the settings dialog, it will take care of the proper format, that will probably be waaay faster than fumbling around in config.yaml (which is why it's there).

When the camera module's led turns red that's already helpful, means it probably got detected correctly.

Are you running your own Raspberry Pi image or are you running OctoPi?

@xraceweb
Copy link
Author

Ok.
I´ve copied it from your post. Webcam -> Settings shows exactly what i type in, what in the config.yaml is and what you have posted.

I´m running OctoPi, latest Version.

But nothing happens to the Timelapse Tab, broken image above the controls appears still ...

@xraceweb
Copy link
Author

Wait. I´ve rebootet the Pi a few times, and now i cant activate timelapse in the "Timelapse" Tab :)

I´ve set it to Time, 5 sec. Should i see now a Picture ?!

Pointing the Browser (any) to the URL of snapshot or stream still don´t do anything, although the led is red ..

@MaverickVG
Copy link

Hi,
I have also a problem concerning the webcam. I have to use the YUV mode to get an image according to the WIKI:

./mjpg_streamer -i "./input_uvc.so -y" -o "./output_http.so"

If I run this command, I have to keep the terminal open, otherwise the server stops working (which I can understand). Is it possible to add the "-y" parameter somwhere that when the Pi reboots the right operation is performed to start the server without the need to do this manually and keep the terminal open?

Thank you!

@foosel
Copy link
Member

foosel commented Nov 28, 2013

@xraceweb You should see a picture in the control tab even without setting up a timelapse.
I'd actually suggest making a backup of your current SD image and try getting everthing to work with a fresh install of this version of OctoPi, because at least I right now have no way to determine what you modified when and what is the outcome of this. @guysoft what would be the correct version for him to install if he wants the most recent version + raspicam support? I'm a bit unsure right now which is why I ask you...

@MaverickVG Custom self-installed image or OctoPi?

@MaverickVG
Copy link

I used OctoPi but updated mjpeg-streamer!

@guysoft
Copy link
Contributor

guysoft commented Nov 28, 2013

@MaverickVG What version of OctoPi? Use 0.7.5

@MaverickVG
Copy link

where can I get the installed OctoPi version?

@foosel
Copy link
Member

foosel commented Nov 29, 2013

What does cat /etc/octopi_version say?

@MaverickVG
Copy link

sorry for my late reply, but I have the printer in my office and not at home...

I use octopi Version 0.7.5!

@guysoft
Copy link
Contributor

guysoft commented Dec 2, 2013

@MaverickVG Where did you install the new mjpeg-streamer? it might be clashing with the one already there.
Also note I haven't tested the updated one. I can build an updated OctoPi and see if that one works for you.

@MaverickVG
Copy link

Thanks @guysoft , this would be great!

@guysoft
Copy link
Contributor

guysoft commented Dec 8, 2013

@MaverickVG Try this: http://docstech.net/OctoPiMirror/2013-09-25-wheezy-octopi-0.7.6.zip
** Release candidate if you say this works well **

@MaverickVG
Copy link

Hi, i tried 0.7.6 and installed it, but my webcam doesn't work. Trying to enable YUV mode manually works, but after a reboot i have to trigger it again and let the terminal open...

@guysoft
Copy link
Contributor

guysoft commented Dec 12, 2013

@MaverickVG How do you enable YUV mode?
Try following these instructions: guysoft/OctoPi#14 (comment)

@MaverickVG
Copy link

yes, thanks! Adding -y on the right position solved my problem!

@foosel foosel closed this as completed Jan 5, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants