Registered User No edit summary |
Registered User mNo edit summary Tag: 2017 source edit |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | |||
{{ApplicableFor | |||
|MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | |||
|MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | |||
}} | |||
</noinclude> | |||
[[Wayland Weston overview|Weston]] is the reference implementation of a Wayland compositor. | [[Wayland Weston overview|Weston]] is the reference implementation of a Wayland compositor. | ||
Line 16: | Line 22: | ||
Before proceeding, it is recommended to | Before proceeding, it is recommended to | ||
* check the <modifier-key> value: | * check the <modifier-key> value: | ||
{{Board$}} grep binding-modifier /etc/xdg/weston/weston.ini | {{Board$}}grep binding-modifier /etc/xdg/weston/weston.ini | ||
binding-modifier={{Highlight|ctrl}} | binding-modifier={{Highlight|ctrl}} | ||
* check the <num-workspaces> value: | * check the <num-workspaces> value: | ||
{{Board$}} grep num-workspaces /etc/xdg/weston/weston.ini | {{Board$}}grep num-workspaces /etc/xdg/weston/weston.ini | ||
num-workspaces={{Highlight|6}} | num-workspaces={{Highlight|6}} | ||
Line 62: | Line 68: | ||
Additional shortcuts can be found on internet. | Additional shortcuts can be found on internet. | ||
==Capturing a screenshot== | == Capturing a screenshot == | ||
# Refer to the table above for the command to be used. | # Refer to the table above for the command to be used. | ||
# The captured picture (PNG format) is automatically stored in | # The captured picture named "wayland-screenshot-*.png" (PNG format) is automatically stored in "/home/weston" or "/home/root" or "/" depending on the Weston configuration. | ||
# Copy the screenshot from the board to the host PC in the <file-path> directory (for example with the ''scp'' command). | # Copy the screenshot from the board to the host PC in the <file-path> directory (for example with the ''scp'' command). | ||
{{PC$}} scp root@<ip address>:/wayland-screenshot-*.png <file-path>/ | {{PC$}}scp root@<ip address>:/home/weston/wayland-screenshot-*.png <file-path>/ | ||
Note: a screenshot capture is also named a snapshot or a screen capture. | Note: a screenshot capture is also named a snapshot or a screen capture. | ||
==Recording a screencast== | {{Info|The above screenshot capture procedure requires a physical keyboard. If you are more interested in using the Weston debug tool named '''weston-screenshooter''', please read [[How to make a screen capture in Weston]].}} | ||
== Recording a screencast == | |||
# Refer to the table above for the command to be used. | # Refer to the table above for the command to be used. | ||
# The recorded screencast (WCAP format) is automatically stored in | # The recorded screencast named "capture.wcap" (WCAP format) is automatically stored in "/home/weston" or "/home/root" or "/" depending on the Weston configuration. The WCAP format is a lossless video format specific to Weston (only the frame differences are recorded). | ||
# To play the recorded screencast, convert it to a format that can be interpreted by any video player (e.g. VP8). Three steps are required: | # To play the recorded screencast, convert it to a format that can be interpreted by any video player (e.g. VP8). Three steps are required: | ||
:* On the board, convert the WCAP file into a YUV file using ''wcap-decode'': | :* On the board, convert the WCAP file into a YUV file using ''wcap-decode'': | ||
{{Board$}} wcap-decode capture.wcap --yuv4mpeg2 > capture.y4m | {{Board$}}wcap-decode capture.wcap --yuv4mpeg2 > capture.y4m | ||
:* Copy the YUV file from the board to the host PC in the <file-path> directory (for example with the ''scp'' command): | :* Copy the YUV file from the board to the host PC in the <file-path> directory (for example with the ''scp'' command): | ||
{{PC$}} scp root@<ip address>:/capture.y4m <file-path>/ | {{PC$}}scp root@<ip address>:/capture.y4m <file-path>/ | ||
:* On the host PC, transcode the YUV file to any other well-known format (e.g. VP8) using ''ffmpeg'': | :* On the host PC, transcode the YUV file to any other well-known format (e.g. VP8) using ''ffmpeg'': | ||
{{PC$}} ffmpeg -i capture.y4m -c:v libvpx -b:v 1M capture.webm | {{PC$}}ffmpeg -i capture.y4m -c:v libvpx -b:v 1M capture.webm | ||
:* Optionally, choose a higher bitrate (''-b:v 1M'' means a target bitrate of 1 MBit/s) if a better quality is required. Optionally, use the ''transpose'' parameter when a 90 degree clockwise rotation is needed: | :* Optionally, choose a higher bitrate (''-b:v 1M'' means a target bitrate of 1 MBit/s) if a better quality is required. Optionally, use the ''transpose'' parameter when a 90 degree clockwise rotation is needed: | ||
{{PC$}} ffmpeg -i capture.y4m -vf transpose=1 -c:v libvpx -b:v 1M capture.webm | {{PC$}}ffmpeg -i capture.y4m -vf transpose=1 -c:v libvpx -b:v 1M capture.webm | ||
{{Info| Note that the YUV file size might be huge if the recording is long (see example below).}} | {{Info| Note that the YUV file size might be huge if the recording is long (see example below).}} | ||
Line 86: | Line 94: | ||
Example: | Example: | ||
* On the board: a 5-second screencast is recorded | * On the board: a 5-second screencast is recorded | ||
{{Board$}} wcap-decode capture.wcap --yuv4mpeg2 > capture.y4m | {{Board$}}wcap-decode capture.wcap --yuv4mpeg2 > capture.y4m | ||
wcap file: size 720x1280, 192 frames | wcap file: size 720x1280, 192 frames | ||
{{Board$}} ls -l capture.* | {{Board$}}ls -l capture.* | ||
-rw-r--r-- 1 8246868 Dec 13 14:58 capture.wcap | -rw-r--r-- 1 8246868 Dec 13 14:58 capture.wcap | ||
-rw-r--r-- 1 {{Highlight|167821312}} Dec 13 14:59 capture.y4m | -rw-r--r-- 1 {{Highlight|167821312}} Dec 13 14:59 capture.y4m | ||
* On the host PC | * On the host PC | ||
{{PC$}} scp root@<ip address>:/capture.y4m . | {{PC$}}scp root@<ip address>:/capture.y4m . | ||
{{PC$}} ffmpeg -i capture.y4m -vf transpose=1 -c:v libvpx -b:v 1M capture.webm | {{PC$}}ffmpeg -i capture.y4m -vf transpose=1 -c:v libvpx -b:v 1M capture.webm | ||
{{PC$}} ls -l capture.* | {{PC$}}ls -l capture.* | ||
-rw-r--r-- 1 {{Highlight|104470}} Feb 8 11:01 capture.webm | -rw-r--r-- 1 {{Highlight|104470}} Feb 8 11:01 capture.webm | ||
-rw-r--r-- 1 167821312 Feb 8 10:56 capture.y4m | -rw-r--r-- 1 167821312 Feb 8 10:56 capture.y4m | ||
References | == References == | ||
<references /> | <references /> | ||
Latest revision as of 13:28, 11 October 2024
Weston is the reference implementation of a Wayland compositor.
The table below lists the actions that can be performed through Weston keyboard shortcuts, when the development board is connected to a keyboard.
It must be noted that:
- <modifier-key> in the table below corresponds to the key used for common bindings. It is defined by binding-modifier=<modifier-key> in the /etc/xdg/weston/weston.ini file. Possible values for <modifier-key> are:
- "super", i.e. Windows key between "ctrl" and "alt" (default Weston value)
- "ctrl" (default value in STMicroelectronics images)
- "alt"
- "none"
- The shortcuts are defined in desktop-shell/shell.c[1] file (shell_add_bindings() function)
- Some shortcuts require that both a keyboard and a mouse are connected to the development board
- Some shortcuts require that several workspaces are defined. The number of workspaces is defined by num-workspaces=<num-workspaces> in the /etc/xdg/weston/weston.ini file. The maximum number of workspaces is 6. If num-workspaces is not set, one single workspace is configured.
- The left mouse button allows the activation of a window.
Before proceeding, it is recommended to
- check the <modifier-key> value:
ctrlgrep binding-modifier /etc/xdg/weston/weston.ini binding-modifier=
- check the <num-workspaces> value:
6grep num-workspaces /etc/xdg/weston/weston.ini num-workspaces=
Command | Action | Condition(s) |
---|---|---|
ctrl + alt + backspace | Kill Weston | Keyboard |
super + scroll | Zoom in / out the desktop | Keyboard + mouse |
super + alt + scroll | Change activated window opacity | Keyboard + mouse |
<modifier-key> + page up / page down | Zoom in / out the desktop | Keyboard |
<modifier-key> + shift + f | Put activated window fullscreen | Keyboard |
<modifier-key> + left mouse button | Move activated window | Keyboard + mouse |
<modifier-key> + middle mouse button | Rotate activated window | Keyboard + mouse |
<modifier-key> + right mouse button | Resize activated window | Keyboard + mouse |
<modifier-key> + shift + left mouse button | Resize activated window | Keyboard + mouse |
<modifier-key> + tab | Switch windows | Keyboard |
<modifier-key> + k | Kill activated window | Keyboard |
<modifier-key> + key up / key down | Switch to previous / next workspace | Keyboard + workspaces |
<modifier-key> + shift + key up / key down | Move activated window to previous / next workspace | Keyboard + workspaces |
<modifier-key> + Fn | Switch to workspace n | Keyboard + workspaces |
super + s | Capture a screenshot (see details below) | Keyboard |
super + r | Start / stop recording a screencast (see details below) | Keyboard |
Additional shortcuts can be found on internet.
1. Capturing a screenshot[edit | edit source]
- Refer to the table above for the command to be used.
- The captured picture named "wayland-screenshot-*.png" (PNG format) is automatically stored in "/home/weston" or "/home/root" or "/" depending on the Weston configuration.
- Copy the screenshot from the board to the host PC in the <file-path> directory (for example with the scp command).
scp root@<ip address>:/home/weston/wayland-screenshot-*.png <file-path>/
Note: a screenshot capture is also named a snapshot or a screen capture.
![]() |
The above screenshot capture procedure requires a physical keyboard. If you are more interested in using the Weston debug tool named weston-screenshooter, please read How to make a screen capture in Weston. |
2. Recording a screencast[edit | edit source]
- Refer to the table above for the command to be used.
- The recorded screencast named "capture.wcap" (WCAP format) is automatically stored in "/home/weston" or "/home/root" or "/" depending on the Weston configuration. The WCAP format is a lossless video format specific to Weston (only the frame differences are recorded).
- To play the recorded screencast, convert it to a format that can be interpreted by any video player (e.g. VP8). Three steps are required:
- On the board, convert the WCAP file into a YUV file using wcap-decode:
wcap-decode capture.wcap --yuv4mpeg2 > capture.y4m
- Copy the YUV file from the board to the host PC in the <file-path> directory (for example with the scp command):
scp root@<ip address>:/capture.y4m <file-path>/
- On the host PC, transcode the YUV file to any other well-known format (e.g. VP8) using ffmpeg:
ffmpeg -i capture.y4m -c:v libvpx -b:v 1M capture.webm
- Optionally, choose a higher bitrate (-b:v 1M means a target bitrate of 1 MBit/s) if a better quality is required. Optionally, use the transpose parameter when a 90 degree clockwise rotation is needed:
ffmpeg -i capture.y4m -vf transpose=1 -c:v libvpx -b:v 1M capture.webm
![]() |
Note that the YUV file size might be huge if the recording is long (see example below). |
Example:
- On the board: a 5-second screencast is recorded
167821312 Dec 13 14:59 capture.y4mwcap-decode capture.wcap --yuv4mpeg2 > capture.y4m wcap file: size 720x1280, 192 frames ls -l capture.* -rw-r--r-- 1 8246868 Dec 13 14:58 capture.wcap -rw-r--r-- 1
- On the host PC
104470 Feb 8 11:01 capture.webm -rw-r--r-- 1 167821312 Feb 8 10:56 capture.y4mscp root@<ip address>:/capture.y4m . ffmpeg -i capture.y4m -vf transpose=1 -c:v libvpx -b:v 1M capture.webm ls -l capture.* -rw-r--r-- 1
3. References[edit | edit source]
- ↑ https://cgit.freedesktop.org/wayland/weston/tree/desktop-shell/shell.c Weston Wayland Compositor official git