-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Add DVB subtitle support #705
Conversation
} | ||
} | ||
|
||
public DvbSubtitlesParser (Paint paint, Bitmap bitmap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space?
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=113373670
DTS Express (which is DTS LBR according to http://www.mp4ra.org/codecs.html) is not supported for passthrough playback currently. Associate a different MIME type with it so that we don't try to use DTS passthrough for playing DTS Express. The MIME type for DTS Express is just vnd.dts.hd, with a profile parameter indicating that it's DTS Express rather than one of the other formats. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=113502646
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=113504366
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=113564300
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=113569520
Issue: google#1195 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=113635051
This reverts commit 4bea0b1.
This reverts commit 89ce1cc.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=113982743
Issue: google#497 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114089692
In general, I think mimeType is sufficient for decoder selection. In ExoPlayer V2 we'll be asking renderers whether they can handle individual (non-adaptive) streams, and also whether the renderer is adaptive capable for a given mimeType (to determine whether we can combine streams into an adaptive one). This model doesn't work unless the same decoder is selected for a given mimeType, regardless of any other properties of the format. There are more complicated models, but I think they end up getting pretty messy, so I'd rather go this way for now. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114146950
- readFully calls when reading a string or varint may have 0 length. The behavior of a 0 length read isn't well defined either at the ExtractorInput or DataSource level, particularly when the read may also coincide with EOS. We'll work on defining these cases properly going forward, but in the meantime this fix avoids attempting 0 length reads. - [Aside] UTF8 the is guaranteed default charset on Android. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114155058
…ut). - Use it to simplify a bunch of tests. - Will also replace RecordableExtractorInput in a subsequent CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114161162
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114177978
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114229446
This avoids accessing PtsTimestampAdjuster through a thunk method, and allows the PesReader classes to be static, which is nice in general. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114238880
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114245075
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114298016
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114310729
Issue: google#1235 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114317492
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114329545
Failing to parse a UUID from a ContentProtection should only result in filtering if there was actually a cenc:pssh element there for us to get it from. Issue: google#1256 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114429992
Adding onManifestLoadCompleted method to HlsChunkSource.EventListener
Remove break statement when end list tag found by hls playlist parser
Hi, one question, this commit are working with DVBSUB ? |
Yep we use it, but the patch is old, i will try to rebase it to the current
|
please, if you update let me know, and if possible try this stream |
@cooliobr your stream have two subs tracks, one DVB and other SCTE, both are correctly signalled and the DVB one should be decoded, tomorrow when I have access to an android device I will test your stream |
Thanks, i will appreciate your help. |
Hi, any news to me ? |
We hace just finished a patch to be able to render your subs, I will push
|
This patch should do the trick, The TsExtractor part solves an issue with the audio language parsing, and the DvbSubtitlesParse solves the subtitile visualization problema, we can´t connect to your HLS stream but the dumped ts segments work propelry: diff --git a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java diff --git a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java index 25b997f..ea1f1b6 100644 --- a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java +++ b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java @@ -347,7 +347,7 @@ public final class TsExtractor implements Extractor { // Read descriptors in PES packets containing private data. streamType = readPrivateDataStreamType(sectionData, esInfoLength); } else { - if (streamType == TS_STREAM_TYPE_MPA || streamType == TS_STREAM_TYPE_MPA_LSF) { + if ((streamType == TS_STREAM_TYPE_MPA || streamType == TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) { descriptorScratch = new ParsableBitArray(new byte[esInfoLength]); sectionData.readBytes(descriptorScratch, esInfoLength); } else { @@ -364,21 +364,25 @@ public final class TsExtractor implements Extractor { int type = -1; switch (streamType) { case TS_STREAM_TYPE_MPA: - type = descriptorScratch.readBits(8); - switch (type) { - case 0x0a: - language = readDescriptorAudio(descriptorScratch); - break; + if (esInfoLength > 0) { + type = descriptorScratch.readBits(8); + switch (type) { + case 0x0a: + language = readDescriptorAudio(descriptorScratch); + break; + } } pesPayloadReader = new MpegAudioReader(output.track(elementaryPid), language); pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA); break; case TS_STREAM_TYPE_MPA_LSF: - type = descriptorScratch.readBits(8); - switch (type) { - case 0x0a: - language = readDescriptorAudio(descriptorScratch); - break; + if (esInfoLength > 0) { + type = descriptorScratch.readBits(8); + switch (type) { + case 0x0a: + language = readDescriptorAudio(descriptorScratch); + break; + } } pesPayloadReader = new MpegAudioReader(output.track(elementaryPid), language); pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF); diff --git a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java index 6084f7d..af47b26 100644 --- a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java +++ b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java @@ -264,7 +264,7 @@ public class DvbSubtitlesParser { if(displayCounter == 0) { displays = new DvbSubDisplay[1]; displays[0] = new DvbSubDisplay(); - displayCounter = 0; + displayCounter = 1; } else { displays = Arrays.copyOf(displays, displayCounter + 1); displayCounter++; 2.8.1 From: cooliobr [email protected] Hi, any news to me ? — |
is possible you put this diff in your repository ? Att. Rafael Machado 2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:
|
It will take a while, I´m rebasing all our trees to the current dev tree, sadly I didn’t began with the DVB subs one Sergio From: cooliobr [email protected] is possible you put this diff in your repository ? Att. Rafael Machado 2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:
— |
how i can do checkout of this source ? Att. Rafael Machado 2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:
|
Our tres are private and based in an old Exoplayer versión, I’ll update my github when I complete the update of the trees to the current dev tree, It could take a couple of days, maybe less. Sergio From: cooliobr [email protected] how i can do checkout of this source ? Att. Rafael Machado 2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:
— |
ok, thanks for your help :D Att. Rafael Machado 2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:
|
How did you configure the exoplayer library to process your streams?, we were unable to do that and we had to dump your TSs to be able to debug the problem. Sergio From: cooliobr [email protected] ok, thanks for your help :D Att. Rafael Machado 2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:
— |
I just updated our github with a current versión of the dvbsubs tree: https://github.com/tresvecesseis/ExoPlayer/tree/dev-dvbsubs Sergio From: cooliobr [email protected] ok, thanks for your help :D Att. Rafael Machado 2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:
— |
Could you test it? From: "[email protected]" [email protected] How did you configure the exoplayer library to process your streams?, we were unable to do that and we had to dump your TSs to be able to debug the problem. Sergio From: cooliobr [email protected] ok, thanks for your help :D Att. Rafael Machado 2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:
— |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
This is a first patch to bring DVB subtitle support to Exoplayer, it is working we SD and HD subtitle format. DVB subs is the standard subtitling format in the countries that use the DVB-t/s/c for TV broadcasting and the IP providers based the DVB-IPI standards. We have implemented a DvbSubtitlesTrackRenderer() but we could change it to a generic GraphicTextTrackRenderer() if you want to have other graphic subtitle formats as the DVD VOBSUBs .