Kazam should let you speficy a default region to record
Bug #1155294 reported by
Olav Andreas Lindekleiv
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Kazam Screencaster |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Overall, Kazam looks like a solid application, but there's one thing I'm missing. Instead of having to click "Area" and then select an area, I'd like to be able to specify recording region from the command line.
Something like "kazam --area 1280x720+100+100" to record a 1280x720 region, with a 100px offset on the x and y axis. An option to enable this in the preferences would also be nice, but a command line flag is probably enough, as not everyone needs this.
Changed in kazam: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
To post a comment you must log in.
For people who find this bug while looking for the same solution, I managed a useful workaround. This enables you to preset the location of the area selector when you first select an area. It does not affect anything else, and you can still choose a different area if you like. To use it, simply choose to select an area, and then press enter to select your default area.
Note: I did this in Ubuntu 18.04 your file locations may vary.
To preset the Kazam Screen Area
sudo cp '/usr/lib/ python3/ dist-packages/ kazam/frontend/ window_ area.py' '/usr/lib/ python3/ dist-packages/ kazam/frontend/ window_ area_Original. py' python3/ dist-packages/ kazam/frontend/ window_ area.py'
sudo gedit '/usr/lib/
Note: You can save the window_area.py while you're working on it, then restart Kazam and select an area to see how it is working. When I had a mismatch of values, pressing enter failed to close and accept.
Find the values you are after by selecting the area using Kazam that you want.
Note the width and height values that it shows you. We'll call them W1 and H1
Grab the resize option from the bottom right of your selected area and drag it to the top left of your screen
Note the width and height values that it shows you. We'll call them W2 and H2
# Position and size
self.g_ startx = W2
self.g_ starty = H2
self.startx = W2
self.starty = H2
self.endx = W1+W2
self.endy = H1+H2
self.g_endx = W1+W2
self.g_endy = H1+H2
self.height = H1
self.width = W1
Change the values in the code starting around line 57 to be the ones you've calculated:
# Position and size
self.g_ startx = 42
self.g_ starty = 140
self.startx = 42
self.starty = 140
self.endx = 1904
self.endy = 1079
self.g_endx = 1904
self.g_endy = 1079
self.height = 939
self.width = 1862
I used these settings on 1920x1080 screen.
Save your file. area_Original. py to be window_area.py
Open Kazam and test.
If it works, close your saved file.
If it fails and you can't make it work, delete window_area.py
and then rename window_
If posting this here is not approptriate, please copy and paste it to where it is appropriate.