xl97
Posts: 126
Joined: Thu Jan 12, 2017 3:34 pm

ArduCam, RPi 3B & Adobe Flash

Mon Jan 14, 2019 1:24 am

Hey gang-

Looking for some feedback/advice on what I may be doing wrong (or if this is not possible at all?)

I am -not- well versed in RPi/CLI stuff (or anything Linux based to be fair)...and I recently just got an ArduCam for my RPi 3B.

I see that the Chromium browser does in fact support the old Adobe Flash technology (flash player plugin)..

Im an old Flash developer (I understand its dead now).. but would this (Adobe Flash) coupled with an RPi and webcam, would be a perfect for a project I have also wanted to do.

When I open Chromium and go to some URL's that have Adobe Flash objects embedded in them.. they work just fine (after enabling the prompts...etc)..

However, when some of these Flash apps that are supposed also work with a webcam,.. I am not getting a prompt to enable my camera via browser alert (you need to grant permission, not just enabled in raspi-config)...

*The above should display the webcam 'feed'.. and allow me to add overlays..etc..etc over the displayed video/display..

I am wondering if anyone who is much more knowledgeable in this area can help me troubleshoot this.

1.) Can Adobe Flash work with an ArduCam.. or any PiCam type of device that connects to the camera port? Or does this need to be a 'legit' webcam type of peripheral, that is connected to a USB port (with appropriate drivers)...??

2.) Maybe it can/will work.. but I need to install some sort of drivers for this ArduCam? I literally just connected it, enabled it raspi-config.. and ran this line via CLI:

raspistill -o testshot.jpg

I saw the 'display' of the camera show on the monitor, seemed to take a 'shot'.. then left me at the desktop again. (not sure where the image was saved to? or how to check it out?)


If anyone cares to test themselves in order maybe provide some help/direction/advice..

Here are two URL's to check out:

https://www.onlinemictest.com/webcam-te ... obe-flash/

When I go to the above.. I get the FLASH object displaying some text saying it cant detect my camera.

Here is a quick demo/attempt I whipped up to see if anything happens (it works?)..

http://dmstudios.net/misc/RPi_camera_test/

I get the overlay/animation... but no camera feed/prompt to allow it to turn on/start running.

So.. is it because I am doing something wrong?

Does anyone have a USB based 'webcam' they can see if one of the above links works for them?

Any feedback to get this sorted is much appreciated!


Thanks!
-xl

ethanol100
Posts: 581
Joined: Wed Oct 02, 2013 12:28 pm

Re: ArduCam, RPi 3B & Adobe Flash

Mon Jan 14, 2019 8:56 am

For this to work, you first need to load the v4l2 driver using:

Code: Select all

sudo modprobe bcm2835-v4l2
This will create a standard camera interface(it creates a device called /dev/video0) which the flash plugin can use.

If I went to the first side you posted, I needed to click the lock left of the address field and activate flash. After reloading the site, the flash player and then chrome ask for the permission to use the camera. And the image then appears.

It does not work in your second link. Flash asked for the camera, but chromium does not. I'm not sure why.

xl97
Posts: 126
Joined: Thu Jan 12, 2017 3:34 pm

Re: ArduCam, RPi 3B & Adobe Flash

Mon Jan 14, 2019 1:06 pm

THANK YOU!

And thank you for verifying the links..

I'll look at the example "I" created.. (it was an old .fla... not sure if re-compiling/publishing will make a difference... but I have hope now.. and confirmation)

I will give the driver install a shot tonight when I get home from work!

Appreciate the time... and the driver install command!!

xl97
Posts: 126
Joined: Thu Jan 12, 2017 3:34 pm

Re: ArduCam, RPi 3B & Adobe Flash

Tue Jan 15, 2019 2:45 am

I installed the driver, and you are correct the 'online' test URL does work for me as well..

But mine does NOT still..

I am using AS2, and publishing using the Adobe CS5 suite.. (not sure what the other guy is using.. but ti definitely works repeatedly!!)

I noticed that if you right click on both places where the camera display should be and go to SETTINGS.

The working one has a CAMERA entry: mmal service 16.1

Mine: I have no camera entry displayed/empty

Posting for the community but also if anyone has any feedback/suggestions.

update:

posted a quick AS3 version (not my area of expertise to say the least).. and still the same results..

no camera entry in the SETTINGS of the Flash movie/app.. but the other page DOES have an entry and works!! What am I missing here? HAHA..

I feel like its in front of my face but I just cant see it! :)


Looks like his embedded Flash movie/camera test app was made in Adobe Flash CS6 version.. (I have that at work).. and perhaps is an AS3 app?

ethanol100
Posts: 581
Joined: Wed Oct 02, 2013 12:28 pm

Re: ArduCam, RPi 3B & Adobe Flash

Tue Jan 15, 2019 7:28 am

I guess it could be a different problem. The test side is using https and your side only uses http. I could imagine that chromium does not allow access to mic and camera when using an insecure connection. Would it be possible to serve your website using https?

ethanol100
Posts: 581
Joined: Wed Oct 02, 2013 12:28 pm

Re: ArduCam, RPi 3B & Adobe Flash

Tue Jan 15, 2019 9:00 am

Yes, if I just try your example with https instead of http, it shows the camera image. It is definitively the http which disallow the usage of the camera.

xl97
Posts: 126
Joined: Thu Jan 12, 2017 3:34 pm

