xObsAsyncImageSource - Asynchronous image source

xObsAsyncImageSource - Asynchronous image source v1.0

ZeroEnna

New Member
I'm using Python to take a screenshot and write the file, afterwards I send the script into a wait loop.
what I could try is to write a second script (Powershell this time) to copy the file from my NAS to my local hard drive to get a clean handle release.
But first I want to get your plugin running. As I am also going to switch the PC to a newer model with a better GPU (GTX 1060 vs GTX 2080), I think it's a good time for a fresh start.
I'll keep you updated whether changing the PC has resolved the "OBS crash" problems I had.
 

YorVeX

Member
I'm using Python to take a screenshot and write the file, afterwards I send the script into a wait loop.
Remember what I said, programmers not considering they have to actively release the file lock after accessing the file is a very common cause of problems. Which raises the obvious question whether your Python script does that or not?
 

ZeroEnna

New Member
Remember what I said, programmers not considering they have to actively release the file lock after accessing the file is a very common cause of problems. Which raises the obvious question whether your Python script does that or not?
Okay, I can report that after reinstalling my entire PC and reinstalling OBS and your Plugin from scratch, NO CRASHES can be reported. It works perfectly fine.
Thank you very much for this awesome add-in to OBS
 

YorVeX

Member
Okay, I can report that after reinstalling my entire PC and reinstalling OBS and your Plugin from scratch, NO CRASHES can be reported. It works perfectly fine.
Thank you very much for this awesome add-in to OBS
Happy to hear that!
 

TECHNICKER

New Member
when I try to use the async image input in Aitum vertical plugin as a source, it failes to load the file and crashes the whole thing
 

Attachments

  • 2023-08-24 19-36-12.txt
    103.4 KB · Views: 18
  • 2023-08-24 15-12-19.txt
    363 KB · Views: 14

YorVeX

Member
when I try to use the async image input in Aitum vertical plugin as a source, it failes to load the file and crashes the whole thing
The image file path looks weird to me:
Code:
19:41:35.654: [xObsAsyncImageSource] failed to load texture 'C:/Users/CvMO/Pictures/insta_modrá_dáda_CMYK'
19:41:36.121: Failed to open file 'C:/Users/CvMO/Pictures/insta_modrá_dáda_CMYK': No such file or directory
19:41:36.121: WIC: Failed to create IWICBitmapDecoder from file: C:/Users/CvMO/Pictures/insta_modrá_dáda_CMYK
19:41:36.121: gs_image_file_init_internal: Failed to load file 'C:/Users/CvMO/Pictures/insta_modrá_dáda_CMYK'

Image files usually end with a file extension representing the image type, for example .png, .jpeg or .gif, your file doesn't have such an extension at all.
insta_modrá_dáda_CMYK looks more like it's a directory name or maybe the rest is missing. Is there maybe a special character at the point where the original name continues? Can you please retry to rename the image to something that doesn't contain any special characters or characters with accents and see whether that is loading correctly?

Also do I see it right from your log that you also tried the standard image source from OBS and got the same issue? This would make sense to me, since my plugin uses the same internal image loading functions, so they would suffer from the same problems (e.g. not being compatible to certain special characters in the file name).
 

kronos1972

New Member
Is it possible to have aversion of this source backwards compatible with 27.1.3?

My setup with this version works perfectly except for render lag in DSKs where displayed images change during runtime....
 

YorVeX

Member
Is it possible to have aversion of this source backwards compatible with 27.1.3?

My setup with this version works perfectly except for render lag in DSKs where displayed images change during runtime....

My plugins depend on the NetObsBindings library, and the first version which was ever released of that library started with OBS 28+ compatibility, a version for older versions never existed. Technically it should be possible to compile a version of this library against an older OBS version and then compile my plugin against that, so whoever wants it, feel free to try compile this yourself, source codes are all available. But personally I have zero motivation to do this, I always try to go with the latest OBS version.

I am hanging around a lot on the Discord OBS and in 99 of 100 cases when someone there asks about 27+ plugins they were sticking to the old OBS version simply based on a misconception that certain plugins they were using aren't compatible yet with 28+, and when looking closer that turns out to not be true, there are really only very few plugins left which really aren't compatible with newer versions anymore.
So I'd suggest to just try and invest your energy into upgrading OBS and the plugins you need first and see where this leads you, instead of into trying to making it work with the outdated version, which will become harder and harder every day.
 

YorVeX

Member
For those of you who want this also for the image slideshow, the upcoming OBS 30.1 release will have a reworked slideshow that will no longer have the old limits and will also load images asynchronously. If you can't wait, you can already try out the current beta 1 of it from here.

The reworked Image Slideshow source loads files asynchronously and fixes an issue where the slideshow would loop before showing all images. To change existing Image Slideshow sources to the new version, you must recreate them. Existing Image Slideshow sources will continue functioning as before.
 

lcalder

Member
Is this something that can be ported to MacOS?
I was using on PC, but now am mostly using Mac M1/M2/M3...
 

YorVeX

Member
Is this something that can be ported to MacOS?
I was using on PC, but now am mostly using Mac M1/M2/M3...
The .NET NativeAOT platform my OBS plugins (including this) are based on supports compiling for Mac, and someone has already reported that they've successfully built and run one of my plugins there. So there is not really any porting necessary, it just needs to be compiled from source on a Mac. Unfortunately I myself don't have a Mac and also have zero experience with it whatsoever. I may look at it in the future, but it's pretty low priority for me. I am mostly hoping that someone else with experience in this area jumps in and creates some instructions on how to do it.
 

lcalder

Member
I haven't compiled any OBS plugins on my Mac yet, but in another life (20years ago) I wrote and designed systems in C on Unix systems... I might give it a try. Thanks for your work!
 
Top