properties for source

obsuser101

New Member
when you do an Add Source - suggest to user the checkbox "resize output (source size)"
1726944037676.png
 

obsuser101

New Member
Right-click menu over the source has some additional options.
I saw this before creating the message

not relevant. It still won't solve the problem. For example, I want to make a screencast from a browser. Let the source size be 1920x1080. But if I want to make a screencast of a small fragment (let it be 500x200 pixels) - then the video file will still contain useless black frames (1920x1080)
 

obsuser101

New Member
let me clarify in this topic - can I quickly configure OBS so that it does not record the entire contents of, for example, a browser window, but instead records a certain part of the window. So that there are no "black frames" in the output video file. And the video file has the same resolution of the fragment I need.
If the browser window resolution is 1920x1080 - then by cropping the desired fragment - the resulting file will still have a resolution of 1920x1080 (and "black frames")

The only solution I found is to edit the base canvas resolution - manually enter the numbers.

It would be useful if the canvas resolution parameter could also be changed in the program window using sliders.


1726951112248.png
The output video file contains a huge number of useless pixels in the form of "black frames"
1726951234605.png
 

obsuser101

New Member
the canvas resolution parameter could also be changed in the program window using sliders.
it will be quite difficult to implement

It is easier to make an additional fitting function, comparable to "resize output (source size)"
Make a new function the"resize output (fit canvas to crop)"

Steps:

one:
1726953043168.png

two: adjust with sliders
1726953393610.png

three: apply the "resize output (fit canvas to crop)"
1726953364743.png

result (output file):
Videotrack and window fragment have same resolution. No "black frames".

1726953299027.png
 
Last edited:

Suslik V

Active Member
It's rare and niche use case. Type the values manually. Also, output can't be "any" size, there are restrictions: by encoders, by format of the color planes etc (the multiply of 2, 4, 32 and has max of 16384 px per side).

You can use "get_selected_source_final_size.lua" helper script (main menu Tools > Scripts) that writes to the log-file final (filtered) source size:
Lua:
local obs = obslua

local hotkey_id = obs.OBS_INVALID_HOTKEY_ID

----------------------------------------------------------

function get_selected_final_source_size()
    local width = 0
    local height = 0

    -- Get selected source
    local current_scene = obs.obs_frontend_get_current_scene()
    local scene_ctx = obs.obs_scene_from_source(current_scene)
    local items = obs.obs_scene_enum_items(scene_ctx)
    if items ~= nil then
        for _, item in ipairs(items) do
            if obs.obs_sceneitem_selected(item) then
                local source = obs.obs_sceneitem_get_source(item)
                local scale = obs.vec2()
                local crop = obs.obs_sceneitem_crop()
                obs.obs_sceneitem_get_scale(item, scale)
                obs.obs_sceneitem_get_crop(item, crop)
                -- Calculate final (filtered) size
                width = scale.x * (obs.obs_source_get_width(source) - crop.left - crop.right)
                height = scale.y * (obs.obs_source_get_height(source) - crop.top - crop.bottom)
            end
        end
    end

    obs.obs_scene_release(scene_ctx)
    obs.sceneitem_list_release(items)

    return width, height
end

-- The "Log final size of the Source" hotkey callback
function log_source_size(pressed)
    if not pressed then
        return
    end

    -- Print "WidthxHeight"
    print(string.format("Selected source size: %dx%d", get_selected_final_source_size()))
end

----------------------------------------------------------

-- A function named script_description returns the description shown to the user
function script_description()
    return "On 'Log final size of the Source' hotkey press prints to the log-file the final size of the selected source."
end

-- A function named script_load will be called on startup
function script_load(settings)
    hotkey_id = obs.obs_hotkey_register_frontend("log_source_size", "Log final size of the Source", log_source_size)
    local hotkey_save_array = obs.obs_data_get_array(settings, "log_source_size.trigger")
    obs.obs_hotkey_load(hotkey_id, hotkey_save_array)
    obs.obs_data_array_release(hotkey_save_array)
end

