Code Monkey home page Code Monkey logo

cute-sway-recorder's Introduction

Cute Sway Recorder

Screen recorder for wlroots-based compositors like Sway and Hyperland. For other compositors, it falls back to using wlr-randr to get outputs.

More specifically, this project is merely a graphical Qt wrapper for wf-recorder, leveraging slurp for selecting screen regions.

Installation

pip install cute-sway-recorder

You might prefer using pipx:

pipx install cute-sway-recorder

Contributing

PRs are welcome!

  1. After forking this repository, make sure to install the project dependencies locally:
poetry install

This will create a virtual environment and install all the required dependencies.

  1. Make sure cute-sway-recorder runs locally:
poetry run python -m cute_sway_recorder.main

Alternatives

  • green-recorder is a recent fork of the project abandoned in 2019. It doesn't use wf-recorder under the hood. It currently has more features than this project; you might want to try it first, and come back here if it gives you a hard time.

cute-sway-recorder's People

Contributors

ayhon avatar flowln avatar it-is-wednesday avatar ketexon avatar kohane27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cute-sway-recorder's Issues

Feature: filename formatting

Filename Formatting

Filename formatting, similar to OBS's %CCYY-%MM-%DD %hh-%mm-%ss, would be useful for sorting files by name and automatic collision avoidance.

Potential Implementations

If we only want date/time formatting, we can use the syntax of strftime (%Y-%m-%d %H-%M-%S.mp4), though I think we should keep the ability to have random 5 ascii digits like the current behavior.

If we want to keep the option for a random 5 ascii characters, I think template strings would be the "best" option, since it can look the same as strftime, unlike % formatting and str.format. We could use % as a delimiter to match strftime and use %id as the placeholder. The only potential edge case would be if strftime implements %i, but we can handle that when it happens ;)

Considerations

If we allow a random 5 ascii characters as a template placeholder, this makes the "Random name" button a little less useful, and maybe we should consider removing it (or replacing it with "Default name"). However, it could be useful if the user wants to know where the file will be saved before starting recording.

It might be a good idea for accessibility to show the realized filename after/before a recording is finished. Eg. a status line at the bottom that says Saved to "~/Videos/2024-46-07/27/24 14-46-02.mp4". This could also be the same place that displays #23 .

Doesn't start on fedora

I'm getting the following error on starting this app

cute-sway-recorder 
Traceback (most recent call last):
  File "/home/madeupuser/.local/bin/cute-sway-recorder", line 5, in <module>
    from cute_sway_recorder.main import main
  File "/home/madeupuser/.local/pipx/venvs/cute-sway-recorder/lib64/python3.10/site-packages/cute_sway_recorder/main.py", line 24, in <module>
    from config_area import ConfigArea

Fedora 36 with latest sway

BROKE UNBUILDABLE/FreeBSD14-Current

pipx install cute-sway-recorder
Fatal error from pip prevented installation. Full pip output in file:
   /usr/home/xxxxxxxxxp/.local/pipx/logs/cmd_2021-11-19_18.11.50_pip_errors.log

pip seemed to fail to build package:
   cute-sway-recorder

Some possibly relevant errors from pip install:
   ERROR: Cannot install cute-sway-recorder==0.1.1, cute-sway-recorder==0.1.2, cute-sway-recorder==0.1.3, cute-sway-recorder==0.1.4, cute-sway-recorder==0.1.5, cute-sway-recorder==0.1.6 and cute-sway-recorder==0.1.7 because these package versions have conflicting dependencies.
   ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Error installing cute-sway-recorder.
 

thats from pipx this is the error log

PIP STDOUT
----------
Collecting cute-sway-recorder
 Downloading cute_sway_recorder-0.1.7-py3-none-any.whl (6.1 kB)
 Downloading cute_sway_recorder-0.1.6-py3-none-any.whl (5.8 kB)
 Downloading cute_sway_recorder-0.1.5-py3-none-any.whl (5.7 kB)
 Downloading cute_sway_recorder-0.1.4-py3-none-any.whl (4.5 kB)
 Downloading cute_sway_recorder-0.1.3-py3-none-any.whl (4.5 kB)
 Downloading cute_sway_recorder-0.1.2-py3-none-any.whl (4.5 kB)
 Downloading cute_sway_recorder-0.1.1-py3-none-any.whl (4.2 kB)

