Read the statement by Michael Teeuw here.
MMM-Selfieshot: High resolution for selfie
-
Thank you so much that you try tackling this issue together!!
I tested both paths as recommended:
-
fswebcam --resolution 3280x2464
This gives me a wonderful picture at the required resolution. It is above 2MB so I didn’t upload it. -
Via node-webcam.js
This doesn’t shoot a picture (which should be in the “/home/pi”-directory, right?). The following outputs appear in the console, which leave me wondering what I should do:
pi@raspberrypi:~/MagicMirror/modules/MMM-Selfieshot/node_modules/node-webcam/bin $ node ./node-webcam.js --w 3280 --h 2464 --l ~/picture.jpg Options Main { width: [ [Function: Number], 1280 ], height: [ [Function: Number], 720 ], delay: [ [Function: Number], 0 ], device: [ [Function: String], false ], quality: [ [Function: Number], 100 ], output: [ [Function: String], 'jpeg' ], verbose: [ [Function: Boolean], true ], help: [ [Function: Boolean], false ], version: [ [Function: Boolean], false ], greyscale: [ [Function: Boolean], false ], rotation: [ [Function: String], false ], topBanner: [ [Function: Boolean], false ], bottomBanner: [ [Function: Boolean], false ], skip: [ [Function: Number], 0 ], location: <ref *2> { resolve: [Function: resolve], normalize: [Function: normalize], isAbsolute: [Function: isAbsolute], join: [Function: join], relative: [Function: relative], toNamespacedPath: [Function: toNamespacedPath], dirname: [Function: dirname], basename: [Function: basename], extname: [Function: extname], format: [Function: bound _format], parse: [Function: parse], sep: '/', delimiter: ':', win32: <ref *1> { resolve: [Function: resolve], normalize: [Function: normalize], isAbsolute: [Function: isAbsolute], join: [Function: join], relative: [Function: relative], toNamespacedPath: [Function: toNamespacedPath], dirname: [Function: dirname], basename: [Function: basename], extname: [Function: extname], format: [Function: bound _format], parse: [Function: parse], sep: '\\', delimiter: ';', win32: [Circular *1], posix: [Circular *2], _makeLong: [Function: toNamespacedPath] }, posix: [Circular *2], _makeLong: [Function: toNamespacedPath] } } Shorthand { w: [ '--width' ], h: [ '--help' ], D: [ '--delay' ], d: [ '--device' ], q: [ '--quality' ], out: [ '--output' ], v: [ '--version' ], g: [ '--greyscale' ], r: [ '--rotation' ], l: [ '--location' ], S: [ '--skip' ] }
-
-
@hclaus
I found what’s wrong.
I might have forgotten to implement that feature really when I built this module 2 years ago. Haha… Sorry.At this moment, the module owner is BrianHepler, but I’m not sure he is still managing this module. I made a PR for this and contributed, but Brian’s acceptance is needed.
Or you can try this repository instead;
https://github.com/MMRIZE/MMM-SelfieshotOr just open node_helper.js and modify around line 86 for
width
andheight
by manual. It is an absolutely bad habit to edit source code directly by you, but at least you can test the working.I have no good webcam to test it, but you might have a piece of luck.
-
Haha, but your original intentions were good and are now fully applied :winking_face:
It works now (with the native Raspi Camera v2.1) and I can now happily integrate the selfie function into my mirror. Thank you so much for looking deeper into it!! BrianHepler seems to have left this forum and does not react on GitHub issues anymore, so you were the last resort.
-
-
@hclaus - Hey, sorry for dropping the ball like that. I have merged the PR from @MMRIZE and added the ability to rotate the countdown & displayed image. The higher resolution fix is already in the main branch. The rotation feature is going through some testing but it should be committed by the end of the week.
-
@bhepler
I have one thing to discuss with u. Recently Raspberry changed its default camera stack to “libcamera” with modern and advanced spec.
However libcamera doesn’t support macos or old rp, so new independent module might be needed. -
@MMRIZE - Hrm. It doesn’t support old RPi? How old are we talking about? I can kind of understand if it doesn’t support the original, but the big question is does it support the RPi 3A/B+. IIRC, that’s the most popular hardware for the mirrors.
-
@bhepler not for the rpi hw itself(os update be needed) but for the new compatible cams.
If someone has rpi zero and camera module 2, legacy raspicam stack will still work, but for the new 16MP cam, libcamra would be needed. -
First: Rotation feature has been merged into the latest version.
@MMRIZE - Heh. So if someone uses the least powerful RPi with the most powerful camera, it may not work. Okay, not unexpected but yeah I could see how that would be a common combination.
Do you have a link where I can research the situation? I hate to pester you with dumb questions. I would rather do my research and then discuss strategies with you rather than me posting a lot of stuff here just to clarify our vocabulary.
-
@bhepler Thanks for your efforts and I already replied via github! You guys rock, while my competencies are definitely more on the hardware/building side :see-no-evil_monkey: