2

I am using a VideoView for streaming two video and it works, but not with one of them. I still have no clue why.

My URL is https://MY_SERVER_IP/VIDEO_ID/video.mp4, where I confirmed that my link to the server is correct in both cases (one video works, the other just change the VIDEO_ID in the link.

I have accessed both links and they do download a video in a valid format.

I thought the video that doesn't work had a different and incompatible encoding, so I put it in the SD card, and VideoView was able to play it normally.

Any thoughts on what can be causing it?

The logs I get from VideoView:

I/VideoView﹕ SetDataSource
D/MediaPlayer﹕ Couldn't open file on client side, trying server side

It might me worth mentioning that the first video has 1.3MB and the second 13.3MB, but I don't think there's a limit for that.

EDIT 1: I've been trying everything (3G, WiFi, reconnect to WiFi), and once, but only once, my video played. I don't know why, and I can't make it a consistent use case. There might be a limit for streaming videos, because I tested other short videos and they all played.

EDIT 2: It seems it is a hardware/phone isse. I tested on my Android emulator and the first video didn't play, and the second actually played. I tested on GenyMotion emulator (emulating a Galaxy S5), and same behavior. Then I got a real S5 and it played both. The phone where it doesn't play the long video is a OnePlus One.

Then I suppose the only answer for me is this, where I should know and list all the devices that are incompatible with the video and do something (possibly downloading the video and playing locally).

Sometimes I wish Android had a better support for different phones/hardwares.

EDIT 3: My phone is a OnePlus One and does not play the long video. Most phones I tested so far played it normally.

Community
  • 1
  • 1
Teo Inke
  • 5,928
  • 4
  • 38
  • 37
  • Facing same issue but its not device issue it is video format issue or video encoding issue.I am trying to solve this problem. – Waheed Akhtar Sep 30 '15 at 05:00

0 Answers0