Closed evanfarina closed 2 years ago
Hey @evanfarina , I grabbed a random segment in the middle of the stream and ran mediainfo
on it and it shows two text tracks, one 608 and one 708:
Text #1
ID : 300 (0x12C)-CC1
Menu ID : 1 (0x1)
Format : EIA-608
Muxing mode : SCTE 128 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 2 s 1 ms
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
CaptionServiceName : CC1
Text #2
ID : 300 (0x12C)-1
Menu ID : 1 (0x1)
Format : EIA-708
Muxing mode : SCTE 128 / DTVCC Transport
Muxing mode, more info : Muxed in Video #1
Duration : 2 s 1 ms
Bit rate mode : Constant
Stream size : 0.00 Byte (0%)
Thanks, @gesinger! I can confirm that I'm seeing the same output for multiple segments throughout the stream. It seems like different parsers provide different outputs. But, I think there is still an issue here which is that the player is showing two caption options when each contains the exact same text. Notice that for the same stream Safari only shows one. Should we fix this at the public player level or is it preferred that I handle this in my company's internal player?
@evanfarina afaik, Safari doesn't support 708 captions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
I'm seeing an issue where ffmpeg and the player disagree on which in-band captions exist within the video stream. ffmpeg shows a single subtitle track 'eia_608' whereas the player is parsing both 608 and 708 captions. More details about the stream, how I'm testing, what I've found happening in the player, and expected behavior are outlined below.
Sources
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
https://streamweu-livectorprodmedia17-euwe.licdn.com/26a5d57a-de50-47c0-a3ca-676e34b35ef1/L4E5f1d4af9aa014000-livemanifest.ism/manifest(format=m3u8-aapl-v3)
for the stream andapplication/x-mpegURL
for thetype
Results
Expected
The player should not find caption tracks that are not present in ffmpeg's output.
Additional Information
Here is the ffmpeg command used to verify the in-band captions:
ffmpeg -f lavfi -i "movie=file2.ts[out0+subcc]" -map s output.srt
Wherefile.ts
was this segment`.ffmpeg output:
Debug notes
The captions are first parsed by the
parseCaptionPackets
function. In this function, the below code determines the caption'stype
:Once the
type
is returned from the above call,CaptionStream$1.prototype.flushStream
runs the following logic wheretype
is used to decide whether a caption is608
or708
:I don't fully understand the bitwise operation happening in the above
parseCaptionPackets
logic (If someone would like to explain it to me I'd really appreciate it) but assuming ffmpeg's parser is correct, it seems like there is a bug in the assignment oftype
videojs-http-streaming version
what version of videojs-http-streaming does this occur with? I believe the demo page points to 'main'
Browsers
what browsers are affected? please include browser and version for each
Platforms
what platforms are affected? please include operating system and version or device and version for each
Other Plugins
are any other videojs plugins being used on the page? If so, please list them with version below.
Other JavaScript
are you using any other javascript libraries or frameworks on the page? if so please list them below.