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.

我正在把一个应用升级到android 6.0。一切似乎都很好,除了尝试从远程资源播放某些视频。他们在我们的非棉花糖设备上玩得很好(具体来说,我在4.1.2版的Jelly Bean上有一个Galaxy S3,播放同样的视频也很好,没有问题)。我们在6.0上测试了多台设备,问题似乎只局限于这个操作系统。

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:

在过去的4.1.2视频中,我遇到了一些问题,并且认为这可能是一个编解码器的问题,我认为这可能是罪魁祸首。不会播放的视频都有这些共同点:

  • AAC
  • AAC格式
  • H.264
  • h .
  • MPEG-4 SDSM
  • mpeg - 4 SDSM
  • MPEG-4 ODSM
  • mpeg - 4 ODSM

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

当我尝试用videoview启动活动时,logcat就会输出这个内容。

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 个解决方案

#1


3

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.

带有ODSM / SDSM codecs的视频可以绕过去交错,但是Android Marshmallow不能识别ODSM / SDSM codecs,需要视频去交错。以前的OS版本将不会播放未被正常解交错的视频,除了包括ODSM或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.

我相信这是由于Quicktime支持问题,可能需要以Android Marshmallow的缺陷来打开,但也可能是谷歌。

更多相关文章

  1. [API GUIDE 学习笔记]android MediaPlayer 播放视频
  2. 如何将音频文件与新视频文件合并?是否可以在Android中使用?
  3. Fragment的setUserVisibleHint方法实现视频音频播放暂停
  4. android获取本地视频路径
  5. GUVCview-Ubuntu下视频录像更简单
  6. Mars《Android开发视频教程》全集下载(第一季到第五季)
  7. opencv实时视频帧在android中没有显示sobel输出
  8. ffmpeg从视频中提取帧时间戳
  9. Androidx学习笔记(79)--- 视频播放器二(VideoView等)

随机推荐

  1. Android之view虚线
  2. CopyOnWriteArrayList,一个面试中经常问
  3. 面试官:如何分库分表?
  4. StampedLock如何使用?
  5. 【移动开发】 Android隐藏输入法软键盘的
  6. PriorityQueue:一个提升你刷题效率和解决
  7. CountDownLatch如何使用?
  8. 很好的一些开源项目
  9. CyclicBarrier如何使用?
  10. 面试官:如何实现一个乐观锁(小白都能看得懂