简体   繁体   English

Android Video无法在Media Player中播放

[英]Android Video not playing in Media Player

I wanted to play a video from " http://travel.gockell.com//data/251/videos/2016-06-09_13-24-21.mp4 " this url. 我想播放来自该网址“ http://travel.gockell.com//data/251/videos/2016-06-09_13-24-21.mp4 ”的视频。 I am using Media Player to play video,the problem is Media Player doesn't play this url,i tried many other url which work fine except this. 我正在使用Media Player播放视频,问题是Media Player无法播放此网址,我尝试了许多其他可以正常工作的网址,除此之外。 I configured all other thins on manifest like INTERNET Permission. 我在清单上配置了所有其他瘦文件,例如INTERNET Permission。 This video is play on some of device but when using Samsung or LG device it doesn't play. 该视频可以在某些设备上播放,但在使用Samsung或LG设备时无法播放。

You should take a look at adb logcat for messages from the video decoder. 您应该查看adb logcat中来自视频解码器的消息。

Not all .mp4 files are alike. 并非所有.mp4文件都一样。 MP4 is just the format ("container"). MP4只是格式(“容器”)。 The codec that was used to compress the video might not be supported by this particular device. 该特定设备可能不支持用于压缩视频的编解码器。

For example, it could be H.264 High Profile. 例如,它可以是H.264 High Profile。 Some devices will support it, but the minimum requirements that are supposed to work on all Android devices are pretty low: https://developer.android.com/guide/appendix/media-formats.html 某些设备将支持它,但是应该在所有Android设备上运行的最低要求都非常低: https//developer.android.com/guide/appendix/media-formats.html

If you have access to ffmpeg, it includes the ffprobe tool which will print what is the actual codec inside. 如果您可以访问ffmpeg,它将包括ffprobe工具,该工具将打印出内部的实际编解码器。 You can also find general codec info using VLC, in Window > Media Information > Codec Details. 您也可以在窗口>媒体信息>编解码器详细信息中使用VLC查找常规编解码器信息。

For the specific video you linked: 对于您链接的特定视频:

Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 79 kb/s (default)
Metadata:
  creation_time   : 2016-06-09 13:23:43
  handler_name    : Core Media Data Handler
Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 480x480, 754 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)

The audio stream is AAC LC, which is not guaranteed to work. 音频流是AAC LC,不能保证能正常工作。 The video stream is H.264 Main profile, which is not guaranteed to work either. 视频流是H.264 Main配置文件,也不保证可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM