Andorid:混合html app播放mP4视频 [英] Andorid : hybrid html app play mP4 video

查看:228
本文介绍了Andorid:混合html app播放mP4视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个奇怪的问题。



我使用adb shell命令从我的华硕Nexus 7平板电脑创建了一个屏幕录像:



adb shell screenrecord --bit-rate 6000000 --time-limit 30 /sdcard/kitkat.mp4



视频已创建设备处于纵向模式,视频细节如下。



我发现大多数默认Android视频播放器无法播放,有些可以播放:

I got stuck with a strange problem.

I created a screen recording from my Asus Nexus 7 Tablet using adb shell command:

adb shell screenrecord --bit-rate 6000000 --time-limit 30 /sdcard/kitkat.mp4

The video was created with device in portrait mode, the detail of video are as below.

What I found is most default Android video players were unable to play it, while some can play:

    Asus Nexus :4.4 --> Plays Video
    Asus Nexus :5.2 --> Can not play Video message
    Asus Memopad 7: 4.4.2 --> Can not play Video message

and other most of device can not play video.

Any custom player like MX player or other video plays in all devices.

Below are video details:


    General
    Complete name                            : D:\kitkatfinal2.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom
    File size                                : 1.52 MiB
    Duration                                 : 17s 643ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 725 Kbps
    Encoded date                             : UTC 2015-01-19 20:55:55
    Tagged date                              : UTC 2015-01-19 20:55:55

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Baseline@L5.0
    Format settings, CABAC                   : No
    Format settings, ReFrames                : 1 frame
    Muxing mode                              : Container profile=High@1.3
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 17s 643ms
    Bit rate mode                            : Variable
    Bit rate                                 : 722 Kbps
    Maximum bit rate                         : 6 000 Kbps
    Width                                    : 1 200 pixels
    Height                                   : 1 920 pixels
    Display aspect ratio                     : 0.625
    Frame rate mode                          : Variable
    Frame rate                               : 13.944 fps
    Original frame rate                      : 60.000 fps
    Minimum frame rate                       : 0.880 fps
    Maximum frame rate                       : 106.635 fps
    Color space                              : YUV





现在基本上我想从webview / Hybrid播放这个视频HTML应用程序。我正在使用`Crosswalk`浏览器和播放视频这些使用原生Android视频播放器。



我怎么能播放视频?我想到下面的情况,有可能吗?





*我可以安装我的自定义播放器,它将服务器作为Android的默认播放器



*我可以在我的Hybrid Html应用程序中嵌入自定义播放器并从那里嵌入视频(我无法在混合应用中找到使用嵌入式播放器的方式)



任何建议都会受到赞赏。



Now basically I want to play this video from webview / Hybrid html app. I am using `Crosswalk` browser and to play video these uses a native Android video player.

How could I play the video? I thought of below cases, would any be possible?


* I can install my custom player which would server as default player for Android

* I can embed a custom player in my Hybrid Html app and video plays from there (I could not find way to use embedded player in hybrid apps)

Any advice would be appreciated.

推荐答案

我提供强大的MP4到Android转换器-Avdshare Video Converter,可以将MP4转换为Android支持格式,如MPEG-4或H.264 AVC,从而在Android手机或平板电脑上播放MP4。
I supply a powerful MP4 to Android converter-Avdshare Video Converter, which can convert MP4 to Android supporting format like MPEG-4 or H.264 AVC, thus play MP4 on Android phones or tablets.


这篇关于Andorid:混合html app播放mP4视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