The conflict is caused by:
   cute-sway-recorder 0.1.7 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.6 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.5 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.4 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.3 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.2 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.1 depends on PySide6<7.0.0 and >=6.0.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

PIP STDERR
----------
ERROR: Cannot install cute-sway-recorder==0.1.1, cute-sway-recorder==0.1.2, cute-sway-recorder==0.1.3, cute-sway-recorde$
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

and this is the output from pip 

❯ python3.8 -m pip install cute-sway-recorder
Defaulting to user installation because normal site-packages is not writeable
Collecting cute-sway-recorder
 Using cached cute_sway_recorder-0.1.7-py3-none-any.whl (6.1 kB)
 Using cached cute_sway_recorder-0.1.6-py3-none-any.whl (5.8 kB)
 Using cached cute_sway_recorder-0.1.5-py3-none-any.whl (5.7 kB)
 Using cached cute_sway_recorder-0.1.4-py3-none-any.whl (4.5 kB)
 Using cached cute_sway_recorder-0.1.3-py3-none-any.whl (4.5 kB)
 Using cached cute_sway_recorder-0.1.2-py3-none-any.whl (4.5 kB)
 Using cached cute_sway_recorder-0.1.1-py3-none-any.whl (4.2 kB)
ERROR: Cannot install cute-sway-recorder==0.1.1, cute-sway-recorder==0.1.2, cute-sway-recorder==0.1.3, cute-sway-recorder==0.1.4, cute-sway-recorder==0.1.5, cute-sway-recorder==0.1.6 and cute-sway-recorder==0.1.7 because these package versions have conflicting dependencies.

The conflict is caused by:
   cute-sway-recorder 0.1.7 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.6 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.5 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.4 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.3 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.2 depends on PySide6<7.0.0 and >=6.0.0
   cute-sway-recorder 0.1.1 depends on PySide6<7.0.0 and >=6.0.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

╭─    ~/git-way ▓▒░────────────────────────────────────────────────────────────░▒▓ 1 ✘  took 7s   at 18:17:02  
╰─

I just cloned your repo im going to attempt to fix it these failures are on FreeBSD-14.0-Current im gonna try and loosen the dependencies up a bit a try installing with pip from local copy if that feels ill try building with setuptools . figured id make you aware of this ccause at the moment it is 100% unbuildable on freebsd current

Need flag `--force-yuv` or else all recorded videos not playable

Hello @it-is-wednesday. Hope you're doing well. Thank you for creating this graphical wrapper. It makes using wf-recorder a lot easier.

Description

I had the exact same issue mentioned in #152. All the videos recorded with cute-sway-recorder aren't playable when shared on uploaded. They are playable locally with mpv.

Solution

The solution is adding the flag --force-yuv:

-t, --force-yuv
Use the -t or --force-yuv option to force conversion of the data to yuv format, before sending it to the gpu.

Problem

Given cute-sway-recorder uses wf-recorder under the hood, it's solvable by adding the flag --force-yuv. But there's no easy way to add flags. Currently, I have to modify the src code:

  1. cd ~/.local/pipx/venvs/cute-sway-recorder/lib/python3.10/site-packages/cute_sway_recorder/main.py

  2. add --force-yuv to params like below:

params = ["wf-recorder", "-f", file_dst, "--force-yuv"]

Suggestion

Add an input box under Record audio so that users can pass flags.

Thank you!

Selecting default audio service

I use pipewire (and pipewire-pulse for compatibility), but whenever I try to record anything with audio, the only thing recorded is a slight buzzing. I don't know if it would help or not, but is there a way to try selecting pipewire as the default audio service instead of pipewire?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.