How to solve "sorry, this video cannot be played"

Qbetechmark

Member
Licensed User
Longtime User
I got message "sorry, this video cannot be played" in my application.

My code is :

Sub Globals
Dim vv As VideoView​
End Sub

Sub Activity_Create(FirstTime As Boolean)
vv.Initialize("vv")
Activity.AddView(vv, 10dip, 10dip, 250dip, 250dip)
vv.LoadVideo(File.DirRootExternal, "ww2_1.mp4")
vv.Play​
End Sub


What did I do wrong ?
Please help.
 

Qbetechmark

Member
Licensed User
Longtime User
The problem is most likely in the video format.
You should try to convert the video to a different format.

Also check the unfiltered logs and see if there is any related message (the native MediaPlayer service prints error messages to the logs).

What kind of video formats supported ?
 
Upvote 0

Qbetechmark

Member
Licensed User
Longtime User
It will not play on the AVD or emulator. If you are using a real device, check and see that your file will play in the default video player on your device. If it does, it should play in the videoview.

Ouch ... I'm using AVD. Im not yet buy real device, I think to make an application first before buy one. Is it anyway to test video using AVD ? I was try streaming video http link and it works, but slow.
 
Upvote 0

Qbetechmark

Member
Licensed User
Longtime User
Also check the unfiltered logs and see if there is any related message (the native MediaPlayer service prints error messages to the logs).

I got this for unfiltered log :

** Activity (main) Resume **
setDataSource('/mnt/sdcard/mb_mpeg4.mp4')
error (1, -2147483648)
Displayed activity media.player/.main: 2036 ms (total 2036 ms)
Error (1,-2147483648)
Error: 1,-2147483648
GC_EXPLICIT freed 801 objects / 44672 bytes in 1215ms

What is that mean ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…