News:

LATEST RELEASE:  FPP 8.5.1 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/8.5

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 16904
Latest: polariska3@hotmail.com
New This Month: 20
New This Week: 5
New Today: 2
Stats
Total Posts: 135511
Total Topics: 16993
Most Online Today: 345
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 89
Total: 89

Video Capture and Output to Matrix

Started by Kensington Graves, April 26, 2020, 09:07:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CaptainMurdoch

Quote from: Kensington Graves on June 18, 2020, 01:51:01 PMPretty sure that I did.  I'll re-verify, but the "unused space on sd card" banner is absent from the UI.  That's usually the first thing I do after imaging and booting.

What does the About page show for free space?
-
Chris

Kensington Graves

#61
Disk Utilization
Root Free Space:NaN B ( 0%)
Media Free Space:NaN B ( 0%)

This is on a RPi that has nothing but FPP loaded (and some plugins) and a 32GB card.

ETA: The File Manager page now warns that the storage device is almost full.  I checked the logs tab.  fppd.log.1 is 6.78GB (yes, that's GIGAbytes), /var/log/syslog is 9.98GB.  I'm guessing that's where all the space has gone.  I don't know where/if FPP stores the image previews I took, but I can guess they'd take up a decent amount of space if they're stored.

I also got the following from fppd.log (the regular one):
2020-06-18 05:56:08.187 (11464) src/v4l2Capture.cpp:222: v4l2_ioctl() failed: No such device
2020-06-18 05:56:08.187 (11464) src/v4l2Capture.cpp:222: v4l2_ioctl() failed: No such device

And the following from /var/sys/

Jun 18 05:59:07 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 735 messages lost due to rate-limiting
Jun 18 05:59:15 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 728 messages lost due to rate-limiting
Jun 18 05:59:26 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 524 messages lost due to rate-limiting
Jun 18 05:59:58 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 510 messages lost due to rate-limiting
Jun 18 06:00:04 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 546 messages lost due to rate-limiting
Jun 18 06:00:36 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 514 messages lost due to rate-limiting
Jun 18 06:00:43 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 600 messages lost due to rate-limiting

Kensington Graves

So I reimaged the offending FPP with the v4.0 image released last week, expanded the file system, and reinstalled plugins.  This is what I got after the git clone:

Building FPP on 'Raspberry Pi' platform
ccache g++ -fpch-preprocess -O3 -Wno-psabi -pipe -I /opt/fpp/src -fpic -DPLATFORM_PI -I. -std=gnu++2a  -c src/v4l2Capture.cpp -o src/v4l2Capture.o
ccache g++ -shared  src/FPP-VideoCapture.o src/v4l2Capture.o -L/opt/fpp/src -lfpp -lv4l2  -o libfpp-VideoCapture.so
/usr/bin/ld: src/FPP-VideoCapture.o: file not recognized: file truncated
collect2: error: ld returned 1 exit status
make: *** [Makefile:17: libfpp-VideoCapture.so] Error 1
{"Status":"Error","Message":"Could not properly install plugin"}

CaptainMurdoch

Quote from: Kensington Graves on June 18, 2020, 04:44:06 PM
Jun 18 06:00:43 FPP-MegaMatrix rsyslogd: rsyslogd[internal_messages]: 600 messages lost due to rate-limiting

Something is spamming the logs, I'm assuming it is the plugin and that you took out the camera while the plugin was still setup and the video device doesn't exist anymore.  I put in some more error handling in the plugin and just pushed the new code, can you pull in the latest plugin updates?
-
Chris

Kensington Graves

It's working now.  Something was different this time: the image preview window size matched the camera resolution.  In all prior attempts, the preview window was fixed at the default 160x120.  

Here's what I did from last night to this morning:

1. Reimaged the RPi with the new v4.0 image released 6/12/2020
2. Plugged camera into USB port
3. Inserted uSD card and booted.
4. Expanded file system; rebooted.  Set up static IP and DNS; rebooted.
5. Installed Matrix Tools plugin, Message Queue Aggregator plugin, Message Queue to Matrix Overlay.  Restarted fppd.
6.  Attempted to install the Video Capture plugin and got the message in post #62.  Rebooted and found that Video Capture appeared in my list of installed plugins.  I deleted it and reinstalled without issue.  However, the plugin still didn't work last night.
7. Saw your post this morning and looked at the updated code.  Felt like a dog trying to read Attic Greek.
8. Uninstalled all the plugins, rebooted, then reinstalled them one at a time with reboots in between each.
9. Installed the video capture plugin last and rebooted.  When I went to the plugin's configuration page, and it was auto configured at 640x480 30FPS, and all other options default, although Channel Output Thread was "force on", and that's not the former default state of that option.

10.  I clicked the "capture frame" button and in two seconds my ugly mug appeared in the preview window.  I've snapped over a dozen captures in the last hour and they appear to work fine.

Next I need to either (a) get a ColorLight card running and try it on a matrix, or (b) see if I can get it running on the BBB running the octoscroller.

Thanks for getting it fixed!

CaptainMurdoch

Quote from: Kensington Graves on June 20, 2020, 08:11:50 AMIt's working now.  Something was different this time: the image preview window size matched the camera resolution.  In all prior attempts, the preview window was fixed at the default 160x120. 

If you can reproduce the issue with the capture size not matching the preview size, take a screenshot of your setup page and I'll try to reproduce.  The preview should really match the capture since there is currently no scaling.  The output can use cropping though, so the output doesn't need to match the input exactly.  I am going to look at using GraphicsMagick++ to allow scaling the image, but I'm not sure how fast that will be on the Pi/BBB.
-
Chris

Kensington Graves

It may be OS/kernel related.  The preview was always at default size on the beta OS.  It only re-sized when I reimaged to the v4.0 production release and loaded your updated plugin this morning.

I'll image a Pi with the beta OS and see what happens.  Another RPi4 and SD card arrived today.

BBB re-imaged to 4.0 production release + updated plugin still does not find the camera on the plugin page even though it's detected on the USB port.  I can order another camera for the BBB and see if it's hardware related.  Unless Dan has a known-good camera he has tested.

If you're looking for more features on it, adjusting the crop frame with a mouse or finger instead of numeric values would be helpful.

Kensington Graves

I got lucky and one of my Pi's had your old plugin on it and a version of Master branch from about two weeks ago.  It's as close to the original system where the problem arose as I can get.

With the old beta OS build and your old plugin, FPP detected the camera but did not resize the preview window and would not snap a preview pic.   I've attached two screen shots from the "bad" system showing the plugin settings and the "about" page for that FPP.  While the plugin settings show "default" for Channel Output Thread, I did change it to "force on" but that did not fix it.

The third screenshot is from the "good" system showing it working as expected.

You cannot view this attachment.
You cannot view this attachment.
You cannot view this attachment.

dkulp

If you uninstall and then reinstall the plugin on the BBB, it might start working.   The problem was the script was not installing the command line tools that are needed to enumerate the devices and resolutions and such.  I've updated the plugin install script to make sure those are installed as well.
Daniel Kulp - https://kulplights.com

Kensington Graves

Thanks, Dan.  I uninstalled, rebooted, reinstalled, rebooted and went to the plugin page.  It looks identical to the first screen shot I posted above.  It will not take a preview image, and the preview window defaults to the small size.  It can be adjusted manually, but still does not capture a preview image.  Attached is a screenshot after manually adjusting the output size:

You cannot view this attachment.

CaptainMurdoch

Quote from: Kensington Graves on June 20, 2020, 09:48:47 PMIf you're looking for more features on it, adjusting the crop frame with a mouse or finger instead of numeric values would be helpful.

I have "adjusting with the mouse" on my ToDo list. :)  I want to use the same kind of logic in FPP itself to enhance the HTML5 canvas to add submatrix support to the LED Panel UI.

