Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DASH live stream with subtitle track doesn't show subtitles #6902

Closed
f1multiviewer opened this issue Jun 24, 2024 · 8 comments
Closed

DASH live stream with subtitle track doesn't show subtitles #6902

f1multiviewer opened this issue Jun 24, 2024 · 8 comments
Labels
component: captions/subtitles The issue involves captions or subtitles component: TTML The issue involves TTML subtitles specifically type: bug Something isn't working correctly
Milestone

Comments

@f1multiviewer
Copy link

f1multiviewer commented Jun 24, 2024

Have you read the FAQ and checked for duplicate open issues?
Yes

If the problem is related to FairPlay, have you read the tutorial?

Not related to FairPlay

What version of Shaka Player are you using?

4.9.9

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Not sure how to test this

Are you using the demo app or your own custom app?
Custom app

If custom app, can you reproduce the issue using our demo app?
No because of CORS

What browser and OS are you using?
Electron, macOS

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A

What are the manifest and license server URIs?

Dynamic manifest, with geo-restrictions, and widevine with auth (from F1 TV), only available during live sessions, otherwise service uses DASH.

repro-case.zip (wasn't able to grab the original manifest, but got the parsed manifest for this one, then fetched a new manifest for the same media, so hopefully this is correct)

What configuration are you using? What is the output of player.getConfiguration()?

Show JSON
{
    "drm": {
        "retryParameters": {
            "maxAttempts": 2,
            "baseDelay": 1000,
            "backoffFactor": 2,
            "fuzzFactor": 0.5,
            "timeout": 30000,
            "stallTimeout": 5000,
            "connectionTimeout": 10000
        },
        "servers": {},
        "clearKeys": {},
        "advanced": {},
        "delayLicenseRequestUntilPlayed": false,
        "persistentSessionOnlinePlayback": false,
        "persistentSessionsMetadata": [],
        "logLicenseExchange": false,
        "updateExpirationTime": 1,
        "preferredKeySystems": [],
        "keySystemsMapping": {},
        "parseInbandPsshEnabled": false,
        "minHdcpVersion": "",
        "ignoreDuplicateInitData": true
    },
    "manifest": {
        "retryParameters": {
            "maxAttempts": 2,
            "baseDelay": 100,
            "backoffFactor": 2,
            "fuzzFactor": 0.5,
            "timeout": 30000,
            "stallTimeout": 5000,
            "connectionTimeout": 10000
        },
        "availabilityWindowOverride": null,
        "disableAudio": false,
        "disableVideo": false,
        "disableText": false,
        "disableThumbnails": false,
        "defaultPresentationDelay": 0,
        "segmentRelativeVttTiming": false,
        "raiseFatalErrorOnManifestUpdateRequestFailure": false,
        "dash": {
            "clockSyncUri": "https://api.multiviewer.app/api/v1/time",
            "ignoreDrmInfo": false,
            "disableXlinkProcessing": false,
            "xlinkFailGracefully": false,
            "ignoreMinBufferTime": true,
            "autoCorrectDrift": false,
            "initialSegmentLimit": 1000,
            "ignoreSuggestedPresentationDelay": true,
            "ignoreEmptyAdaptationSet": false,
            "ignoreMaxSegmentDuration": false,
            "keySystemsByURI": {
                "urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b": "org.w3.clearkey",
                "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e": "org.w3.clearkey",
                "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": "com.widevine.alpha",
                "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready",
                "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready"
            },
            "sequenceMode": false,
            "enableAudioGroups": false,
            "multiTypeVariantsAllowed": true,
            "useStreamOnceInPeriodFlattening": false,
            "updatePeriod": -1,
            "enableFastSwitching": true
        },
        "hls": {
            "ignoreTextStreamFailures": false,
            "ignoreImageStreamFailures": false,
            "defaultAudioCodec": "mp4a.40.2",
            "defaultVideoCodec": "avc1.42E01E",
            "ignoreManifestProgramDateTime": false,
            "ignoreManifestProgramDateTimeForTypes": [],
            "mediaPlaylistFullMimeType": "video/mp2t; codecs=\"avc1.42E01E, mp4a.40.2\"",
            "useSafariBehaviorForLive": true,
            "liveSegmentsDelay": 1,
            "sequenceMode": true,
            "ignoreManifestTimestampsInSegmentsMode": false,
            "disableCodecGuessing": false,
            "disableClosedCaptionsDetection": false,
            "allowLowLatencyByteRangeOptimization": true
        },
        "mss": {
            "sequenceMode": false,
            "keySystemsBySystemId": {
                "9a04f079-9840-4286-ab92-e65be0885f95": "com.microsoft.playready",
                "79f0049a-4098-8642-ab92-e65be0885f95": "com.microsoft.playready"
            }
        }
    },
    "streaming": {
        "retryParameters": {
            "maxAttempts": 10,
            "baseDelay": 200,
            "backoffFactor": 2,
            "fuzzFactor": 0.5,
            "timeout": 10000,
            "stallTimeout": 5000,
            "connectionTimeout": 10000
        },
        "rebufferingGoal": 0.1,
        "bufferingGoal": 60,
        "bufferBehind": 60,
        "evictionGoal": 1,
        "ignoreTextStreamFailures": true,
        "alwaysStreamText": false,
        "startAtSegmentBoundary": true,
        "gapDetectionThreshold": 0.1,
        "gapJumpTimerTime": 0.25,
        "durationBackoff": 0,
        "safeSeekOffset": 5,
        "stallEnabled": true,
        "stallThreshold": 1,
        "stallSkip": 0.1,
        "useNativeHlsOnSafari": true,
        "useNativeHlsForFairPlay": true,
        "inaccurateManifestTolerance": 0,
        "lowLatencyMode": true,
        "autoLowLatencyMode": false,
        "forceHTTP": false,
        "forceHTTPS": false,
        "preferNativeHls": false,
        "updateIntervalSeconds": 0.1,
        "dispatchAllEmsgBoxes": false,
        "observeQualityChanges": false,
        "maxDisabledTime": 1,
        "parsePrftBox": false,
        "segmentPrefetchLimit": 5,
        "prefetchAudioLanguages": [],
        "disableAudioPrefetch": false,
        "disableTextPrefetch": false,
        "disableVideoPrefetch": false,
        "liveSync": false,
        "liveSyncTargetLatencyTolerance": 0.5,
        "liveSyncMaxLatency": 1,
        "liveSyncPlaybackRate": 1.1,
        "liveSyncMinLatency": 0,
        "liveSyncMinPlaybackRate": 0.95,
        "liveSyncPanicMode": false,
        "liveSyncPanicThreshold": 60,
        "allowMediaSourceRecoveries": true,
        "minTimeBetweenRecoveries": 5,
        "vodDynamicPlaybackRate": false,
        "vodDynamicPlaybackRateLowBufferRate": 0.95,
        "vodDynamicPlaybackRateBufferRatio": 0.5,
        "infiniteLiveStreamDuration": false,
        "preloadNextUrlWindow": 30,
        "loadTimeout": 30,
        "clearDecodingCache": false
    },
    "mediaSource": {
        "codecSwitchingStrategy": "smooth",
        "forceTransmux": false,
        "insertFakeEncryptionInInit": true
    },
    "offline": {
        "usePersistentLicense": true,
        "numberOfParallelDownloads": 5
    },
    "abr": {
        "enabled": true,
        "useNetworkInformation": true,
        "defaultBandwidthEstimate": 10000000,
        "switchInterval": 8,
        "bandwidthUpgradeTarget": 0.85,
        "bandwidthDowngradeTarget": 0.95,
        "restrictions": {
            "minWidth": 0,
            "maxWidth": null,
            "minHeight": 0,
            "maxHeight": null,
            "minPixels": 0,
            "maxPixels": null,
            "minFrameRate": 0,
            "maxFrameRate": null,
            "minBandwidth": 0,
            "maxBandwidth": null,
            "minChannelsCount": 0,
            "maxChannelsCount": null
        },
        "advanced": {
            "minTotalBytes": 128000,
            "minBytes": 16000,
            "fastHalfLife": 2,
            "slowHalfLife": 5
        },
        "restrictToElementSize": false,
        "restrictToScreenSize": false,
        "ignoreDevicePixelRatio": false,
        "clearBufferSwitch": false,
        "safeMarginSwitch": 0,
        "cacheLoadThreshold": 20
    },
    "autoShowText": 3,
    "preferredAudioLanguage": "",
    "preferredAudioLabel": "",
    "preferredTextLanguage": "",
    "preferredVariantRole": "",
    "preferredTextRole": "",
    "preferredAudioChannelCount": 2,
    "preferredVideoHdrLevel": "AUTO",
    "preferredVideoLayout": "",
    "preferredVideoLabel": "",
    "preferredVideoCodecs": [],
    "preferredAudioCodecs": [],
    "preferForcedSubs": false,
    "preferSpatialAudio": false,
    "preferredDecodingAttributes": [],
    "restrictions": {
        "minWidth": 0,
        "maxWidth": null,
        "minHeight": 0,
        "maxHeight": null,
        "minPixels": 0,
        "maxPixels": null,
        "minFrameRate": 0,
        "maxFrameRate": null,
        "minBandwidth": 0,
        "maxBandwidth": null,
        "minChannelsCount": 0,
        "maxChannelsCount": null
    },
    "playRangeStart": 0,
    "playRangeEnd": null,
    "textDisplayer": {
        "captionsUpdatePeriod": 0.25
    },
    "cmcd": {
        "enabled": false,
        "sessionId": "",
        "contentId": "",
        "rtpSafetyFactor": 5,
        "useHeaders": false,
        "includeKeys": []
    },
    "cmsd": {
        "enabled": true,
        "applyMaximumSuggestedBitrate": true,
        "estimatedThroughputWeightRatio": 0.5
    },
    "lcevc": {
        "enabled": false,
        "dynamicPerformanceScaling": true,
        "logLevel": 0,
        "drawLogo": false
    },
    "ads": {
        "customPlayheadTracker": false,
        "skipPlayDetection": false,
        "supportsMultipleMediaElements": true
    }
}

What did you do?

  1. Play manifest
  2. Enable subtitles

What did you expect to happen?
Subtitles show up (they do in other players, namely Bitmovin)

What actually happened?

No subtitles show up. They are being fetched, parsed, and added but it almost seems like either the timestamp is parsed wrong, or they are not showing outside of the bounds of the segment?

If I disable this code:

// Clip times to segment boundaries.
// https://github.com/shaka-project/shaka-player/issues/4631
start = Math.max(start, timeContext.segmentStart);
end = Math.min(end, timeContext.segmentEnd);

They do show up, just duplicated.

Are you planning send a PR to fix it?
I'm not sure I have the experience with Shaka that requires this.

@f1multiviewer f1multiviewer added the type: bug Something isn't working correctly label Jun 24, 2024
@shaka-bot shaka-bot added this to the v4.10 milestone Jun 24, 2024
@avelad avelad added component: TTML The issue involves TTML subtitles specifically component: captions/subtitles The issue involves captions or subtitles labels Jun 25, 2024
@avelad avelad modified the milestones: v4.10, v4.11 Jul 1, 2024
@f1multiviewer
Copy link
Author

We have supplied additional test instructions and a manifest to [email protected]

@the-alexandra-k
Copy link

@joeyparrish moving from email. The details were sent to [email protected]

@the-alexandra-k
Copy link

@theodab Did you have a chance to take a look at the details we emailed?

@f1multiviewer
Copy link
Author

If more information is required, please let us know. We'd be more than happy to provide additional data wherever we can. Thank you.

@avelad avelad modified the milestones: v4.11, v4.12 Sep 12, 2024
@the-alexandra-k
Copy link

@avelad @theodab hey guys, any insight here?

@the-alexandra-k
Copy link

@joeyparrish bringing this back up :)

@joeyparrish
Copy link
Member

Sorry, we haven't had time to work on this.

No subtitles show up. They are being fetched, parsed, and added but it almost seems like either the timestamp is parsed wrong, or they are not showing outside of the bounds of the segment?

I recommend you check the following:

  1. If you're using the UI, get the Player with player = video.ui.getControls().getLocalPlayer() and then check (uncompiled): player.mediaSourceEngine_.textDisplayer_.cues_ (in compiled or debug builds, you will need to find the minified names). That will let you see easily what cues have been parsed and sent for display.
  2. If you're not using the UI, try video.textTracks[0].cues for the same.

This will help you determine if the timestamps are the root of the problem. We can try to guide you further from there.

@avelad avelad modified the milestones: v4.12, v4.13 Nov 13, 2024
@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 14, 2024
@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: captions/subtitles The issue involves captions or subtitles component: TTML The issue involves TTML subtitles specifically type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

6 participants