Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6611163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:56:05+00:00 2026-05-25T19:56:05+00:00

on webos, I have openssh running and would like to take a picture using

  • 0

on webos, I have openssh running and would like to take a picture using the command line script.

I suspect this is going to include some luna-send command, or alternatively a gst-launch

But I am not having any luck with the docs.

webos doesn’t have any of the expected capture tools, but I can access the /dev/video0 device.

Edit: i noticed that the touchpad has the ffmpeg utility installed, but it doesn’t recognise the video4linux2 format

So far, I am trying Gopherkhan’s suggestions with the following code;

luna-send -n 1 palm://com.palm.mediad.MediaCapture/startImageCapture \
'{"path":"/media/internal/foo1.png","options":[{"quality" \
:100,"flash":2,'reviewDuration':0,'exifData':{}}]}'

but its just hanging there doing nothing, after a while is says this;

{"serviceName":"com.palm.mediad.MediaCapture","returnValue":false,"errorCode":-1 \
  ,"errorText":"com.palm.mediad.MediaCapture is not running."} \
(process:8534): LunaService-CRITICAL **: AppId msg type: 17
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:56:06+00:00Added an answer on May 25, 2026 at 7:56 pm

    So to do this with luna-sends is a bit tricky, and technically not supported.

    You’re probably going to want to hit the MediaCapture library, which can be found on the device here:

    /usr/palm/frameworks/enyo/0.10/framework/lib/mediacapture
    

    To include it in your enyo app drop the following in your depends.js:

    "$enyo-lib/mediacapture/"
    

    There are three main steps involved.

    1. Initializing the component
    2. Capturing the image
    3. Unloading the device.

    Here’s a sample:

    Declare the component in your scene

    {
                kind: "enyo.MediaCapture", name:"mediaCaptureObj", 
                onLoaded:"_setUpLoadedState", onInitialized:"_setUpInitializedState", 
                onImageCaptureStart:"_onImageCaptureStart", onImageCaptureComplete:"_onImageCaptureComplete",
             onAutoFocusComplete:"_onAutoFocusComplete", onError:"_handleError",
                onElapsedTime:"_onElapsedTime", onVuData:"_onVuDataChange", onDuration:"_onDuration"
    }
    

    Call the initialize method:

    this.$.mediaCaptureObj.initialize(this.$.ViewPort);
    

    In your onInitialized callback

    Use the property bag to locate the number of devices that are available. Typically, the descriptions are “Camera/Camcorder”, “Front Microphone”, and “User facing camera”

    var keyString;
    for(var i = 0; i < this.pb.deviceKeys.length; i++)
    {
        if(this.pb.deviceKeys[i].description.indexOf("Camera/Camcorder") >= 0)
        {
            keyString = this.pb.deviceKeys[i].deviceUri;
            break;
        }
    }
    
    if(keyString)
    {
        var formatObj = {
                    imageCaptureFormat: this.pb[keyString].supportedImageFormats[0]
                };
    
        this.$.mediaCaptureObj.load(keyString, formatObj);
    }
    

    Take a photo.

    var obj = {"exifData":"{\"make\": \"Palm\", \"model\": \"Pre3\", \"datetime\": \"2011:05:19 10:39:18\", \"orientation\": 1, \"geotag\": {}}","quality":90,"flash":"FLASH_ON"};
    
    this.$.mediaCaptureObj.startImageCapture("", obj);
    

    Unload the device:

    this.$.mediaCaptureObj.unload();
    

    To do this with the old JS frameworks, see:
    https://developer.palm.com/content/api/reference/javascript-libraries/media-capture.html

    Now, you can do something similar with luna-send, but again, I don’t think it’s technically supported. You might have trouble with starting-up/keeping-alive the media capture service, etc. BUT, if you want to try, you could do something along the lines of:

    1. get the media server instance — this returns a port instance number

    luna-send -a your.app.id -i palm://com.palm.mediad/service/captureV3 '{"args":["subscribe":true]}'
    

    This will return a location of the capture service with a port number, a la:

    {"returnValue":true, "location":"palm://com.palm.mediad.MediaCaptureV3_7839/"}
    

    Since this is a subscription, don’t kill the request. Just open a new terminal.

    2. Open a new terminal. Use the “location” returned in step 1 as your new service uri:

    luna-send -a your.app.id -i palm://com.palm.mediad.MediaCaptureV3_7839/load '{"args":["video:1", {"videoCaptureFormat":{"bitrate":2000000,"samplerate":44100,"width":640,"height":480,"mimetype":"video/mp4","codecs":"h264,mp4a.40"},"imageCaptureFormat":{"bitrate":0,"samplerate":1700888,"width":640,"height":480,"mimetype":"image/jpeg","codecs":"jpeg"},"deviceUri":"video:1"}]}'
    

    You should see:

    {"returnValue":true}
    

    if the call completed correctly. You can safely ctrl+c out of this call.

    3. Take your picture. (you can ctrl+c out of the last call, and just supply the args here)

    luna-send -a your.app.id -i palm://com.palm.mediad.MediaCaptureV3_7839/startImageCapture '{"args":["", {"exifData":"{\"orientation\": 1, \"make\": \"HP\", \"model\": \"TouchPad\", \"datetime\": \"2011:09:22 15:34:36\", \"geotag\": {}}","quality":90,"flash":"FLASH_DISABLED","orientation":"faceup"}]}'
    

    Again, you should see:

    {"returnValue":true}
    

    if the call completed correctly.

    You should hear a shutter click, and the image will show up in the Photos app, in your Photo Roll.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using HP webOS 3.0 and the Enyo framework. I have simple question
I have an existing C# windows application, however I would like to be able
I have a PhoneGap app that I'm testing on webOS, Android, and iPhone. I'm
I currently have a Palm WebOS application that uses an Ajax.Request to connect to
I have 2 web sites running on the same server. Web1 needs to transfer
We have Best practices on using disposable object in SharePoint. But i`m thinking -
I have tried this: echo substr(sprintf('%o', fileperms($mdbFilename)), -4).'<br />'; echo chmod($mdbFilename, 0777); echo substr(sprintf('%o',
I am writing a google app engine app and I have this key value
We have a Java desktop app with an embedded browser, now using XULRunner (Firefox
I have a array that I am writing to a file using var_export() .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.