I made  note and will try to reproduce the preview image size issue here.
-
Chris

Kensington Graves

#71
I just reproduced the error noted in post #57 on my BBB.  Exact same series of events—after the plugin didn't work, I left it over night and decided to work on it this morning.  This morning I pulled the latest update to master branch, the update couldn't write because there is no space left on the device, fppd is now missing, and the logs are spammed up.  Screenshots attached.  The last shot is what I get when I try to load the plugin page.

You cannot view this attachment.
You cannot view this attachment.
You cannot view this attachment.
You cannot view this attachment.

CaptainMurdoch

Quote from: Kensington Graves on June 22, 2020, 07:02:44 AMI just reproduced the error noted in post #57 on my BBB.  Exact same series of events—after the plugin didn't work, I left it over night and decided to work on it this morning.  This morning I pulled the latest update to master branch, the update couldn't write because there is no space left on the device, fppd is now missing, and the logs are spammed up.  Screenshots attached.  The last shot is what I get when I try to load the plugin page.

Can you login and run the following and paste the results:

"tail /home/fpp/media/logs/fppd.log"
"sudo tail /var/log/syslog"
"sudo tail /var/log/messages"
-
Chris

Kensington Graves

Yep, will do in a couple hours when I get home.

Kensington Graves

#74
tail /home/fpp/media/logs/fppd.log