Re: ArduCam, RPi 3B & Adobe Flash

Tue Jan 15, 2019 1:05 pm

Ahh... nice to know! I didnt even catch that!

I have an SSL certificate on my domain too.. (I need to set it up!)

Also..

(odd question)..


I cant even get the HTTPS URL to work again? (only that one time)..

Do I need to install the drivers again? (everytime?)

Is there a way to check to see if its still installed? The HTTPS URL says no camera detected when I go to it now..



SIDE NOTE:

While I am testing my project by checking out the embedded flash app ON-LINE.... in the end.. I am hoping to have this saved LOCALLY on the RPi itself...

(I have not tested this yet) will it not work? There will be NO https internally/locally obviously.....will there not be any restrictions running locally then? (another test for tonight I guess! LOL)

I need to figure out why the HTTPS url is not working for me anymore though!! (no camera detected)...

ethanol100
Posts: 581
Joined: Wed Oct 02, 2013 12:28 pm

Re: ArduCam, RPi 3B & Adobe Flash

Tue Jan 15, 2019 1:48 pm

Yes, you need to load the kernel module each time the systems starts.
The main reason is that only one program can access the camera. If the camera is using the v4l2 driver, raspistill and co won't work.

You can however, if you don't want to use raspi* programs, add this to the list of modules, which are loaded automatically at boot time.
For this you need to add a line "bcm2835-v4l2" to the file /etc/modules. Something like this will add the module to /etc/modules, if it does not contain it.

Code: Select all

sudo sh -c 'grep "bcm2835-v4l2" /etc/modules || echo "bcm2835-v4l2" >> /etc/modules'
To check if your module is loaded you can execute "lsmod" in a terminal windows. This will list all loaded kernel modules and if the driver is loaded bcm2835-v4l2 will be listed there. If you want to remove the module again, you can use "sudo rmmod bcm2835-v4l2".

I think the easiest to run this locally, will be to install a web server on the raspberrypi which will serve the program locally via https. A self signed certificate will be fine for this case.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6687
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: ArduCam, RPi 3B & Adobe Flash

Tue Jan 15, 2019 1:54 pm

ethanol100 wrote:
Tue Jan 15, 2019 1:48 pm
The main reason is that only one program can access the camera. If the camera is using the v4l2 driver, raspistill and co won't work.
Not true. The V4L2 driver unloads everything whenever the file handle is closed, so at that point you can run raspistill/vid.
It is true that if V4L2 and another application try accessing the camera simultaneously, then the second application will fail.

The main reason not to load it permanently was that it does takes some firmware memory due to keeping an instance of the camera, video_encode, and image_encode comnponents around whilst loaded. There's been some work recently to reduce that overhead, so actually with 4.19 we will be loading the driver by default.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

xl97
Posts: 126
Joined: Thu Jan 12, 2017 3:34 pm

Re: ArduCam, RPi 3B & Adobe Flash

Tue Jan 15, 2019 3:07 pm

Thank you for the replies guys! (really appreciate it)

So to re-cap:

1.) Yes I do need to load the driver each time
or
2.) I can add it the modules file, so it will permanently be there, each time my RPi boots up (there are some downside to this though? taking up firmware memory?.. Is that really that bad?) For this 'project'.. it would need to always load by default.. (its for a prop, and there wont be any time/way to fiddle with things to set this up).. can someone elaborate on the CONS of this a bit more for me please? :)

I already have LAMP installed/set-up..etc.. (but I'm not sure how I would make my own self-signed cert?)

Thanks for the commands/lines to check on the driver..etc will be helpful to ensure things are working (or why they arent) :)

So for my tests.. I can just force HTTPS on my own files/domain, (ensure the driver is installed/running).. and I can continue on with development, until I get to working how to do all this LOCALLY..


I'll post back tonight on things go! Thanks again.

ethanol100
Posts: 581
Joined: Wed Oct 02, 2013 12:28 pm

Re: ArduCam, RPi 3B & Adobe Flash

Wed Jan 16, 2019 10:15 am

6by9 wrote:
Tue Jan 15, 2019 1:54 pm
Not true. The V4L2 driver unloads everything whenever the file handle is closed, so at that point you can run raspistill/vid.
It is true that if V4L2 and another application try accessing the camera simultaneously, then the second application will fail.

The main reason not to load it permanently was that it does takes some firmware memory due to keeping an instance of the camera, video_encode, and image_encode comnponents around whilst loaded. There's been some work recently to reduce that overhead, so actually with 4.19 we will be loading the driver by default.
Is there any documentation about this other then the module source and the one thread in this forum? I searched for some easy documentation to link to and did not find anything. It would be great if someone with knowledge would write some easy documentations ;)

This would reduce wrongly informed posts... 8-)

xl97
Posts: 126
Joined: Thu Jan 12, 2017 3:34 pm

Re: ArduCam, RPi 3B & Adobe Flash

Wed Jan 16, 2019 6:03 pm

Another step in the project.. (forced https now)

Hoping to set things back up again and test on my project files now!

*last step here (outside of developing the actual project that the camera will be working with)... learning to set up/implement a 'self signed certificate' on my LOCAL install of LAMP that is installed on the RPi!

Any links/tuts on this out there? I'm not to familiar with self-signed certs... and just followed some directions on how to install my comodo cert (which was pretty easy.straight forward... the .htacces updates dealing with the sub-domains was the hardest part of that) haha


Return to “Camera board”