Strange Behavior of Android VideoView – “Can’t Play Video”

1)When the message “Can’t Play Video” occurs?

Android usually gives out this message, when it is not able to play the media content. The reasons for this to happen can be anything like

  • Unsupported file format
  • Unsupported codecs
  • Erroneous content

to mention a few.

2)What are the Solution for that?

Unless you have your own Media Framework in your app, there is no solution from the application level

3) What could be possible mistakes in my application?

Very unlikely the mistake is in your application. If you read the logs, you will see that the error seems to originate from the DataSource of opencore (Which version of android are you running anyway? It is still using Opencore instead of StageFright). It is recognizing it as a large file (> 2GB) and hence giving out the error “E/OsclDirectFileIO( 2182): [LargeFileSupport] OsclDirectFileIO::OpenFileOrSharedFd Error = -1

The other thing to note is certain phones have better multimedia capability than the other phones, since OEM’s can themselves improve the multimedia capability. So there is no written guarantee that all files can be played on all devices, even though it conforms to the supported formats, codecs mentioned by Android.

Leave a Comment