amzn / fire-app-builder

Fire App Builder is a framework for building java media apps for Fire TV, allowing you to add your feed of media content to a configuration file and build an app to browse and play it quickly.
Other
180 stars 257 forks source link

Fire App Builder will not render Closed Captions from a Valid CC URL - Been looking for help for over a year #51

Open TheFloridaChannel opened 4 years ago

TheFloridaChannel commented 4 years ago

Fire App Builder will not pull in .VTT files from a valid url We are required by law to provide closed captions for our videos. The @mCloseCaptionUrls value never populates from a valid url. Error: Value for mCloseCaptionUrls was null so not set for Content, this may be intentional.

Recipe: "cooker": "DynamicParser", "format": "xml", "model": "com.amazon.android.model.content.Content", "translator": "ContentTranslator", "modelType": "array", "query": "/feed/item", "matchList": [ "title/#cdata-section@mTitle", "contentId/#text@mId", "title/#cdata-section@mDescription", "media/streamUrl/#text@mUrl", "#attributes/hdImg@mCardImageUrl", "#attributes/hdImg@mBackgroundImageUrl", "contentId/#text@mChannelId", "srt@mCloseCaptionUrls" ]

The XML:

3 <![CDATA[ 07/10/2019 Florida Face to Face – Dr. Ed Moore, President of Independent Colleges and Universities of Florida ]]> 56075 Talk SD HLS SD https://invintus-otfp.global.ssl.fastly.net/2443575804/ed274fc0263c9feb8f7bba20ef9fce00ec6ee485,ed274fc0263c9feb8f7bba20ef9fce00ec6ee485,ed274fc0263c9feb8f7bba20ef9fce00ec6ee485_384p_30fps,ed274fc0263c9feb8f7bba20ef9fce00ec6ee485_320p_30fps,ed274fc0263c9feb8f7bba20ef9fce00ec6ee485_240p_30fps,ed274fc0263c9feb8f7bba20ef9fce00ec6ee485_180p_30fps/master.m3u8 Live Events, News or Original Programming 00:39:12 ** https://invintus-client-media.s3.amazonaws.com/2443575804/3f747fffd382998dd04de3f4435d4add0bde630b.vtt ** Please help me understand why this is happening
levonlevonian commented 4 years ago

Duplicate: https://forums.developer.amazon.com/questions/215638/fire-app-builder-will-not-pull-in-vtt-files-from-a.html

TheFloridaChannel commented 4 years ago

Levon, Thank you for your email. My question specifically is why can’t we get valid CC side car files to render in FireApp builder. We’re supplying the correct path to valid files and none of the sidecar close captions work. Embedded 608 captions work but sidecar/outband .VTTs don’t. I just have never received a response about this after numerous questions regarding this issue. There is just never any guidance to indicate what is wrong, or that it is acknowledged that this feature is not working as it should. I understand this is open source but your documentation states that .VTT closed captions are supported natively, and I cannot get them to work.

All of the code below is valid and they just never work. Is this a bug and if not, what is wrong with what I have in my recipe? I wish I didn’t have to resort to asking this question in many different places, but this has gone unaddressed for almost a year and I just want to know what to do if anything? Please advise. Is this a bug or not?

https://developer.amazon.com/docs/fire-app-builder/caption-support.html

Fire App Builder supports the same closed captions/subtitles that Exoplayer supports. The formats include TTML, WebVTT, and CEA-608. The priority of support is as follows:

  1. CEA-608 inband (if enabled — see below)
  2. WebVTT and TTML outband
  3. WebVTT and TTML inband To enable inband CEA-608 closed captions, open Navigator.json (located in app > assets). In the config object, add "enableCEA608": true. Here's an example: Recipe: "cooker": "DynamicParser", "format": "xml", "model": "com.amazon.android.model.content.Content", "translator": "ContentTranslator", "modelType": "array", "query": "/feed/item", "matchList": [ "title/#cdata-section@mTitle", "contentId/#text@mId", "title/#cdata-section@mDescription", "media/streamUrl/#text@mUrl", "#attributes/hdImg@mCardImageUrl", "#attributes/hdImg@mBackgroundImageUrl", "contentId/#text@mChannelId", "srt@mCloseCaptionUrls" ]
https://invintus-client-media.s3.amazonaws.com/2443575804/850b7fce2b2043f3bcf928e1551ae09c4a86afa8.vtt
levonlevonian commented 4 years ago

Hi TheFloridaChannel,

Please try replacing "srt@mCloseCaptionUrls" with "srt/#text@mCloseCaptionUrls"

TheFloridaChannel commented 4 years ago

Levon, Thank you for the suggestion and yes I have already tried that. What happens is instead of rendering the captions the text value of the .VTT URL just shows up on the screen or the app fails to load. From the debugger with: “srt/#text/@mCloseCaptionUrls” – mCloseCaptionUrls never populates and the rest of the recipe fails to load and the app crashes (attached image_5864)

0 = {HashMap$HashMapEntry@4926} "item" -> " size = 3" key = "item" count = 4 hashCode = 3242771 offset = 0 value = {char[4]@4977} shadow$klass = {Class@3126} "class java.lang.String" shadow$monitor = -1424209209 value = {ArrayList@4927} size = 3 0 = {HashMap@4980} size = 8 0 = {HashMap$HashMapEntry@4985} "contentId" -> " size = 1" 1 = {HashMap$HashMapEntry@4986} "title" -> " size = 2" key = "title" count = 5 hashCode = 110371416 offset = 0 value = {char[5]@5010} shadow$klass = {Class@3126} "class java.lang.String" shadow$monitor = -1374075204 value = {HashMap@4996} size = 2 0 = {HashMap$HashMapEntry@5014} "#text" -> 1 = {HashMap$HashMapEntry@5015} "#cdata-section" -> "Statewide Task Force on Opioid Abuse" 2 = {HashMap$HashMapEntry@4987} "contentQuality" -> " size = 1" 3 = {HashMap$HashMapEntry@4988} "#text" -> 4 = {HashMap$HashMapEntry@4989} "streamFormat" -> " size = 1" 5 = {HashMap$HashMapEntry@4990} "contentType" -> " size = 1" 6 = {HashMap$HashMapEntry@4991} "media" -> " size = 7" 7 = {HashMap$HashMapEntry@4992} "#attributes" -> " size = 2" 1 = {HashMap@4981} size = 8 2 = {HashMap@4982} size = 8

From the debugger with “srt/@mCloseCaptionUrls” – mCloseCaptionUrls populates but the captions never get rendered on the screen (attached image_5865)

key = "item" value = {ArrayList@5178} size = 8 0 = {HashMap@5191} size = 12 0 = {HashMap$HashMapEntry@5202} "runtime" -> " size = 1" 1 = {HashMap$HashMapEntry@5203} "contentId" -> " size = 1" 2 = {HashMap$HashMapEntry@5204} "title" -> " size = 2" 3 = {HashMap$HashMapEntry@5205} "genres" -> " size = 1" 4 = {HashMap$HashMapEntry@5206} "contentQuality" -> " size = 1" 5 = {HashMap$HashMapEntry@5207} "#text" -> 6 = {HashMap$HashMapEntry@5208} "srt" -> " size = 1" key = "srt" value = {HashMap@5228} size = 1 7 = {HashMap$HashMapEntry@5209} "streamFormat" -> " size = 1" 8 = {HashMap$HashMapEntry@5210} "contentType" -> " size = 1" 9 = {HashMap$HashMapEntry@5211} "media" -> " size = 4" 10 = {HashMap$HashMapEntry@5212} "synopsis" -> " size = 2" 11 = {HashMap$HashMapEntry@5213} "#attributes" -> " size = 2" 1 = {HashMap@5192} size = 12 0 = {HashMap$HashMapEntry@5240} "runtime" -> " size = 1" 1 = {HashMap$HashMapEntry@5241} "contentId" -> " size = 1" 2 = {HashMap$HashMapEntry@5242} "title" -> " size = 2" 3 = {HashMap$HashMapEntry@5243} "genres" -> " size = 1" 4 = {HashMap$HashMapEntry@5244} "contentQuality" -> " size = 1" 5 = {HashMap$HashMapEntry@5245} "#text" -> 6 = {HashMap$HashMapEntry@5246} "srt" -> " size = 1" 7 = {HashMap$HashMapEntry@5247} "streamFormat" -> " size = 1" 8 = {HashMap$HashMapEntry@5248} "contentType" -> " size = 1" 9 = {HashMap$HashMapEntry@5249} "media" -> " size = 4" 10 = {HashMap$HashMapEntry@5250} "synopsis" -> " size = 2"

With all due respect has the FireApp team actually gotten this to work? It seems that much like issue: https://github.com/amzn/fire-app-builder/issues/28 where the app fails/crashes without more than 1 live item if you are doing live streaming HLS that this would have been found easily during the testing phase but it slipped through.

Please advise and thank you for all of your help thus far.

The Florida Channel

TheFloridaChannel commented 4 years ago

From: Levon [mailto:notifications@github.com] Sent: Thursday, October 10, 2019 12:13 PM To: amzn/fire-app-builder fire-app-builder@noreply.github.com Cc: TFC-Support TFC-Support@fsu.edu; Author author@noreply.github.com Subject: Re: [amzn/fire-app-builder] Fire App Builder will not render Closed Captions from a Valid CC URL - Been looking for help for over a year (#51)

Hi TheFloridaChannel,

Please try replacing "srt@mCloseCaptionUrls" with "srt/#text@mCloseCaptionUrls"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/amzn/fire-app-builder/issues/51?email_source=notifications&email_token=AGJKBO57OLO4RPUCG7YPPOLQN5IBNA5CNFSM4I6IOPZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA45FNI*issuecomment-540660405__;Iw!5Xm4_O-4tfk!jPd1tEcK1Lph4b4RIBN8to2eMnDwwihwuz1GKiJyZOKyq9aDYzSPsyXdxuMNMiSLFqQ$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AGJKBO6QRDZH7L2EANEOC4DQN5IBNANCNFSM4I6IOPZA__;!5Xm4_O-4tfk!jPd1tEcK1Lph4b4RIBN8to2eMnDwwihwuz1GKiJyZOKyq9aDYzSPsyXdxuMNcEYwVio$.

TheFloridaChannel commented 4 years ago

Just sending the screenshots.

From: Levon [mailto:notifications@github.com] Sent: Thursday, October 10, 2019 12:13 PM To: amzn/fire-app-builder fire-app-builder@noreply.github.com Cc: TFC-Support TFC-Support@fsu.edu; Author author@noreply.github.com Subject: Re: [amzn/fire-app-builder] Fire App Builder will not render Closed Captions from a Valid CC URL - Been looking for help for over a year (#51)

Hi TheFloridaChannel,

Please try replacing "srt@mCloseCaptionUrls" with "srt/#text@mCloseCaptionUrls"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/amzn/fire-app-builder/issues/51?email_source=notifications&email_token=AGJKBO57OLO4RPUCG7YPPOLQN5IBNA5CNFSM4I6IOPZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA45FNI*issuecomment-540660405__;Iw!5Xm4_O-4tfk!jPd1tEcK1Lph4b4RIBN8to2eMnDwwihwuz1GKiJyZOKyq9aDYzSPsyXdxuMNMiSLFqQ$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AGJKBO6QRDZH7L2EANEOC4DQN5IBNANCNFSM4I6IOPZA__;!5Xm4_O-4tfk!jPd1tEcK1Lph4b4RIBN8to2eMnDwwihwuz1GKiJyZOKyq9aDYzSPsyXdxuMNcEYwVio$.

TheFloridaChannel commented 4 years ago

Any insight here? Has your team been able to replicate this issue?