2020-06-22 02:33:42.569 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device
2020-06-22 02:33:42.569 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device
2020-06-22 02:33:42.569 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device 
2020-06-22 02:33:42.569 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device
2020-06-22 02:33:42.569 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device 
2020-06-22 02:33:42.569 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device
2020-06-22 02:33:42.569 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device
2020-06-22 02:33:42.570 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device
2020-06-22 02:33:42.577 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device
2020-06-22 02:33:42.578 (2485) src/v4l2Capture.cpp:246: v4l2_ioctl() failed: No such device

sudo tail /var/log/syslog

Jun 22 15:38:17 FPP systemd[13931]: Reached target Paths.   
Jun 22 15:38:17 FPP systemd[13931]: Reached target Basic System.
Jun 22 15:38:17 FPP systemd[1]: Started User Manager for UID 500.                           
Jun 22 15:38:17 FPP systemd[13931]: Reached target Default.       
Jun 22 15:38:17 FPP systemd[13931]: Startup finished in 444ms. 
Jun 22 15:38:17 FPP systemd[1]: Started Session 249 of user fpp.       
Jun 22 15:39:01 FPP CRON[13955]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)                                         Jun 22 15:39:01 FPP systemd[1]: Starting Clean php session files...                                         
]Jun 22 15:39:02 FPP systemd[1]: phpsessionclean.service: Succeeded.
]Jun 22 15:39:02 FPP systemd[1]: Started Clean php session files.

sudo tails /var/log/messages

Jun 22 05:51:38 FPP rsyslogd: rsyslogd[internal_messages]: 6311 messages lost due to rate-limiting
Jun 22 05:52:08 FPP rsyslogd: rsyslogd[internal_messages]: 6392 messages lost due to rate-limiting 
Jun 22 05:52:39 FPP rsyslogd: rsyslogd[internal_messages]: 6621 messages lost due to rate-limiting
Jun 22 05:53:38 FPP rsyslogd: rsyslogd[internal_messages]: 3330 messages lost due to rate-limiting
Jun 22 05:53:43 FPP rsyslogd: rsyslogd[internal_messages]: 5416 messages lost due to rate-limiting
Jun 22 05:53:44 FPP rsyslogd: rsyslogd[internal_messages]: 4723 messages lost due to rate-limiting                                                                                              Jun 22 05:53:49 FPP rsyslogd: rsyslogd[internal_messages]: 5003 messages lost due to rate-limiting
Jun 22 05:54:01 FPP rsyslogd: rsyslogd[internal_messages]: 4225 messages lost due to rate-limiting
Jun 22 05:55:08 FPP rsyslogd: main Q:Reg: worker thread 95f618 terminated, now 1 active worker threads [v8.1901.0 try [url="https://www.rsyslog.com/e/2439"][color=#00e000]https://www.rsyslog.com/e/2439[/color][/url] ]
Jun 22 05:55:08 FPP rsyslogd: rsyslogd[internal_messages]: 2311 messages lost due to rate-limiting

Just for fun, I ran lsusb.  The USB sees the camera.

Bus 001 Device 003: ID 05a3:9520 ARC International Camera
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Support FPP

+- Recent Topics

Falcon PiCap not working on FPP 8.3.1 by Poporacer
March 24, 2025, 05:36:12 PM

Virtual Display not working? by avarrassi
March 24, 2025, 02:29:34 PM

Interactive Mini golf using FPP? by Bwinter
March 24, 2025, 09:32:30 AM

Cheap Amazon pixel controller by MikeKrebs
March 23, 2025, 08:10:55 PM

Light Elf Bluetooth IP65 Laser by Kap10G
March 22, 2025, 12:45:02 PM

HA MQTT plugin for single model by s1godfrey
March 20, 2025, 08:21:46 PM

PixelOverlay-Clock - Revisited Again by jnealand
March 18, 2025, 06:00:53 PM

PixelOverlay-Clock.php works but I have questions... by datajack
March 18, 2025, 04:38:32 AM

Backup Feature not functional by efamlights
March 16, 2025, 11:58:28 AM

WS2811, Raspberry Pi 5, GPIO, could not initialize. by Ulysse-srfc24
March 16, 2025, 05:07:48 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod