Android Marshmallow “Can't play this video” error

我只是一个虾纸丫 提交于 2019-12-01 03:32:37

问题


I am in the process of upgrading an app to android 6.0. Everything seems to be alright except when trying to play certain videos from a remote source. They play just fine on our non Marshmallow devices (for specifics, I have a Galaxy S3 on 4.1.2 Jelly Bean that's playing the exact same video just fine, no issues). We've tested with multiple devices on 6.0, and the problem seems to be localized to just this OS.

When trying to play a video in a simple videoview, I get an alert saying "Can't play this video".

I had some problems with other videos on 4.1.2 in the past, and thought it may be a codec issue, which I think again may be the culprit. The videos that won't play all have these in common:

  • AAC
  • H.264
  • MPEG-4 SDSM
  • MPEG-4 ODSM

When I try to launch the activity with the videoview, this is what the logcat spits out.

201-801/? D/audio_hw_primary﹕ out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
201-800/? D/audio_hw_primary﹕ select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
201-800/? D/msm8974_platform﹕ platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(15)
201-800/? D/audio_hw_primary﹕ enable_snd_device: snd_device(2: speaker)
201-800/? D/audio_hw_primary﹕ enable_audio_route: apply and update mixer path: low-latency-playback
777-1257/? I/MediaFocusControl﹕ AudioFocus  requestAudioFocus() from android.media.AudioManager@f9138b2 req=1flags=0x0
4591-4591/? W/MediaPlayer﹕ Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider: http://videopath.mp4
201-5605/? D/NuPlayer﹕ onSetVideoSurface(0xb48c2700, no video decoder)
777-811/? I/ActivityManager﹕ Displayed com.example.i.PityTheFooActivity: +108ms
1139-1139/? I/Keyboard.Facilitator﹕ onFinishInput()
201-5606/? E/GenericSource﹕ Failed to init from data source!
201-5605/? D/NuPlayerDriver﹕ notifyListener_l(0xb60986a0), (100, 1, -2147483648)
4591-4605/? E/MediaPlayer﹕ error (1, -2147483648)
4591-4591/? E/MediaPlayer﹕ Error (1,-2147483648)
4591-4591/? D/VideoView﹕ Error: 1,-2147483648

Is this a known problem with Marshmallow, or is this something wrong with the videos perhaps?


回答1:


Videos with ODSM / SDSM codecs can bypass being deinterlaced, but it appears Android Marshmallow will not recognize ODSM / SDSM codecs and will require the videos to be deinterlaced. Previous OS versions will not play videos that haven't been deinterlaced normally, with the exception being the video file including ODSM or SDSM codecs.

I believe this is due to Quicktime support issues, and may need to be opened as a defect with Android Marshmallow, but may also be intended by Google.



来源:https://stackoverflow.com/questions/32611368/android-marshmallow-cant-play-this-video-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!