[mythtv-users] Replacement for mythFE getscreenshot api in v34

Roland Ernst rcrernst at gmail.com
Sun Dec 17 16:35:54 UTC 2023


On Mon, Dec 4, 2023 at 7:36 PM Jay Harbeston <jharbestonus at gmail.com> wrote:

>
> Subject says it, I used to use the api to capture a screen until it was
> removed, and would like to get a similar function back again.
>
> I see in the comments to remove the function that qt screen grab has taken
> over, but haven’t found an api call(or similar) to get the equivalent
> functionality.
>
> Any ideas!?
>
> Regards!
>
> Jay
>

Jay,

I know of 2 APIs for taking a screenshot of the currently displayed
frontend screen

Method 1:
API of MythFE aka MythFEXML: GetScreenShot API:
"http://<fe-hosname>:<upnpport>/MythFE/GetScreenShot "
This returns a file object, thus can be executed in a browser with
The mythFE API is registered to the upnp html server.

Since this summer, the frontend upnp server port is now ServicePort + 4
(default 6551)
See commit
https://github.com/MythTV/mythtv/commit/dd35e853299fad03a18a8db7adbd5a96aa31d783
   int nPort = XmlConfiguration().GetValue("UPnP/MythFrontend/ServicePort",
6547);
    // frontend upnp server is now ServicePort + 4 (default 6551)
    nPort += 4;

I just tested this on current master (v34-pre) and this works in a
web-browser
http://<fe-hosname>:6551/MythFE/GetScreenShot

Method 2:
ACTION_SCREENSHOT
triggered by the MythTV Services "Frontend/SendAction" with a POST action
or with a dedicated key on your remote:
Keybindings Editor: assign a key to the "SCREENSHOT" Action

This saves the screenshot to the "SreenShotPath" setting, defaults to "/tmp"

Further reading
https://lists.archive.carbon60.com/mythtv/users/625072

HTH,
Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20231217/aec9fe53/attachment.htm>


More information about the mythtv-users mailing list