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
59.17k stars 7.87k forks source link

VLC Video Source unexpected behaviors when having mixed audio and video files in the playlist. #3410

Open CodeYan01 opened 4 years ago

CodeYan01 commented 4 years ago

Platform

Operating system and version: Windows 10 Pro 64-bit (Build 19041) OBS Studio version: 25.0.8 64-bit and 26.0.0-rc1 64-bit

Expected Behavior

After playing a video file and the next is an audio file, the video should disappear. The audio should then play normally (monitored through internal speakers).

Current Behavior

The video file keeps the frame where it stopped (either by reaching the end of the video, or using the "Next in Playlist" Button. The audio seems to be captured as the audio meter shows audio levels, but nothing is heard from the monitoring device. Furthermore, if the next one after the audio is another video, a little bit (a little quicker than should be, and has cuts) of the audio file is heard while the video plays. The audio from the video is not heard during this time. Then, the audio file stops and the audio from the video starts (totally unsynced).

Steps to Reproduce

  1. Start OBS
  2. Start with a new Scene
  3. Add a VLC Video Source
  4. Add files to it in this order: 1 video file, 1 audio file, 1 video file
  5. In the Advanced Audio Properties, set its Audio Monitoring type to Monitor and Output
  6. In Settings > Audio > Monitoring Device, select your internal speakers (or whatever you want to use).
  7. Start it, and press the "Next in Playlist" button (or use the hotkey). Waiting for the video to end also does it.
  8. The video frame will freeze, while the audio file supposedly works. Nothing is heard, however, even if you skim through it.
  9. Press the "Next in Playlist" once more to go the second video file. The video will show properly, but the audio will come from the audio file (will be heard).
  10. Let it be like that for a few moments, and the audio from the audio file will stop while the video continues. The audio from the video will start (out of sync).

Additional information

I tried both skimming the video and audio, and letting it finish on its own, but the results are the same.

Seems to occur even if I use a .m3u8 file.

The audio issue seems to be affecting only the monitoring, as the audio from the recording seems fine. The video issue (keeping its frame even if its playing the audio file) however affects both.

RytoEX commented 1 year ago

At present, there are 367 open Issues, as well as 235 open Pull Requests that require our attention, not to mention other items that vie for our attention. We have previously reviewed this Issue internally, and our notes from that review simply say:

Check if it's related to #7552

If I had to guess, there is probably some behavior here where we're checking if there's a video frame ready to render for certain code paths, and since audio files do not have video frames, that trips something up. That said, I have not personally debugged this, so this is merely an uneducated guess.

This behavior, while unfortunate, is not something like an application crash which we would prioritize as higher severity. We do periodically review and revisit all open Issues, but as mentioned earlier, there are enough things that require our attention that we cannot review all open Issues even every month. It takes a considerable amount of time to review and revisit all open Issues before taking into account new Issues that are opened over time. We will, of course, look into things as time allows, but it may take a while before someone has time to circle around to this. In the mean time, we would also welcome someone else to investigate the issue and possibly submit a Pull Request that attempts to resolve it. Thank you for your understanding.