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

Support for DVB EBU Teletext subtitles #5491

Open
wazerstar opened this issue Feb 10, 2019 · 27 comments
Open

Support for DVB EBU Teletext subtitles #5491

wazerstar opened this issue Feb 10, 2019 · 27 comments

Comments

@wazerstar
Copy link

wazerstar commented Feb 10, 2019

Issue description

Not being able to select subtitles from various "TV" providers that use TeleText / VBI Subtitles instead or DVB Subtitles.

Reproduction steps

I have provided iptv links from my private hdhomerun network that is up 24/7 and can be freely used by any exoplayer dev, file included is m3u list packed into a zip file.

quick and fast way i do is to use the brand new tivimate app on google store that uses exoplayer natively and then import the iptv channels that is affected, you will see quickly that you are not able to select subtitles at all.

Link to test content

https://mega.nz/folder/dBQSwaJL#MUgvR9DNiqkM59MRCSLhzQ

v25.mpeg contain dvb-sub so ignore this one.
The rest contain teletext,

Extracted via MediaInfo this sample is from v50.mpeg

General
ID                                       : 13 (0xD)
Complete name                            : C:\Users\wazer\Downloads\v50.mpeg
Format                                   : MPEG-TS
File size                                : 55.9 MiB
Duration                                 : 29 s 995 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 15.6 Mb/s
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID                                       : 111 (0x6F)
Menu ID                                  : 10101 (0x2775)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 27
Duration                                 : 29 s 440 ms
Bit rate                                 : 14.5 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : MBAFF
Scan type, store method                  : Interleaved fields
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 0.279
Stream size                              : 50.8 MiB (91%)
Language                                 : English
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 121 (0x79)
Menu ID                                  : 10101 (0x2775)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : 6
Duration                                 : 29 s 792 ms
Bit rate mode                            : Constant
Bit rate                                 : 384 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -37 ms
Stream size                              : 1.36 MiB (2%)
Language                                 : English
Service kind                             : Complete Main

Text #1
ID                                       : 131 (0x83)-691
Menu ID                                  : 10101 (0x2775)
Format                                   : Teletext Subtitle
Language                                 : Swedish

Text #2
ID                                       : 131 (0x83)-692
Menu ID                                  : 10101 (0x2775)
Format                                   : Teletext Subtitle
Language                                 : Norwegian

Text #3
ID                                       : 131 (0x83)-693
Menu ID                                  : 10101 (0x2775)
Format                                   : Teletext Subtitle
Language                                 : Danish

Text #4
ID                                       : 131 (0x83)-694
Menu ID                                  : 10101 (0x2775)
Format                                   : Teletext Subtitle
Language                                 : Finnish



Version of ExoPlayer being used

I know I should not use the terms latest, but I use the latest official updates on Mibox s (8.1) Mibox 3 (8) nvidia shield (8) all official android TV versions.

Device(s) and version(s) of Android being used

Android TV 8 shield/mibox 3/mibox s

More relevant info VLC+pics+source

I prefer natively support from exoplayer than relaying on third party apps like VLC.

VLC Has an option for this on desktop version but sadly they have yet to implement those important features for android TV version, opacity and RGBA telext > text
http://image.prntscr.com/image/Rp-UCJfDQIamCGEqq443Yw.png

VLC supporting teletext RGBA as default
Result (Teletext but with RGBA output instead of text format, which is hard to read and messy)
http://image.prntscr.com/image/gUzQPrVdTkGUs1O_09PMEw.png

We can add opacity which makes it a bit more easy to read with black background
http://image.prntscr.com/image/AeSXe4CzTg2wyy2SP2hyPg.png

Result(Teletext RGBA with opacity enabled)
http://image.prntscr.com/image/YeOxvuSFS9mJ4Jt2hhgk4w.png

Now even better we can output Teletext RBA as Text
http://image.prntscr.com/image/kWd7Yqy_SQuWYby3-86XzA.png

Result(Telext RGBA coverting to Text and opacity enabled)
http://image.prntscr.com/image/RMfbN_lUTuafp_eTnuK5Hg.png

VLC telx
http://github.com/videolan/vlc/blob/master/modules/codec/telx.c

@wazerstar
Copy link
Author

Removed https from pictures, seems not work, http works tho.

@wazerstar
Copy link
Author

wazerstar commented Feb 17, 2019

@wazerstar
Copy link
Author

@marcbaechinger Would there be any timeframe on when this could be looked at?

Regards.

@marcbaechinger
Copy link
Contributor

I can't give you a timeframe for this I'm afraid. I don't think this is something we will look into any time soon.
I assign to @AquilesCanta who better understands the importance of this in the TV space. I guess he can give you a more accurate answer on that.

@wazerstar
Copy link
Author

@marcbaechinger
@AquilesCanta

I would really hope, it would be an easy task to go to.

I'm sure competent guys like you guys, it would be rather easy.

looks like the teletext subtitles are delivered together in a single subtitle stream that from every Language found needs to be extracted to each subtitle stream?

@AquilesCanta
Copy link
Contributor

AquilesCanta commented Mar 11, 2019

As @marcbaechinger says, we don't have the bandwidth to allocate resources to implementing this right now. In case someone is interested in sending a pull request, it would be helpful to have a few different sample content pieces available in this thread.

@wazerstar
Copy link
Author

@AquilesCanta Hi there's already 2 samples recorded given here #22, and there is also direct TV samples available which I sent to the exodev mail as requested in thread when it was created, if you cannot find it, let me know.

@wazerstar
Copy link
Author

wazerstar commented Jan 26, 2020

@wazerstar
Copy link
Author

@AquilesCanta or @marcbaechinger any news ?

@AquilesCanta
Copy link
Contributor

Sorry @wazerstar, we are low on bandwidth right now and I doubt we will be planning for this in the short term. I think it's worth considering sending a pull request to support this.

Mention to @icbaker, in case you are interested in looking at TV subtitles.

@icbaker
Copy link
Collaborator

icbaker commented Feb 18, 2020

I don't have any plans to implement this - I agree it's something we'd accept a high quality pull request for.

@wazerstar
Copy link
Author

Updated main topic with new file and extraction of media info from file.

@wazerstar
Copy link
Author

New link since the others expired.

https://mega.nz/file/cNAQ2ApS#bt0OhhBuxiAJ0s2_qioOxes6xO1cOIl-xE7AUX20lOY

@icbaker icbaker changed the title Subtitle support for Teletext / VBI subtitles - Decoder Support for DVB EBU Teletext subtitles Jul 29, 2020
@icbaker
Copy link
Collaborator

icbaker commented Jul 29, 2020

In case someone's planning to write a pull request to support this, there's lots of details and links to specs in #7220.

@wazerstar
Copy link
Author

I found and tested other projects that can extract teletext succesful.

Is there anything here that can be used.

https://github.com/CCExtractor/ccextractor

https://github.com/kanongil/telxcc

@icbaker
Copy link
Collaborator

icbaker commented Jan 5, 2021

Please see my comments on #7746 and #7749 regarding using native dependencies (both those projects look like they're written in C). It's very unlikely we'd accept a PR for this functionality that requires a native/JNI dep.

@wazerstar
Copy link
Author

Please see my comments on #7746 and #7749 regarding using native dependencies (both those projects look like they're written in C). It's very unlikely we'd accept a PR for this functionality that requires a native/JNI dep.

Seen it now :)

Further information if it has not been mentioned before.

https://pdc.ro.nu/teletext.html

@a4x4kiwi
Copy link

Hi Wazerstar, Source code that uses CCExtractor is available in native code. BUT there is a memory leak in it! If anyone has the experience, I could use some help to locate and fix it. Unfortunately I have lost contact with the dev.

https://github.com/a4x4kiwi/Exo-CC

@wazerstar
Copy link
Author

Hi Wazerstar, Source code that uses CCExtractor is available in native code. BUT there is a memory leak in it! If anyone has the experience, I could use some help to locate and fix it. Unfortunately I have lost contact with the dev.

https://github.com/a4x4kiwi/Exo-CC

Thanks for getting back in here, so wait this mean we are on the right track to get this implemented into exoplayer without implementing ccextractor, the actually code which will need an commit at some time? Perhaps @icbaker @AquilesCanta @marcbaechinger could look into this

@a4x4kiwi
Copy link

a4x4kiwi commented Jan 12, 2021

This CCExtractor code is in C++ so no, it wont get accepted. It needs to be translated into Java to be accepted.

@a4x4kiwi
Copy link

a4x4kiwi commented Mar 5, 2021

As linked by @lars18th above, There is a Java project that extracts the subtitles. Is anyone keen to transition this into Exo?

The tool is the DVB Inspector: http://www.digitalekabeltelevisie.nl/dvb_inspector/
Download from this site. the Github does not contain the main jar file.

@wazerstar
Copy link
Author

As linked by @lars18th above, There is a Java project that extracts the subtitles. Is anyone keen to transition this into Exo?

The tool is the DVB Inspector: http://www.digitalekabeltelevisie.nl/dvb_inspector/
Download from this site. the Github does not contain the main jar file.

wait so theres HOPE now :)?

@lars18th
Copy link

lars18th commented Mar 5, 2021

Hi @wazerstar ,

wait so theres HOPE now :)?

The idea is this: Use the DVB Inspector source code (with the help and permission from the author @EricBerendsen) to generate an encapsulated Java class that can implement the required support in the Exo-CC from @a4x4kiwi . And then provide a PR for the mainstream version.

and @a4x4kiwi ,

Download from this site. the Github does not contain the main jar file.

You can download the JAR from the releases section: https://github.com/EricBerendsen/dvbinspector/releases (DVBinspector-1.15.0-dist.zip). It contains a BAT and SH scripts to launch it.

Regards.

@Jimbo94
Copy link

Jimbo94 commented Jun 27, 2021

Any news on this? I am also interested in this

sounds promising

@wazerstar
Copy link
Author

wazerstar commented Sep 20, 2021

Seems that @EricBerendsen responded having no problems with others using his code.

I have no problems with re-use of (parts of) DVB Inspector code in other open source projects.

The code for teletext support might be a good starting point for integrating EBU subtitles into Googles Exoplayer app. However it will require some major changes. DVB Inspector first loads the entire teletext stream into memory before presenting any info and or images. That will not work for a media player, so a complete change of structure is needed.

I think I would not be the best person to create a module for exoplayer. I don't know anything about android, or mediaplayers. Of course I am willing to help and answer any questions (If I can remember, that part of the code is almost 9 years old now....).

EricBerendsen/dvbinspector#19

@wazerstar
Copy link
Author

wazerstar commented Apr 2, 2022

Updated sample links with fresh content all records contain 30 seconds from various channel that has teletext subtitles in them.

v25.mpeg contain dvb-sub so ignore this one.
The rest contain teletext,

https://mega.nz/folder/dBQSwaJL#MUgvR9DNiqkM59MRCSLhzQ

@wazerstar
Copy link
Author

wazerstar commented Nov 14, 2022

There's finally a pull request on this, I hope we will soon see this implemented, if any can help sort out the issues remaining to get it committed please do so.

#10588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants