MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Selfieshot: High resolution for selfie

    Scheduled Pinned Locked Moved Solved Troubleshooting
    11 Posts 3 Posters 3.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      hclaus @MMRIZE
      last edited by

      @mmrize

      Thank you so much that you try tackling this issue together!!

      I tested both paths as recommended:

      1. fswebcam --resolution 3280x2464
        This gives me a wonderful picture at the required resolution. It is above 2MB so I didn’t upload it.

      2. 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' ]
      }
      
      
      M 1 Reply Last reply Reply Quote 0
      • M Offline
        MMRIZE @hclaus
        last edited by MMRIZE

        @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-Selfieshot

        Or just open node_helper.js and modify around line 86 for width and height 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.

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          hclaus @MMRIZE
          last edited by hclaus

          @mmrize

          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.

          bheplerB 1 Reply Last reply Reply Quote 0
          • H hclaus referenced this topic on
          • bheplerB Offline
            bhepler Module Developer @hclaus
            last edited by

            @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.

            M H 2 Replies Last reply Reply Quote 0
            • M Offline
              MMRIZE @bhepler
              last edited by

              @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.

              bheplerB 1 Reply Last reply Reply Quote 0
              • bheplerB Offline
                bhepler Module Developer @MMRIZE
                last edited by

                @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.

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  MMRIZE @bhepler
                  last edited by MMRIZE

                  @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.

                  bheplerB 1 Reply Last reply Reply Quote 0
                  • bheplerB Offline
                    bhepler Module Developer @MMRIZE
                    last edited by bhepler

                    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.

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      hclaus @bhepler
                      last edited by

                      @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:

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 2 / 2
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy