obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

SVG images silently fail on Windows while working as expected on Linux

Open qwertychouskie opened this issue 4 years ago • 9 comments

Platform

Operating system and version: Ubuntu 20.04 and Windows 7 OBS Studio version: 25.0.3 (Ubuntu)/25.0.8 (Windows)

Expected Behavior

When importing a scene on Windows that was created on Linux using SVG sources, all the image sources should work in the same way they do on the Linux installation.

Current Behavior

Using an SVG in an image source silently fails on Windows while it works as expected on Linux.

Steps to Reproduce

  1. Create a scene collection on Linux that uses SVG images
  2. Export the scene
  3. Import the scene in Windows
  4. Images don't display but no errors are given

Additional information

As a stopgap I will maintain PNG copies of all my images for the Windows system, but it'd be preferable to only maintain one set of images.

qwertychouskie avatar Sep 18 '20 18:09 qwertychouskie

When you say "using SVG images", what sort of source are you using to add them to your scene? Image source, media source, or something else?

dodgepong avatar Sep 18 '20 18:09 dodgepong

Also please provide a log. As a note here, exporting a scene collection does not include the content. This means any images, videos, etc. are not exported as part of the collection.

Fenrirthviti avatar Sep 18 '20 18:09 Fenrirthviti

Image source. I manually corrected the path on the Windows system to pint to the copied image but it still didn't display.

2020-09-18 12-07-24.txt

qwertychouskie avatar Sep 18 '20 19:09 qwertychouskie

Same error I'm getting:

14:27:26.785: warning: Could not find codec parameters for stream 0 (Video: svg, none): unspecified size
14:27:26.785: Consider increasing the value for the 'analyzeduration' and 'probesize' options
14:27:26.785: Failed to find decoder for file 'C:/Users/fenri/Desktop/Freesample.svg'
14:27:26.785: gs_image_file_init_internal: Failed to load file 'C:/Users/fenri/Desktop/Freesample.svg'
14:27:26.785: [image_source: 'Image 3'] failed to load texture 'C:/Users/fenri/Desktop/Freesample.svg'

Looks like the ffmpeg we ship on windows does not support svg.

Fenrirthviti avatar Sep 18 '20 19:09 Fenrirthviti

I can confirm I get the same error. A quick Google tells me "ffmpeg needs to be compiled with --enable-librsvg" (source)

WizardCM avatar Sep 24 '20 11:09 WizardCM

I know this thread is very old now but I was wondering if there was any plan to support SVG images for overlays in the future on Windows.

jbolduan avatar Sep 19 '22 19:09 jbolduan

I've never looked under the hood of this project but would I be correct in saying all that would need to happen is adding --enable-librsvg to the configure args here: https://github.com/obsproject/obs-deps/blob/master/deps.ffmpeg/99-ffmpeg.zsh ?

jbolduan avatar Sep 19 '22 19:09 jbolduan

While --enable-librsvg is what would be needed, we discussed this internally and decided that adding librsvg would introduce a large number of other dependencies that we are not comfortable adding at this time.

RytoEX avatar Sep 19 '22 19:09 RytoEX

Sounds good and thank you for the quick response! I appreciate the work everyone who maintains and develops OBS Studio does.

jbolduan avatar Sep 19 '22 20:09 jbolduan

Closing per above comments.

RytoEX avatar Oct 13 '22 19:10 RytoEX