I'm trying to use opencv4nodejs to serve webcam footage to a webpage encoded in base64
I can't reliably get opencv to poll the camera at more than 10fps. I believe this is due to performance reasons
I want to limit the size of the frame to help. I'm using
this.cvCap.set(cv.CAP_PROP_FRAME_WIDTH,300);
this.cvCap.set(cv.CAP_PROP_FRAME_HEIGHT,300);
But when I use these commands I get the following error
/home/brandonp/repos/nestwebcam/dist/webcam/webcam.service.js:30
const image = cv.imencode(".jpg", frame).toString('base64');
^
Io::Imencode - OpenCV Error: (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, in file /home/brandonp/repos/nestwebcam/node_modules/opencv-build/opencv/opencv/modules/imgcodecs/src/grfmt_base.cpp, line 145, status -10
(Use `node --trace-uncaught ...` to show where the exception was thrown)
I think the error is due to, your camera disconnected or not readable. Please check if your camera is working or not using the command raspistill -o testshot.jpg
Related
I am using a temprorary java file that has the .png suffix, when i pass this to the tess4j doOCR() method i get the error. I have checked mutltiple times the file format of the image being file being passed to the method and it is always a png file, not sure what else could be causing the error
This is the code i used.
def Tesseract t = new Tesseract()
t.setPageSegMode(8);
t.setDatapath("tessdata")
t.setTessVariable("tessedit_char_whitelist","ABCDEFGHIJKLMNOPQRSTUVWXYZ");
def result = t.doOCR(image).replace("\n", "")
This is the error i received
Caught: net.sourceforge.tess4j.TesseractException: java.lang.RuntimeException: Unsupported image format. May need to install JAI Image I/O package.
https://github.com/jai-imageio/jai-imageio-core
net.sourceforge.tess4j.TesseractException: java.lang.RuntimeException: Unsupported image format. May need to install JAI Image I/O package.
https://github.com/jai-imageio/jai-imageio-core
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:261)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:210)
at customs.completeOCR(customs.groovy:563)
at customs.passCaptcha(customs.groovy:439)
at customs.clickDUALink(customs.groovy:315)
at customs.main(customs.groovy:680)
at customs.run(customs.groovy:697)
Caused by: java.lang.RuntimeException: Unsupported image format. May need to install JAI Image I/O package.
https://github.com/jai-imageio/jai-imageio-core
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:230)
... 6 more
I have little knowledge of Linux and have installed libcamera to stream video from rbpicamera to vlc (or kodi, tvheadend, etc). But it gives error and I don't know what is happening.
libcamera-vid -t 0 --width 1920 --height 1080 --codec h264 --inline --listen -o tcp://0.0.0.0:8888
[0:13:03.287872564] [2248] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3829-dfc6d711
[0:13:03.852263918] [2263] WARN RPI raspberrypi.cpp:1258 Mismatch between Unicam and CamHelper for embedded data usage!
[0:13:03.862314595] [2263] INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/i2c#1/imx219#10 to Unicam device /dev/media2 and ISP device /dev/media0
[0:13:03.868779438] [2248] INFO Camera camera.cpp:1035 configuring streams: (0) 1280x960-YUV420
[0:13:03.872784647] [2263] INFO RPI raspberrypi.cpp:761 Sensor: /base/soc/i2c0mux/i2c#1/imx219#10 - Selected sensor format: 1640x1232-SBGGR10_1X10 - Selected unicam format: 1640x1232-pBAA
libcamera-vid: symbol lookup error: /lib/arm-linux-gnueabihf/libcamera_app.so: undefined symbol: _ZNK9libcamera11ControlList8containsERKNS_9ControlIdE
Let's see if you can give me a hand please.
It always gives the same error. I've reinstalled everything and it's still exactly the same. I've been around the net a thousand times and I haven't found the error or the solution.
Error:
libcamera-vid: symbol lookup error: /lib/arm-linux-gnueabihf/libcamera_app.so: undefined symbol: _ZNK9libcamera11ControlList8containsERKNS_9ControlIdE
I'm with the S.O. Dietpi on a Raspberry Pì 2. The camera works perfectly.
Here is the guide I have followed to install libcamera:
https://libcamera.org/getting-started.html#
Hi i'm trying to build a nodejs app on my raspberry pi model 4 that after receiving an input (nfc tag)
open a url that contain a video.
Es 'http://www.example.com/webapi/content?rfid=05:66:77:66:93:67'.
The problem is that when i try to open my link with vlc or omxplayer it drop an error and doesn't show me any video. I try to put the link in the "open network stream" on vlc in windows and i have the same issue, but if i put the link in the browser I see the video correctly. If i try to open other videos i didn't get any problem.
Unfortunately I can't post the link to the site for privacy reasons. Any advice on what the problem might be?
Error log on raspberry pi:
[01cf9b80] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[01d089f0] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[01d089f0] main interface error: no suitable interface module
[01c72b58] main libvlc error: interface "dbus,none" initialization failed
[01d152c0] main interface error: no suitable interface module
[01c72b58] main libvlc error: interface "globalhotkeys,none" initialization failed
[01c72b58] main libvlc: Esecuzione di vlc con l'interfaccia predefinita. Usa 'cvlc' per utilizzare vlc senza interfaccia.
error: XDG_RUNTIME_DIR not set in the environment.
[01d152c0] skins2 interface error: cannot initialize OSFactory
[01d152c0] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.8 Vetinari
Command Line Interface initialized. Type `help' for help.
> [b1002098] mp4 stream error: no moov before mdat and the stream is not seekable
[b1001e58] prefetch stream error: cannot seek (to offset 48)
[b1054990] mmal_codec decoder: VCSM init succeeded: CMA
[mov,mp4,m4a,3gp,3g2,mj2 # 0xb104e340] stream 0, offset 0x4d3: partial file
NWJS Version: v.0.32.1 (Tested on different 0.31 versions also and 0.32.beta)
Operating System: Linux only. Tested on Ubuntu 16.04 LTS x64 and Elementary OS 0.4.1 Loki x64
Expected behaviour
The program must respond.
Actual behaviour
The program not responding and if I break it (Ctrl + C) i seen in console that messages:
[14399:14410:0802/142733.750943:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14410:0802/142733.761023:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14409:0802/142733.761203:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14409:0802/142733.761402:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14409:0802/142733.761801:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[14399:14410:0802/142733.761896:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
But if I'am using nwjs-builder-phoenix and running SDK - working correctly.
How to reproduce
Prepare
Download and extract fake data to parsing: https://github.com/trofivan/myq-jobs-archive-parser/releases/download/v0.1.0/fake-data-big.zip
git clone https://github.com/trofivan/myq-jobs-archive-parser.git
cd myq-jobs-archive-parser
npm i
Working correctly (only with nwjs-builder-phoenix SDK)
npm start
In the opened window click Select folder to parse
Select folder with fake data
Wait some time while data will have parsed.
Use filters
Close the program
Working not correctly
npm run build.dist
cd dist/myq-jobs-archive-parser-0.1.3-linux-x64/
./myq-jobs-archive-parser
Select folder to parse and waiting some time.
The program does not respond.
Close program (Ctrl + C or [x] on the window) and see console output:
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
[16012:16023:0802/145405.677499:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[16012:16023:0802/145405.678176:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[16012:16012:0802/145405.679403:ERROR:broker_posix.cc(104)] Error sending sync broker message: Broken pipe (32)
[16012:16012:0802/145405.679587:ERROR:command_buffer_proxy_impl.cc(100)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
killall exe - to stop the process
PS:
If download nwjs from the official website, working not correctly with SDK version also.
On Linux system program not responded when comes to the game Web Worker: https://github.com/trofivan/myq-jobs-archive-parser/blob/master/src/middlewares/fetchJobs.js
When program not responding I'm can not open Chrome dev tools and get more info.
Compiled the OpenWebRTC, so it builds its own GStreamer. The test-send-receive worked fine for audio. Ubuntu 15.04.
Launching the test-uri test program like that:
export PATH=/opt/openwebrtc-0.3/bin/:$PATH
export LD_LIBRARY_PATH=/opt/openwebrtc-0.3/lib
export GST_PLUGIN_PATH_1_0=/opt/openwebrtc-0.3/lib/gstreamer-1.0/
test-uri file://$HOME/Videos/small.mp4
The file is:
http://techslides.com/demos/sample-videos/small.mp4
The error:
==== Warning message start ====
Warning in element uridecodebin-1.
Warning: No decoder available for type 'audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)1188, rate=(int)48000, channels=(int)1'.
Debugging info: gsturidecodebin.c(939): unknown_type_cb (): /GstPipeline:uri-source-agent-1/GstURIDecodeBin:uridecodebin-1
==== Warning message stop ====
Got "video stream, id: 0" source!
**
ERROR:owr_video_renderer.c:314:owr_video_renderer_get_element: assertion failed: (flip)
The gst-launch-1.0 plays this file fine with audio and video on GStreamer that comes with the OS. But the one in the /opt/openwebrtc-0.3/lib/gstreamer-1.0/ doesn't play audio.
How to fix at least the audio warning in the GStreamer built by OpenWebRTC? And then that fatal video renderer error.