Attempt to fix MISSING_FORMAT_FIELD error in live videos
This commit is contained in:
1 parent
ef39f1c34b
commit
7f7cf55486
2 files changed
+9
-5
No files matched your search
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Attempt to fix `MISSING_FORMAT_FIELD` error in live videos
|
||||||
|
|
||||||
## [0.47.3] - 2026-06-23
|
## [0.47.3] - 2026-06-23
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import "pkg:/source/utils/ObjectUtils.bs"
|
|||||||
import "pkg:/source/utils/OptionUtils.bs"
|
import "pkg:/source/utils/OptionUtils.bs"
|
||||||
import "pkg:/source/utils/TimeUtils.bs"
|
import "pkg:/source/utils/TimeUtils.bs"
|
||||||
|
|
||||||
' DEBUG-only: force the downgrade retry on every non-live VOD.
|
' DEBUG-only: force the SABR downgrade retry on every playable response.
|
||||||
#const DEBUG_FORCE_SABR_DOWNGRADE = false
|
#const DEBUG_FORCE_SABR_DOWNGRADE = false
|
||||||
|
|
||||||
namespace InnertubeService
|
namespace InnertubeService
|
||||||
@@ -84,6 +84,7 @@ namespace InnertubeService
|
|||||||
' Under server-driven ABR the TV client can withhold every adaptive format URL (stuck
|
' Under server-driven ABR the TV client can withhold every adaptive format URL (stuck
|
||||||
' at 360p); the downgraded TV client is not served SABR. Retry once with it.
|
' at 360p); the downgraded TV client is not served SABR. Retry once with it.
|
||||||
if client = Innertube.ClientType.Tv and IsSabrLocked(playerResponseJson)
|
if client = Innertube.ClientType.Tv and IsSabrLocked(playerResponseJson)
|
||||||
|
LogInfo("SABR-locked response, retrying with downgraded TV client...")
|
||||||
client = Innertube.ClientType.TvDowngraded
|
client = Innertube.ClientType.TvDowngraded
|
||||||
continue while
|
continue while
|
||||||
else if client = Innertube.ClientType.TvDowngraded and not HasUsableAdaptiveUrl(playerResponseJson)
|
else if client = Innertube.ClientType.TvDowngraded and not HasUsableAdaptiveUrl(playerResponseJson)
|
||||||
@@ -146,14 +147,11 @@ namespace InnertubeService
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
' True when the TV client's response is SABR-locked: server-driven ABR signaled with no usable
|
' True when the TV client's response is SABR-locked: server-driven ABR signaled with no usable
|
||||||
' adaptive URL (non-live VOD with streamingData).
|
' adaptive URL.
|
||||||
function IsSabrLocked(playerResponseJson as object) as boolean
|
function IsSabrLocked(playerResponseJson as object) as boolean
|
||||||
if not IsAssociativeArray(ObjectUtils.Dig(playerResponseJson, ["streamingData"]))
|
if not IsAssociativeArray(ObjectUtils.Dig(playerResponseJson, ["streamingData"]))
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
if ValidBool(ObjectUtils.Dig(playerResponseJson, ["videoDetails", "isLive"]))
|
|
||||||
return false
|
|
||||||
end if
|
|
||||||
serverDrivenAbr = ValidBool(ObjectUtils.Dig(playerResponseJson, ["playerConfig", "mediaCommonConfig", "useServerDrivenAbr"]))
|
serverDrivenAbr = ValidBool(ObjectUtils.Dig(playerResponseJson, ["playerConfig", "mediaCommonConfig", "useServerDrivenAbr"]))
|
||||||
locked = serverDrivenAbr and not HasUsableAdaptiveUrl(playerResponseJson)
|
locked = serverDrivenAbr and not HasUsableAdaptiveUrl(playerResponseJson)
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
Reference in new issue
Block a user