0

I have a problem with playing video on some devices. I am using textureview with mediaplayer, every methods of SurfaceTextureView are called but when I just call mediaPlayer.start(), immediately the listener with completition of playing is called. In log is this error:

E/MediaPlayer﹕ error (1, -2147483648)

When I list log from all applications, I can see some errors and I dont know if it is somehow related http://pastebin.com/rRxxQgdJ

This log is from CyanogenMod with Android 4.3.1 but on some other devices like Samsung Galaxy S3 mini this error is happening.

On my Nexus 4 everything works fine. I've tried convert that video with mp4 codec for android H.264 and even with ffmpeg but the result is still the same. I am using TextureVideoView implementation from here: https://github.com/dmytrodanylyk/video-crop/blob/master/library/src/com/dd/crop/TextureVideoView.java

Thanks for any advice

Billda
  • 5,707
  • 2
  • 25
  • 44
  • it is an issue with the path of the video to play..the path is not correct..or the file name or file type is not supported.. – Meenal Oct 26 '14 at 14:07
  • Well the filetype is mp4, i know that its not rule of thumb that it should work, but i converted it to that type that should work on Androids.. and path to file is right, if on some device it can be played and on other cant, right? I've tried two approach of loading video - from assets or from raw folder and none of them works. This is for assets approach mTextureVideoView.setDataSource(getAssets().openFd("intro_video.mp4")); and this is for raw approach String uriPath = "android.resource://" + getPackageName() + "/raw/intro_video" ;mTextureVideoView.setDataSource(this, Uri.parse(uriPath)); – Billda Oct 26 '14 at 14:10

1 Answers1

0

As I already pointed it out here it may be due to the fact that video encoding parameters (profile, level, pixel format, etc.) are not supported on the platform, try playing around with the source.

Community
  • 1
  • 1
Rudolfs Bundulis
  • 11,636
  • 6
  • 33
  • 71