IMA SDK fails to tag mimetype of media
Open
@marcbaechinger is already working on this.
Since Jan 15, 2025.
bug
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 1.5.1
More version details
No response
Devices that reproduce the issue
Any devices
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
- Set the supported media types to
ImaAdsLoader,setSupportedContentTypes()to be only DASH - Play content with VAST URL (to be supplied)
The key to the issue is:
- The VAST MediaFiles tag indicates the mime-type, but that is not passed in the MediaItem to the player.
- The URL has no extension so the player guesses the format incorrectly.
The VAST looks like:
<MediaFile id="GDFP" delivery="streaming" width="1280" height="720" type="application/dash+xml" minBitrate="45" maxBitrate="5343" scalable="true" maintainAspectRatio="true">
<![CDATA[ https://redirector.gvt1.com/api/manifest/dash/requiressl/yes/source/gfp_video_ads/id/d66a085f556356c8/itag/0/playlist_type/LIVE/xpc/EgVovf3BOg%3D%3D/acao/yes/mime/application%2Fdash+xml/ctier/L/ip/0.0.0.0/ipbits/0/expire/1768102093/sparams/ip,ipbits,expire,requiressl,source,id,itag,playlist_type,xpc,acao,mime,ctier/signature/851CD059CE4A127D9B9BBFC35EC94C4F98F0E4D9.0CDAC505A856B1E916226E487580BAE54D62B20F/key/ck2 ]]>
</MediaFile>
This could be impossible for ExoPlayer IMA Extension as it looks like the AdMediaInfo discards everything in the MediaFile tag except the URL.
At any rate, egregious shortcoming is something you (AndroidX/Media team) may have far more luck then we do raising to the IMA SDK (if indeed that is the problem). With no access to any of this source so I can only guess
Expected result
The ad plays correctly
Actual result
Exception thrown:
12-19 17:53:18.388 8945 8945 E EventLogger: internalError [eventTime=1265.84, mediaPos=6.50, buffered=0.00, window=0, period=0, adGroup=0, ad=0, loadError - URL: https://redirector.gvt1.com/api/manifest/dash/requiressl/yes/source/gfp_video_ads/id/d66a085f556356c8/itag/0/playlist_type/LIVE/xpc/EgVovf3BOg%3D%3D/acao/yes/mime/application%2Fdash+xml/ctier/L/ip/0.0.0.0/ipbits/0/expire/1766146997/sparams/ip,ipbits,expire,requiressl,source,id,itag,playlist_type,xpc,acao,mime,ctier/signature/76AA9E4EFE968292FCF5675E611531AD5ED4C6CA.6BFD180FB69819350C6F7B0BC623255D665790A9/key/ck2
12-19 17:53:18.388 8945 8945 E EventLogger: com.google.android.exoplayer2.source.ads.AdsMediaSource$AdLoadException: com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (FlvExtractor, FlacExtractor, WavExtractor, FragmentedMp4Extractor, Mp4Extractor, AmrExtractor, PsExtractor, OggExtractor, TsExtractor, MatroskaExtractor, AdtsExtractor, Ac3Extractor, Ac4Extractor, Mp3Extractor, JpegExtractor) could read the stream.
12-19 17:53:18.388 8945 8945 E EventLogger: at com.google.android.exoplayer2.source.ads.AdsMediaSource$AdPrepareListener.onPrepareError(AdsMediaSource.java:446)
12-19 17:53:18.388 8945 8945 E EventLogger: at com.google.android.exoplayer2.source.MaskingMediaPeriod.maybeThrowPrepareError(MaskingMediaPeriod.java:164)
12-19 17:53:18.388 8945 8945 E EventLogger: at com.google.android.exoplayer2.source.MaskingMediaPeriod.maybeThrowPrepareError(MaskingMediaPeriod.java:154)
12-19 17:53:18.388 8945 8945 E EventLogger: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1006)
12-19 17:53:18.388 8945 8945 E EventLogger: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:489)
12-19 17:53:18.388 8945 8945 E EventLogger: at android.os.Handler.dispatchMessage(Handler.java:103)
12-19 17:53:18.388 8945 8945 E EventLogger: at android.os.Looper.loop(Looper.java:214)
12-19 17:53:18.388 8945 8945 E EventLogger: at android.os.HandlerThread.run(HandlerThread.java:67)
12-19 17:53:18.388 8945 8945 E EventLogger: Caused by: com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (FlvExtractor, FlacExtractor, WavExtractor, FragmentedMp4Extractor, Mp4Extractor, AmrExtractor, PsExtractor, OggExtractor, TsExtractor, MatroskaExtractor, AdtsExtractor, Ac3Extractor, Ac4Extractor, Mp3Extractor, JpegExtractor) could read the stream.
Media
TBS
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.