-- A function named script_save will be called when the script is saved
--
-- NOTE: This function is usually used for saving extra data (such as in this
-- case, a hotkey's save data). Settings set via the properties are saved
-- automatically.
function script_save(settings)
    local hotkey_save_array = obs.obs_hotkey_save(hotkey_id)
    obs.obs_data_set_array(settings, "log_source_size.trigger", hotkey_save_array)
    obs.obs_data_array_release(hotkey_save_array)
end

On hotkey press it will output something like:
[Lua: get_selected_source_final_size.lua] Selected source size: 1920x1080
[Lua: get_selected_source_final_size.lua] Selected source size: 889x720
[Lua: get_selected_source_final_size.lua] Selected source size: 0x0
[Lua: get_selected_source_final_size.lua] Selected source size: 226x184
 

AaronD

Active Member
it will be quite difficult to implement

It is easier to make an additional fitting function, comparable to "resize output (source size)"
Make a new function the"resize output (fit canvas to crop)"

Steps:

one:
View attachment 107985
two: adjust with sliders
View attachment 107990
three: apply the "resize output (fit canvas to crop)"
View attachment 107989
result (output file):
Videotrack and window fragment have same resolution. No "black frames".

View attachment 107988
That specific example - fitting a video player exactly in OBS's capture - is a common way to steal copyrighted works. For that reason, a number of people who would have helped, will ignore you instead.
 

obsuser101

New Member
That specific example - fitting a video player exactly in OBS's capture - is a common way to steal copyrighted works. For that reason, a number of people who would have helped, will ignore you instead.
in that case, screencast software should be forbidden?

But the point is different: the goal can be achieved. Just have to spend more time and nerves. Or buy another program. Or donate to open source software and tell friends: hey, look what a cool free alternative to other well-known programs?

personally, I need this to share with friends short scenes from various memes and movies. I also make screencast fitting in own content.

>>For that reason, a number of people who would have helped, will ignore you instead
I would like they ignored not me, but the needs of the community, which bypasses wonderful open source projects, preferring other programs, including hacked ones
1727208739170.png
 

obsuser101

New Member
You can use "get_selected_source_final_size.lua" helper script (main menu Tools > Scripts) that writes to the log-file final (filtered) source size:
interesting idea. Although in practice it turned out to be more convenient to use Bandicam for measurement of an arbitrary random rectangle on the screen.
And then enter the width and height into the OBS.
Also, output can't be "any" size, there are restrictions
a few pixels can be neglected:
1727212582652.png
 

AaronD

Active Member
in that case, screencast software should be forbidden?
If what's on the screen is yours - your original content that you yourself created, and didn't sell or legally give away so that you no longer own it - then it's fine. Same if you have permission from the owner.

But it's very often used to re-publish things that the owner did not give permission for, and that's illegal.

personally, I need this to share with friends short scenes from various memes and movies.
Case in point. See Jukin Media vs. MxR Plays.
Depending on the specific details of what you're actually doing in each specific case, it may or may not be Fair Use (that case was not), but any dispute over Fair Use must be decided in court, case-by-case. There's no cut-and-dried rule, only guidelines.

If you have specific, written permission to do *exactly* what you're doing with it, then you're good. And you can ask for the original file while you're at it, which would bypass this thread altogether.
 
Last edited:

obsuser101

New Member

AaronD,​

we have already concluded that it is possible to set necessary resolution of output file in OBS. It is just not as convenient as in some other programs.
Do you want to say that such inconvenience is done on purpose?

The Curies discovered radioactivity. Radioactivity is used in completely various areas of humanity.
Should Curie's invention be blamed for the fact that so many people suffered from the use of nuclear weapons? I am trying to point out that my proposal is not at all aimed at violating copyright. But you still lead me into the topic of copyright. For what?
Also repeat that the necessary functionality is present in OBS. It's just more friendly in other programs. Was the functionality deliberately made unfriendly? I doubt
The ethical aspects should be discussed in other threads. This thread is about the technical side. Am I wrong?
 

AaronD

Active Member
we have already concluded that it is possible to set necessary resolution of output file in OBS. It is just not as convenient as in some other programs.
Do you want to say that such inconvenience is done on purpose?
Each dev team decides for themselves what they want to do. Part of that decision is coding convenience, part is a small team with a big backlog, and part is legal risk. If other teams are okay with being accused of facilitating illegal activity, that's on them. Whether that accusation sticks is a different question.

And yes, there are in fact multiple ways to do it in OBS as well. I'm just saying that this is one of several ways that people commonly steal copyrighted works and use them without permission, and that puts an extra burden on the original poster to convince a bunch of us that you're not doing that, before we help you.

And even then, some of us won't touch it, to avoid falling for the ChatGPT trick of asking hypothetically or in other creative ways to get the answer anyway of how to steal stuff.

I am trying to point out that my proposal is not at all aimed at violating copyright.
Maybe I missed something, but that's the first time I've seen you claim that.

However, simply "not intending" does nothing for the actual fact that you are (if in fact you are); and most legal systems only care that you are, and not about intent.

But you still lead me into the topic of copyright. For what?

The ethical aspects should be discussed in other threads. This thread is about the technical side. Am I wrong?
Technical alone, encourages people who only see the technical threads and don't know anything else, to violate everything. Like all of engineering and communication, ethics and responsibility must be baked into ALL of it. Those who can't or don't know to restrain their own power, should not have it to start with.

If what you're doing is in fact legal (make sure you KNOW that, and demonstrate that knowledge; don't just decree it), then we can be free to discuss the technical things. But so many people "just want to" do things that are in fact illegal, that we can't just blindly encourage that. So a number of us require convincing that you're not one of those.

