Starting Scene doesn't play music in headphones.

JustinJTime

New Member
Hello,

I'm relatively new to OBS though I believe I got the hang of most of it and I'm going to go live with it tomorrow. The weird problem I am having though is that in my BRB screen and my Ending scenes playback the music in my headphones just fine. But when I go to my starting scene I see the audio bar moving but the music playback stops playing after I try to transition. When I stop it manually and reset it then it sometimes works and sometimes the music stops after a few seconds. I'm not sure what I'm missing here but I have the log here and hopefully someone can help me with this. Thanks!
 

Attachments

  • 2023-02-21 21-12-31.txt
    50.1 KB · Views: 19

Suslik V

Active Member
Are you sure that the log-file is from the session where the problem appeared?
(I have seen this kind of problems before but only when the log had "Failed to create IMMDeviceEnumerator" error).
 

JustinJTime

New Member
I just opened OBS this morning and as soon as it started, the music cut out like usual. I've enclosed the newest log from that session.
 

Attachments

  • 2023-02-22 06-25-32.txt
    48.9 KB · Views: 18

Suslik V

Active Member
Similar to the previous log, so it is a different issue, I think.

By "reset" you mentioned earlier - is it "restart the media playback" button? Or it is something else?
 

Suslik V

Active Member
You monitoring browser source too, this can be related to the issue.
From the log - the browser source generates errors in your setup:
Code:
Error: [Report Only] Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'none'".

You may want to look at the (permissions etc.):
https://obsproject.com/forum/thread...p-didnt-work-after-updating-to-obs-28.159343/
to fix browser source errors first.

But the simplest test is to make the Scene Collection copy (duplicate), remove the browser source from this copy, restart obs and see if there any changes.
 

JustinJTime

New Member
You monitoring browser source too, this can be related to the issue.
From the log - the browser source generates errors in your setup:
Code:
Error: [Report Only] Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'none'".

You may want to look at the (permissions etc.):
https://obsproject.com/forum/thread...p-didnt-work-after-updating-to-obs-28.159343/
to fix browser source errors first.

But the simplest test is to make the Scene Collection copy (duplicate), remove the browser source from this copy, restart obs and see if there any changes.
I tried doing both of these solutions and unfortunately nothing changed with it. I logged out and logged back in, nothing changed again :(
 

Suslik V

Active Member
Maybe your media files is something special that nobody else can reproduce your issue on theirs systems. Also, you said that only one scene stops your audio monitoring - it is strange.
 

JustinJTime

New Member
Maybe your media files is something special that nobody else can reproduce your issue on theirs systems. Also, you said that only one scene stops your Act
That's the odd thing, I tried changing the song to another one and the same issue happens. Not sure why :/ Anyway I'll send the lastest log again and see if there was anything changed.
 

Attachments

  • 2023-02-24 11-55-05.txt
    47.4 KB · Views: 20

JustinJTime

New Member
Okay one interesting thing I noticed is that after the first time it doesn't play, when it loops, then it starts playing like normal. Not sure if that has any significance but I figured I mention it if it helps narrow the problem down.
 

Suslik V

Active Member
Hard to reproduce it or steps not clear.

I made .html file from this code (under the spoiler):
HTML:
<!doctype html>
<html>

    <!-- Uncomment this to generate the CSP error
    <head>
        <meta http-equiv="Content-Security-Policy" content="script-src 'none';">
    </head>
    -->

    <body>
    <canvas id="test1" width="256" height="64" style="border:1px solid #c3c3c3; background-color:#F00000"></canvas>

    <script type="text/javascript">
        console.log("CSP: javascript works!");
        var canvas = document.getElementById("test1");
        var ctx = canvas.getContext("2d");
        const color_TEXT = "#000000";
        const color_BACKGND = "#FFFFFF";
        //canvas.style = "background-color:" + color_OK;
        ctx.fillStyle = color_BACKGND;
        ctx.fillRect(0, 0, 256, 64);
        ctx.fillStyle = color_TEXT;
        ctx.fillText("CSP: javascript works!", 11, 53);
        
        // For simple check - call the functions once,
        // don't check if anything is valid (transition names, started replay buffer etc).
        var current_access_level = "UNKNOWN";
        window.obsstudio.getControlLevel(function (level) {
            console.log("obs control level:" + level);

            if (level == 0) {
                current_access_level = "NONE";
            } else if (level == 1) {
                current_access_level = "READ_OBS (OBS data)";
                window.obsstudio.getStatus(function (status) {
                    console.log("obs status: " + status);
                    ctx.fillText("Recording started: " + status.recording, 11, 25);
                })
            } else if (level == 2) {
                current_access_level = "READ_USER (User data)";
                window.obsstudio.getCurrentScene(function(scene) {
                    console.log("obs scene: " + scene);
                    ctx.fillText("Current scene: " + scene.name, 11, 25);
                })
            } else if (level == 3) {
                current_access_level = "BASIC";
                window.obsstudio.saveReplayBuffer()
                console.log("obs save replay buffer");
                ctx.fillText("Replay buffer saved", 11, 25);
            } else if (level == 4) {
                current_access_level = "ADVANCED";
                window.obsstudio.getCurrentTransition(function (transition) {
                    console.log("obs current transition: " + transition);
                    if (transition != "Cut") { // Any but Cut
                        window.obsstudio.setCurrentTransition("Cut");
                        window.obsstudio.setCurrentTransition(transition);
                        ctx.fillText("Transition changed: " + transition + "->Cut->" + transition, 11, 25);
                    } else { // Cut
                        window.obsstudio.setCurrentTransition("Fade");
                        window.obsstudio.setCurrentTransition(transition);
                        ctx.fillText("Transition changed: Cut->Fade->Cut", 11, 25);
                    }
                })
            } else if (level == 5) {
                current_access_level = "ALL";
                window.obsstudio.pauseRecording();
                console.log("obs pause recording");
                window.obsstudio.unpauseRecording();
                console.log("obs unpause recording");
                ctx.fillText("Recording Paused/Unpaused", 11, 25);
            }

            ctx.fillText("ACCESS: " + current_access_level, 11, 11);
        })
    </script>
    </body>
</html>
So after minor modification it can generate the Content Security Policy (CSP) errors. Later I added simple embedded YouTube media to this page and set the browser source for monitoring. And sound from the other scene didn't disappeared or stops too early after transition...

At least, by this file I was able to hang OBS UI on some permission changes when actual recording was running, but that's all. Nothing special. Maybe my embedding of the media wasn't covered by the CSP error and thus the testing didn't revealed the problem.

As for the, CSP errors from your obs log - better to inform the streamelements site creators (it is not good to have this error on the web page, especially when you attempting to monitor the sounds from it), maybe they can point you to the solution.
 
Top