我正在Android上开发一个应用程序,该应用程序大量使用已经上市的视频播放(交互式电影)。
问题在于视频播放在Samsung Galaxy Gio(2.3.3)上不起作用,尽管它适用于分辨率较小的旧型号。
似乎存在编解码器问题,因为我尝试使用默认媒体播放器手动加载视频,但无法播放。其他媒体播放器也没有问题。
使用带有MPEG-4(FFmpeg)的Handbrake对视频进行编码,分辨率为800x480。
这是一个带有错误的logcat转储
12-26 14:04:43.269: E/QCvdec(95): get_parameter: unknown param 0ff7a347
12-26 14:04:43.269: E/VideoMIO(95): AndroidSurfaceOutput::setParametersSync() VIDEO ROTATION 0
12-26 14:04:43.269: E/QCvdec(95): Setparameter: unknown param 117440513
12-26 14:04:43.459: E/QCvdec(95): Omx Flush issued when vdec is not initialized yet.
12-26 14:04:43.459: E/(95): profile_and_level_indication = 3
12-26 14:04:43.459: E/(95): video_object_type_indication = 1
12-26 14:04:43.459: V/PlayerDriver(95): HandleInformationalEvent: UNKNOWN PVMFStatus
12-26 14:04:43.459: V/PlayerDriver(95): HandleInformationalEvent: type=44 UNHANDLED
12-26 14:04:43.459: W/MediaPlayer(2705): info/warning (1, 44)
12-26 14:04:43.459: V/PlayerDriver(95): CommandCompleted
12-26 14:04:43.459: V/PlayerDriver(95): Completed command PLAYER_PREPARE status=PVMFSuccess
12-26 14:04:43.459: V/PlayerDriver(95): PLAYER_PREPARE complete mDownloadContextData=0x0, mDataReadyReceived=0
12-26 14:04:43.459: V/PVPlayer(95): stop
12-26 14:04:43.459: V/PlayerDriver(95): Send player code: 9
12-26 14:04:43.459: V/PVPlayer(95): check_for_live_streaming s=0, cancelled=0
12-26 14:04:43.459: E/QCvdec(95): Omx Flush issued when vdec is not initialized yet.
12-26 14:04:43.459: E/QCvdec(95): OMXCORE-SM:Recieved command DISABLE (2)
12-26 14:04:43.459: E/QCvdec(95): Omx Flush issued when vdec is not initialized yet.
12-26 14:04:43.459: E/QCvdec(95): OMXCORE-SM:Recieved command ENABLE (3)
12-26 14:04:43.459: E/(95): vdec: failed to allocate pmem arena (10161152 bytes)
12-26 14:04:43.459: E/QCvdec(95): ERROR!!! vdec_open failed
12-26 14:04:43.459: E/VideoMIO(95): AndroidSurfaceOutput::setParametersSync() VIDEO ROTATION 0
12-26 14:04:43.469: E/PVOMXVidDecNode(95): Ln 1458 OMX_EventError nData1 0x0 nData2 0x0
12-26 14:04:43.469: V/PlayerDriver(95): HandleInformationalEvent: PVMFInfoErrorHandlingStart
12-26 14:04:43.469: V/PlayerDriver(95): HandleInformationalEvent: type=26 UNHANDLED
12-26 14:04:43.469: W/MediaPlayer(2705): info/warning (1, 26)
12-26 14:04:43.469: E/PlayerDriver(95): HandleErrorEvent: PVMFErrProcessing
12-26 14:04:43.469: E/MediaPlayer(2705): error (1, -18)
12-26 14:04:43.479: E/QCvdec(95): Omx Flush issued when vdec is not initialized yet.
12-26 14:04:43.479: W/QCvdec(95): ======================================================================
12-26 14:04:43.479: W/QCvdec(95): Open Max Statistics
12-26 14:04:43.479: W/QCvdec(95): ======================================================================
12-26 14:04:43.479: W/QCvdec(95): empty this buffer rate = 2985.074707
12-26 14:04:43.479: W/QCvdec(95): empty this buffer total time = 670
12-26 14:04:43.479: W/QCvdec(95): empty this buffer count = 2
=============================================== ======================
有没有办法在设备上为默认播放器安装更多编解码器?
任何帮助将不胜感激。谢谢
答案 0 :(得分:2)
我们在较旧的Android 2.2设备上遇到了类似的问题。事实证明,由于某种原因,VideoView无法将视频缩放到正确的大小。我们降低了视频分辨率以适应设备分辨率并且工作正常。
三星Galaxy Gio只有320x480显示屏,你有800x480视频。也许你可以降低视频分辨率,使其适合320x480显示而不需要调整大小(只是为了测试这是否是问题)。
您是否使用基线配置文件对视频进行了编码?某些设备需要这样才能正确播放视频。有关详细信息,请参阅Android media formats。
您还可以尝试将OnErrorListener添加到媒体播放器。也许你得到一个有用的错误信息:)