obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.39k stars 7.99k forks source link

[OBS 28.01/macOS M1] Stinger track matte transition lags #7356

Open benjamindittwald opened 2 years ago

benjamindittwald commented 2 years ago

Operating System Info

macOS 12

Other OS

No response

OBS Studio Version

28.0.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/sBVbRFECCov6jbaw

OBS Studio Crash Log URL

No response

Expected Behavior

The stinger transition with track matte runs smooth and finishes within 3 seconds (length of video). Scene is changing accordingly.

Current Behavior

The stinger track matte transition is very slow. After 3 seconds the track matte is only about half way animated. After the 3 seconds the track matte video is cut and the scenes are just switching, like a cut transition.

Steps to Reproduce

  1. Use a QuickTime formatted, HQX typed, Grass Valley encoded, 3840x1080 track matte video file with alpha channel
  2. Configure OBS to use this file as stinger transition with track matte (side-by-side)
  3. Hardware encoder on / off doesn't matter
  4. Do a scene switch with the stinger transition activated
  5. The transition runs very slow and gets cut off when the video expires

Anything else we should know?

I was using the same stinger video on OBS 27.2.4 on the same machine before and is was working well. I notice that the CPU load goes over 110 % when the transition is running. I'm working on a macBook Pro M1 MAX.

Transition is working smooth if the stinger video has no alpha channel.

UPDATE: Works when I use ffmpeg to convert the .mov to .webm.

PatTheMav commented 2 years ago

Would you be able to provide the stinger file used? Without it we aren't really able to reproduce the issue.

benjamindittwald commented 2 years ago

@PatTheMav Thanks for the reply. Sure! The file is bigger than 10MB. You can download it from here: https://ufile.io/0rqisizk The download will expire in ~30 days.

PatTheMav commented 2 years ago

I can confirm that playback of that source file is indeed very sluggish - one only needs to add this file as a media source and just play it back.

Profiling suggests that FFmpeg's swscale eats up an enormous amount of CPU time converting the video to whichever output format is set - skipping that step leads to fluid output (but colours are all mangled of course).

Still, FFmpeg spawns lots of threads when decoding the file, each taking up lots of CPU time as well - it's not dissimilar to what we observed with ProRes files in the past, mainly that we choke on high-bitrate and high resolution files.

Converting to webm with alpha thus seems to be the best course of action for now.