Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Things video playback on Raspberry Pi

Has anyone been able to successfully play a video using Android Things on a Raspberry Pi? If so was there anything special you had to do to get it to work? If not does any one know why it isn't working?

I made a simple video player that plays a local video from disk. The app runs fine on a phone but I get an error dialog on the Pi saying "Can't play this video".

One Thing I have already ran into but I think I solved was there are no content providers in Android Things, so instead of using a uri for the video source I gave it a file directly like so.

EDIT: Code edit

VideoView videoPanel;
.
.
.
videoPanel.SetVideoURI(Android.Net.Uri.FromFile(new Java.IO.File("/sdcard/Movies/videoFile.mp4")));
like image 970
Omar Rodriguez Avatar asked Feb 02 '17 16:02

Omar Rodriguez


People also ask

Can Raspberry Pi play video files?

The Raspberry Pi makes a competent video player thanks to a wealth of software that you can utilize on it. Thanks to the Pi's small size and power-efficient hardware, it has become a popular choice for those wanting to play videos on their screen.

Can I install Android Studio on Raspberry Pi?

So, whatever OS you choose to use, just install it on the SD card and then stick it into the Raspberry Pi. Android for Raspberry Pi does not work “out of the box.” To get a working Android OS on Raspberry Pi, tweaks need to be made because Raspberry Pi and Android don't work natively together.


1 Answers

I was using 0.5.1-devpreview with raspberry pi 3, and tried to use exoplayer to play mp4. Audio works but not video (just black screen). Same result for youtube iframe sdk (black screen with only audio playing).

like image 112
yawl Avatar answered Sep 17 '22 15:09

yawl