在三星设备上播放 mp4 文件时出现 PVMFErrContentInvalidForProgressivePlayback 错误

发布于 2024-11-27 00:13:52 字数 2098 浏览 0 评论 0原文

我正在使用经典的 VideoView 实现在 Android 上播放视频。

相同的 mp4 文件 url 在 HTC Desire 上运行良好。但它不适用于三星设备。

Samsung Galaxy S1 和 Samsung Galaxy Tab 显示:“无法播放视频。无法播放视频。流数据无效”
三星 5110 提示:“无法播放视频。抱歉,该视频无法流式传输到此设备”

当我使用文本编辑器查看 mp4 文件时,我意识到 mdat标签位于moov之前。

我的问题是它在 HTC 上如何工作,而在三星设备上却不起作用。而且我没有机会更改 mp4 文件的格式,那么我该如何克服这个问题呢?

07-29 15:24:21.740: ERROR/PlayerDriver(2402): PlayerDriver::it is a not Protected file
07-29 15:24:21.763: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferWriteDataStreamImpl
07-29 15:24:21.806: ERROR/MediaPlayerService(2402): Client::notify In
07-29 15:24:21.806: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.806: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.810: ERROR/MediaPlayer(15339): message received msg=3, ext1=0, ext2=0
07-29 15:24:21.810: ERROR/MediaPlayer(15339): callback application
07-29 15:24:21.810: ERROR/MediaPlayer(15339): back from callback
07-29 15:24:21.822: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.822: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.822: ERROR/MediaPlayerService(2402): Client::notify In
07-29 15:24:21.822: ERROR/MediaPlayer(15339): message received msg=200, ext1=1, ext2=26
07-29 15:24:21.822: ERROR/MediaPlayer(15339): callback application
07-29 15:24:21.822: ERROR/MediaPlayer(15339): back from callback
07-29 15:24:21.822: ERROR/PlayerDriver(2402): Command PLAYER_INIT completed with an error or info -82
07-29 15:24:21.822: ERROR/MediaPlayerService(2402): Client::notify In
07-29 15:24:21.822: ERROR/MediaPlayer(15339): message received msg=100, ext1=200, ext2=-82
07-29 15:24:21.822: ERROR/MediaPlayer(15339): error (200, -82)
07-29 15:24:21.822: ERROR/MediaPlayer(15339): callback application
07-29 15:24:21.826: ERROR/MediaPlayer(15339): back from callback
07-29 15:24:22.025: ERROR/MediaPlayer(15339): Error (200,-82)

I'm using classic VideoView implementation to play video on Android.

Same mp4 file url works fine on HTC Desire. However it doesn't work on Samsung devices.

Samsung Galaxy S1 and Samsung Galaxy Tab say: "Cannot play video. Unable to play video. Invalid streaming data"
Samsung 5110 says: "Cannot play video. Sorry this video is not valid for streaming to this device"

When I looked at mp4 file with a text editor, I realized that mdat tag is before moov.

My question is how does it work on HTC whereas it doesn't on samsung devices. And I dont have any chances to change the format of mp4 files, so how can I overcome this problem?

07-29 15:24:21.740: ERROR/PlayerDriver(2402): PlayerDriver::it is a not Protected file
07-29 15:24:21.763: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferWriteDataStreamImpl
07-29 15:24:21.806: ERROR/MediaPlayerService(2402): Client::notify In
07-29 15:24:21.806: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.806: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.810: ERROR/MediaPlayer(15339): message received msg=3, ext1=0, ext2=0
07-29 15:24:21.810: ERROR/MediaPlayer(15339): callback application
07-29 15:24:21.810: ERROR/MediaPlayer(15339): back from callback
07-29 15:24:21.822: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.822: ERROR/(2402): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl
07-29 15:24:21.822: ERROR/MediaPlayerService(2402): Client::notify In
07-29 15:24:21.822: ERROR/MediaPlayer(15339): message received msg=200, ext1=1, ext2=26
07-29 15:24:21.822: ERROR/MediaPlayer(15339): callback application
07-29 15:24:21.822: ERROR/MediaPlayer(15339): back from callback
07-29 15:24:21.822: ERROR/PlayerDriver(2402): Command PLAYER_INIT completed with an error or info -82
07-29 15:24:21.822: ERROR/MediaPlayerService(2402): Client::notify In
07-29 15:24:21.822: ERROR/MediaPlayer(15339): message received msg=100, ext1=200, ext2=-82
07-29 15:24:21.822: ERROR/MediaPlayer(15339): error (200, -82)
07-29 15:24:21.822: ERROR/MediaPlayer(15339): callback application
07-29 15:24:21.826: ERROR/MediaPlayer(15339): back from callback
07-29 15:24:22.025: ERROR/MediaPlayer(15339): Error (200,-82)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

春花秋月 2024-12-04 00:13:52

终于我找到了问题所在。

当我用 mp4box 提示 mp4 文件时,它也在三星设备上播放。

mp4box -hint

此过程正确地重新排列了视频文件的 moov 和 mdat 标签。

在此之前,相同的文件在 Android 2.3 的设备上可以正常播放,但在使用 Android 2.2 的设备上则不能。我不确定,但“安全流媒体”的限制可能在 2.3 版本之后被取消。

finally i've found the problem.

When i hinted the mp4 file with mp4box, it played on samsung devices as well.

mp4box -hint

This process rearranged moov and mdat tags of the video file correctly.

Before that, same file plays well on devices with android 2.3 but not with the devices using android 2.2. I'm not sure but the limitation for "safe for streaming" may have been canceled after 2.3 version.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文