google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

EAI-708 support #1807

Open zsmatyas opened 8 years ago

zsmatyas commented 8 years ago

Previous version of the v1 and v2-dev branches had the entire SEI data put into a buffer and then read by the Eia608Parser. The parser had a check that the type and validity bits are set to channel 1 of the 608 content, and everything else was dropped. See: V1 if (ccType != 0) { seiBuffer.skipBits(16); continue; } Here the ccType values mean:

As only value 0 was handled, and no additional checks were used to separate channel 1 and 2: a single 608 channel was supported. I added my additional channel and EIA-708 support by updating the Eia608Parser to collect the data instead of dropping it, so channel 3-4 and EIA-708 bits were collected and parsed appropriately.

In the latest v2 code, all these additional data are dropped at SeiReader level: V2 like: if (ccValidityAndType != 0x04) { seiBuffer.skipBytes(2); } The change was: Link

SeiReader seems to be the correct location to filter 608/708 and channel information, but needs serious changes in the architecture I had. Are you guys planning to ever support EIA-708 (as it is an FCC requirement from 2017)? Did you consider supporting the other channels of EIA-608? Any similar changes like the one you made in the v2-dev branch requires lots of changes to support all subtitles correctly, that is why I am interested in the plans about supported formats.

Are you willing to accept pull requests related to these features or are you maybe already working on these issues?

Big Thanks!

ojw28 commented 8 years ago

@cdrolle is looking at 708 support. Could you comment on the above? Thanks!

zsmatyas commented 8 years ago

Any news? :chicken:

zsmatyas commented 8 years ago

:honey_pot:

zsmatyas commented 7 years ago

Any comments about your implementation plans? I have the 708 parser implemented, I would gladly contribute if our code changes can be aligned. (As my V1 parsing is not compatible with the current state of V2)

ojw28 commented 7 years ago

We have some 708 code internally that hasn't been pushed to GitHub yet. @cdrolle - Can you make it happen? Thanks.

ojw28 commented 7 years ago

The change above adds what we've done so far, but it's not yet a complete solution. Some further work is needed on the MediaSource/Extraction side to expose the CEA-708 tracks so that they can be selected for rendering.

roticv commented 7 years ago

What's the current state of getting the github version up to date with the 708 changes?

ebr11 commented 6 years ago

Hi. Has there been any further movement on this 708 support?

roticv commented 6 years ago

Last I have looked 708 decoder is found: https://github.com/google/ExoPlayer/blob/release-v2/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java

zsmatyas commented 6 years ago

@roticv That is for 608, not 708. I think there are a few pull requests pending for quite improved 608 and 708 support. Unfortunately, it seems they wont be merged in this form as reviewing them is quite difficult.

Reworking the pull requests into smaller digestible changes will take some time.

sneelavara commented 3 years ago

@ojw28 is there any plan to add full support for CEA-708. We have requirement to enable CEA-708. It would be helpful if this gets some priority.

@zsmatyas we have tried Sarnoff streams with #4595 changes. It works much better with that. But still there are many outstanding issues. We are happy to help in #4595 merge (and further improvement). Please let us know. Thanks.

ojw28 commented 3 years ago

We don't have capacity to work on this any time soon. We would welcome high quality external contributions. In terms of what that means, I think we'd be looking for:

  1. Small incremental changes that are relatively easy to reason about, and are amenable to careful code review
  2. Test cases and/or content that (a) allow manual validation of the changes being made, and (b) can be used by tests
sneelavara commented 3 years ago

@ojw28 I have sent the test stream links over developer email. Please have a look at them. We are exploring the way to add unit test cases. If you have an inputs and/or pointers to look at, would be very helpful. Thanks.