---

My whole purpose here, is to explain the climate. Any sense of arguing with you or forcing things down your throat are your own invention.

We're more than happy to discuss the technical stuff, so long as we don't feel like accomplices to a crime.

I know it's frustrating, but don't blame me or those that share my viewpoint. Blame the ignorant kids that can't be derailed from a singular desire that is in fact illegal to do, and the inability to tell for a while, which new users are going to do that and which are actually responsible.
 

obsuser101

New Member
in one country there is a saying "prove that you are not a giraffe". How to prove it and how would you react to such a request? Your arguments and evidence may be considered unconvincing. And what then?

In my examples (screenshots), I should not have used material related to copyright. I would have taken any other material with a freely distributed license (for example) and we would have avoided the ethical and legal routine.

What I am proposing does not really meet the needs of illegal production. A screencast will in any case negatively affect the quality of the material. Why make a screencast if there are a number of options to make it faster, easier and avoid loss of quality?

Argument two: Bandicam has the functionality I am describing. The license costs $45. Even easier to get a "cured" version by typing the necessary words into Google. However, can get a virus

Argument three: OBS already has the necessary functionality. As described above - simply enter the required values manually. This method is absolutely working. Simply enter the required resolution in the "base (canvas) resolution" section. And then select the screen fragment you need for the screencast.
1727567645147.png


In other programs, you can select the required fragment using sliders and "arrows". But you can do the same in OBS, right? You'll just get black bars in the output file and that's it! Are these black bars in the output file an insurmountable obstacle to illegal production?? Thanks to these black bars in output file - OBS cannot be used illegally? Do you think so? I hope this is not a prank :)
And I repeat that it is possible to avoid black bars in OBS. It's just not very convenient.

Here is a part of the list of my screencast. Pay attention to the length of the content. These are short videos. Less than a minute long. (very short fragments - failed takes) This once again confirms my words that I use the screencast for personal purposes, without any kind of trade.
You may notice that I have already addressed the forum a long time ago. Even then, I wanted to migrate from shareware to open source. However, at that time, OBS did not suit me. A few years later, I wanted to see if the functionality I need that is available in another well-known program is available today. I like open source: it is great that you can try to make the program a little better. I actively use GIMP, MPC HC, I really like Blender. I have profiles on such sites as GitHub (making bug reports)

1727567678380.png
 

AaronD

Active Member
In my examples (screenshots), I should not have used material related to copyright. I would have taken any other material with a freely distributed license (for example) and we would have avoided the ethical and legal routine.
Yes.

But like I said, there are so many clueless people that "only want to" grab their favorite short clips, use the whole clip each time, and then plug their Patreon or whatever because that's their job (blatant copyright violation, no hope of Fair Use)...that a number of us would still require you to go over the top right up front to "prove that you're not a giraffe". If you don't offer that proof right up front, before we have a chance to coach you, then you acquire that label by default, and now you're fighting to get rid of it.

And even if you did do that, there are still some of us that would see it as an "AI prompt" trick, and just not touch this topic at all, ever.
 
Last edited:
Top