Android Question Strange video problem, what to do?

TrisectDevelopment

Active Member
Licensed User
Longtime User
I'm working on an App that take photos and videos and save them on a server for both iPhone and Android. Both Apps save the video as a mov file.

Each App can show videos from web that was recorded on the device.
Android App can show video recorded on the Android App and iPhone App can show video recorded on the iPhone App.

Whoever Android can not show videos from iPhone and vice versa.

Anyone has any idea why that is?
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
The native android VideoVeiw has very limited CODEC support, it can only play MP4 baseline profile (if memory serves me correctly). Not sure about Apple devices. In my apps I use an intent to use alternative media players such as MXPlayer which has far better CODEC support and will play almost any media file type.
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
I tried the Videojs example as you suggested stevel05, but I cannot get it to show my video.
The path to my video is http://94.143.10.158/testfolder/movie.mov

I add my video to the file and removed the others, so there was one line like this.
HTML.Append("<source src='http://94.143.10.158/testfolder/movie.mov' type='video/mov' />" & CRLF)

But it will not play my video.
There is a play button on the screen but it does not respond.

Any help would come very handy!
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Looks like it's a codec issue not being supported by the webview, the same as the standard video player. I'm not sure what you can do unless you can record in a format that both will play. Or as Randomcoder suggested use a 3rd party App.
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
@stevel05
My iPhone App is coded in Xcode and not B4i

I found out that those two system har not compatible in video formats, so I must find another way to display videos in my Apps.

Thats why I thought of showing video in web view, but so far I have not been able to do just that.

The iPhone App saves the video in mov format (quick time) and the Android App saved in MP4.

So if any one has any idea on what to do, I would really like to hear it.

I had an idea that maybe I could code a PHP file that would play the videos in web view, but I have not been able to do that yet.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
There appear to be quite a few converters available that will work one way, i.e. ios to android. You would probably want to find a converter library that can be wrapped for B4a so you can convert both ways within an app. This would obviously add time to the loading / saving of the files.
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
I tried Vitamio and it is very slow and the video i rotated.
I could not get ffmeg to work.

I did not think that it is so hard to finde and code a common video format that could be viewed on both platforms.
The webview could show iPhone video on computer but sadly not on Android.

Has nobody else been working with this problem at all?
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
I found a video on line that will play on both systems.
Now I just need to find out how to get my Android App to save a video in that format.
Its a file with codec avc1 H.264/MPEG-4 AVC format.

You can see the video here.

So if anybody can help me with how to save the video in this format please comment. :)
 
Upvote 0

TrisectDevelopment

Active Member
Licensed User
Longtime User
@moster67
This tool is a program to be run on Windows.
I need to do it in my App.

My App uploads video to the server and another App (Android, iPhone) play the video.
I mean its all automatic, no time to convert video.

The files are stored on an Ubuntu server.
 
Upvote 0
Top