VideoView always produces "Sorry this video cannot be played"

alexb

Member
Licensed User
Longtime User
I have a problem with the VideoView, I am not able to make it play any video file, I always get the error message "Sorry this video cannot be played".

Clips are lying in the root of my SD card and the corresponding B4A line is e.g.:

MyVideoView.LoadVideo(File.DirRootExternal, "clip_480_5sec_6mbps_h264.mp4").

Most of these videos run normally when using the default video player.

Note: VideoViews works when streaming a video from the WEB, so I have the problem with the files on the SD card.

The unfiltered LOG output is shown below, I have tried with different files from different sources (MP4 & AVI). I always get the same errror message and the LOG output always looks as below?

url: /mnt/storage/Ben 10 - s1e02. Prehistoria.avi - player_type: AVOS_PLAYER
sysfs_entry_find: display '1' with index: 0 found
sysfs_entry_find: manager 'lcd' with index: 0 found
LayerBuffer::AvosSource::AvosSource
media_player_video_open: stream_start_file() failed
stream error: 1, qual: 0, pos: 0
30|setError: 1001 - 1000
error (1001, 1000)
surface=0x2db250 (id=0)
LayerBuffer::AvosSource::eek:nVisibilityResolved: 224x88 - 800x480 - 3:180
Error (1001,1000)
Error: 1001,1000


Anybody has an idea what error I am encountering here?

Xtra question: why can VideoView not display any video residing in File.DirAssets (there is an error message saying the folder is not supported). Could be useful for instructional videos etc.

Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't know why it fails to play. Try moving the video to File.DirInternal. Maybe it is related to your sd card.

The assets folder is not a real folder. It is a reference to the APK file. VideoView doesn't support streaming from this resource. You can copy the videos from the assets folder to a different folder on startup (if they do not already exist).
 
Upvote 0

metrick

Active Member
Licensed User
Longtime User
I don't know why it fails to play. Try moving the video to File.DirInternal. Maybe it is related to your sd card.

The assets folder is not a real folder. It is a reference to the APK file. VideoView doesn't support streaming from this resource. You can copy the videos from the assets folder to a different folder on startup (if they do not already exist).

Alexb, does this method works?
I am not home right now to try it. Just to let you know I have the same problems.
 
Upvote 0
Top