Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] filename the same as recorded window name? #1

Open
mmichau opened this issue Sep 6, 2022 · 4 comments
Open

[Question] filename the same as recorded window name? #1

mmichau opened this issue Sep 6, 2022 · 4 comments

Comments

@mmichau
Copy link

mmichau commented Sep 6, 2022

Is it possible to tweak a script to use currently used window name as the filename? For example, I record from chrome so I would like to have a filename like: chrome_<name_of_the_recorded_tab_or_window>_YYYY-MM-DD_hh:mm:ss.

@ismslv
Copy link
Owner

ismslv commented Sep 7, 2022

@mmichau OBS's API has getInputList() query, so technically if you capture window source (active tab of browser is usually in the window name) it is possible to use it. If there are multiple inputs, we have to define some rule to choose one, e.g. the first video input.
What do you think of such a solution?

@mmichau
Copy link
Author

mmichau commented Sep 7, 2022

@ismslv
Thanks for such a fast reply! I think it is a great solution!

@ismslv
Copy link
Owner

ismslv commented Sep 18, 2022

@mmichau

I've rewritten the script and added the source title feature. When recording starts, it will wait for configured time (OBS>Scripts>Parameters>Title capture delay) and capture the title of active window/tab. This way, it will work even if your capture source is "desktop" instead of window or game.

Should work on any system, but I've tested only on Windows. If you use other OS, please write if it works there.

I would like to have a filename like: chrome_<name_of_the_recorded_tab_or_window>_YYYY-MM-DD_hh:mm:ss

For this title you can use this template: chrome_[src]_[date]_[time] (set it in OBS>Scripts>Parameters>Template)

@mmichau
Copy link
Author

mmichau commented Dec 7, 2022

Hi, I test your script and found 2 issues:

  1. date is too short and if you record something with the same name it needs an appendix(serries) - I just expand the date/time with year and seconds "%Y-%m-%d" and "%H.%M.%S"
  1. [src] always put the same name for me: "obs-2812-64-bit-windows-profile-untitled-scenes-untitled" - I guess that is the name of the obs window.

EDIT
Ok, I figure out why this was always like that. My bad. The script works as supposed to.

Tested on windows 10 21H2 19044.2251
Python 3.10
obs 28.1.2 64-bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants