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

HLS renderer type confuse #2449

Closed ChernyshovYuriy closed 7 years ago

ChernyshovYuriy commented 7 years ago

Hi colleagues,

I have a doubt related type of the renderer that ExoPlayer provide for the given url:

http://nasatv-lh.akamaihd.net/i/NASA_101@319270/master.m3u8

Here is log trace:

02-13 16:12:55.768 D: Tracks [
02-13 16:12:55.768 D:   Renderer:0 [
02-13 16:12:55.769 D:     Group:0, adaptive_supported=YES [
02-13 16:12:55.769 D:       [X] Track:0, id=0, mimeType=video/avc, bitrate=563000, res=1280x720, supported=YES
02-13 16:12:55.769 D:       [ ] Track:1, id=1, mimeType=video/avc, bitrate=432000, res=1280x720, supported=NO_EXCEEDS_CAPABILITIES
02-13 16:12:55.769 D:       [X] Track:2, id=2, mimeType=video/avc, bitrate=827000, res=1280x720, supported=YES
02-13 16:12:55.769 D:       [ ] Track:3, id=3, mimeType=video/avc, bitrate=732000, res=1280x720, supported=NO_EXCEEDS_CAPABILITIES
02-13 16:12:55.769 D:       [X] Track:4, id=4, mimeType=video/avc, bitrate=2128000, res=1280x720, supported=YES
02-13 16:12:55.769 D:       [ ] Track:5, id=5, mimeType=video/avc, bitrate=2064000, res=1280x720, supported=NO_EXCEEDS_CAPABILITIES
02-13 16:12:55.769 D:     ]
02-13 16:12:55.770 D:   ]
02-13 16:12:55.770 D:   Renderer:1 [
02-13 16:12:55.770 D:     Group:0, adaptive_supported=N/A [
02-13 16:12:55.770 D:       [X] Track:0, id=null, mimeType=audio/mp4a-latm, channels=2, sample_rate=32000, supported=YES
02-13 16:12:55.770 D:     ]
02-13 16:12:55.770 D:   ]
02-13 16:12:55.770 D:   Renderer:2 [
02-13 16:12:55.770 D:     Group:0, adaptive_supported=N/A [
02-13 16:12:55.770 D:       [ ] Track:0, id=null, mimeType=application/cea-608, supported=YES
02-13 16:12:55.770 D:     ]
02-13 16:12:55.770 D:   ]
02-13 16:12:55.770 D:   Renderer:3 [
02-13 16:12:55.770 D:     Group:0, adaptive_supported=N/A [
02-13 16:12:55.770 D:       [X] Track:0, id=null, mimeType=application/id3, supported=YES
02-13 16:12:55.770 D:     ]
02-13 16:12:55.770 D:   ]
02-13 16:12:55.770 D: ]

The confusion is - why "mimeType=application/cea-608" and "mimeType=application/id3" are sits in different renderer types? Are those two should be in the same renderer that relates to Metadata tendering? As consequence, I am seeing "Text" button on top of the video indicating that there is Subtitle Track, which is wrong, again, because both of those tracks are belongs to closed caption. Is this something wrong with Playlist / ExoPlayer / or is it my understanding that is wrong?

Thanks a lot in advance.

ojw28 commented 7 years ago

608 is text. ID3 is metadata. So this looks like it's working as intended to me?

ChernyshovYuriy commented 7 years ago

https://en.wikipedia.org/wiki/EIA-608

I was of the opinion that Closed Caption belongs to metadata renderer, am I wrong?

ChernyshovYuriy commented 7 years ago

Also, using ExoPlayer framework:

MimeTypes.isApplication(trackFormat.sampleMimeType)) 

for "mimeType=application/cea-608" returns True, which makes me feel confused now.

ojw28 commented 7 years ago

I was of the opinion that Closed Caption belongs to metadata renderer, am I wrong?

Yes ;). This has never been the case. Closed captions have always been considered text.

for "mimeType=application/cea-608" returns True, which makes me feel confused now.

This is just returning whether the mime type starts with "application". Which it does.

ChernyshovYuriy commented 7 years ago

Ok, thanks for clarification :-)