mangui / mangui/flashls

608/708 CC SEI parsing issue

Open
#471 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ActionScript
Stars
744
Forks
259
PR merge metrics
No merged PRs in 30d

Description

Hi @mangui and @jlacivita

We tested the 608/708 CC implementation using streams from two different encoders and we are able to display them fine (using OSMFCClib) in one case but not the other one.
We spent some time analyzing, researching and debugging and we think we know the reason.
First of all here: https://en.wikipedia.org/wiki/CEA-708 you will find this note:
NOTE: the SEI depending on the encoder can contain more payloads than just the captions, so one would need to navigate all payloadTypes contained within.
Secondly you can see that exoplayer probably had a similar issue:

https://github.com/google/ExoPlayer/issues/295

and implemented a fix for it:

https://github.com/google/ExoPlayer/commit/b5100886896ad35a32e6105a9d005c3209a81a9b

(reading the SEI happen in a while loop after the fix).

https://github.com/google/ExoPlayer/blob/master/library/src/main/java/com/google/android/exoplayer/extractor/ts/SeiReader.java#L47

We have implemented a similar fix and it seems to improve the situation a lot (we start seeing the captions) but not completely. Sometimes we seem to still miss some text (the byte array seems to be corrupted), but it is a very promising start.

Here you can find a test stream that has 608 CC that shows the issue.

http://demo.deltatre.it/cc-test/QualityLevels(1400000)/Manifest(video,format=m3u8-aapl).m3u8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the 608/708 caption SEI parsing path and compare its payload traversal with ExoPlayer's SeiReader loop referenced in the issue. Use the linked m3u8 test stream to reproduce the problem, then verify that captions are displayed without missed text or corrupted byte arrays.

Written by the indexing model from the issue text.

Assessment

Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.