4

I have an Android app that plays MP4 files using the VideoView. The videos are pulled from a remote server and provided to the VideoView object using the .setVideoURI() method. They are Baseline encoded and play fine when I provide the setVideoURI method with a direct link to the mp4 file. However, I need to find a way to make it work using the ColdFusion cfcontent tag. At the moment, I have the cfcontent tag set up as follows

<cfcontent type="video/mp4" file="full path to my mp4 file" deleteFile="no">

This works fine in a browser, however when I try to provide a link to my CFM page as the URI for the setVideoURI method, it comes back with the MediaPlayer Error (1, -2147483648) and also shows the same error for the VideoView. I'ved tried adding cfheader tags prior to the cfcontent to force the type as video/mp4, but with no success.

11-14 15:05:18.162: E/MediaPlayer(373): error (1, -2147483648)
11-14 15:05:18.162: E/MediaPlayer(373): Error (1,-2147483648)
11-14 15:05:18.162: D/VideoView(373): Error: 1,-2147483648

Has anyone had success playing MP4 files in a Android VideoView using a ColdFusion page and the cfcontent tag? Any suggestions are GREATLY appreciated!!!

Thank you!

4

1 回答 1

1

事实证明,Android 对 MP4 有非常具体的编码要求,其中之一是视频必须是基线配置文件编码。有关详细信息,请参阅http://developer.android.com/guide/appendix/media-formats.html。我使用基线配置文件重新编码了视频,它工作正常。

于 2016-01-25T20:29:48.437 回答