fix(vod-script): VOD track dropped when Enhanced Broadcasting is off - #69
Closed
Soulhackzlol wants to merge 1 commit into
Closed
Soulhackzlol wants to merge 1 commit into
Soulhackzlol wants to merge 1 commit into
Conversation
OBS's clear_archive_encoder (StartStreaming -> SetupVodTrack, every version 28-32) calls obs_encoder_release() on the index-1 encoder it only borrowed. On the plain stream outputs (adv_stream / simple_stream) that stray release destroyed our freshly attached encoder before the stream started, so OBS sent a single audio track and Twitch had no VOD audio. Only Enhanced Broadcasting worked, because it streams through a separate multitrack output that clear_archive_encoder never touches. On plain outputs, hand our create-reference to OBS instead of releasing it: the stray release consumes it and the output stays the sole owner. The post-start check now always warns when an attached track went missing, instead of only in verbose mode.
Owner
Author
|
Superseded: the same fix ships in 0.1.15 as d0a360e on feature/crash-protection (first in v0.1.15-rc.1). It reaches main when 0.1.15 merges. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A user reported no Twitch VOD audio. With verbose logging on, the script logged
VOD track attached, but the post-start check saididx1 present=false ours=false, and the InstantClone trace showed a single audio track from OBS.Cause
AdvancedOutput::StartStreaming->SetupVodTrack->clear_archive_encoder(same in OBS 28 through 32.2) does:The script hands its create-ref to the output right away, so the output holds the only reference. The stray release brings that to zero.
obs_encoder_destroythen detaches the encoder from the output beforeobs_output_start.Enhanced Broadcasting was not affected. It streams through the separate
rtmp multitrack videooutput, andclear_archive_encoderonly touches the plainstreamOutput. That is why EB + VOD passed the live test.Fix
adv_stream/simple_stream), the script keeps its create-reference for OBS's stray release to consume. The output ends up as the sole owner, and nothing is released after the stream starts, so the earlier crash pattern does not come back.Test plan