Alternative Plex Client for Android Devices

Get it on Google Play

There are several reports on the Plex Android apps user reviews of incompatibilities with older servers.   Also that there are several requested features missing.   While Serenity for Android doesn’t cover the remote control features and functionality yet.  It does currently work with all known server versions.

Note this is primarily designed for Tablets and Google TV devices, it may work on newer phones, but isn’t optimized for those devices.

Serenity uses DLNA to discover your Plex Media Server and if for whatever reason it can’t find one, you have the option to enter the IP Address directly.   Plex developers have said they are working on adding this feature but no time frame has been given.   In addition, myPlex is not a requirement with Serenity.  In fact it doesn’t support myPlex at all, as its primary purpose is to allow local access to your media.

If you are frustrated with the current Android plex client, then consider giving Serenity a try.  If you don’t feel like buying it first, you can always try one of the developer versions for free from the project’s web site.   Purchases through the play store help continue fund further development around the project.

The Plex developers will eventually get things straightened out, but you do have alternative choices to access your media your way.

Posted in android, googletv, open source, plex media server | Leave a comment

Serenity for Android 1.2.4

serenity-bonsai-logo

Version 1.2.4 is now available in the play store.   This fixes an issue with subtitle playback with the internal player.  Subtitles should now be working again.

Get it on Google Play

Plex Inc released the latest Android client, and apparently people are not too happy.  At least those that don’t need or want a myPlex account.   For those that still want to access your plex media server without requiring a myPlex account, give Serenity a try.   Serenity does not require or even makes use of myPlex.   It should never be a requirement for playback of local content.   Serenity does not support transcoding, but it does give you the option to use a player like MX Player to play back content that your device may not support natively.   You can get development versions to test from the projects web site.  Or you can buy released versions from the play store.   All development versions are free, and for those that like to mess around with code, the source code is also available for free for the app.

Another item that Serenity does not make use of is any gps or location based data.  It has no need for it, as it is primarily designed to allow you to access your media on your local servers for play back locally.   If you want to share your server with others that is your progative.  I personally don’t see the need for the app to ever need to know what is happening.

Serenity is optimized for tablets and specifically optimized for a TV screen.  Give Serenity for Android a try, it could be that Plex experience you were hoping to have.

Posted in android, googletv, open source, plex media server, serenity | Leave a comment

Serenity for Android now available for Nook and Nook HD!

For those Nook HD and Nook users that have the Google Play store, if you have a Plex Media Server, Serenity for Android can now be installed on your Nook tablet.  It’ll give you an alternative way to access your Movies and TV Shows from your plex media server.   We are glad to see the Nook finally get the Google Play store, and glad to make Serenity available for the device.

Posted in android, googletv, open source, plex media server | Leave a comment

Serenity for Android 1.2.0

serenity-bonsai-logo

Version 1.2.0 is now available in the play store.   This version focuses on adding better support for those with large video libraries.

Get it on Google Play

Features and Improvements:

  • Grid View for Movie browsing.  This is can be enabled through the Settings menu, and selecting the appropriate option under Layouts.  The grid will show a 3 x 8 grid of posters.  The grid scrolls horizontally.
  • Poster view for TV Shows.  Some users have requested a Poster view instead of the banner view for the TV Shows.  This can be enabled in the Settings Menu.
  • Grid View supports Page Up and Page Down keys on Google TV remotes to move a page at a time.
  • Set Category filter preference.
  • Preference for Poster view for TV Shows instead of Banners.
  • Support for SSA/ASS subtitles for internal player.
  • Support for MX Player’s view offset when running on a Tablet.. Will update the plex view offset after returning from MX Player.
  • Add Studio infographic for Movie and TV Shows.

Version 1.3.0 is under development and the plan is to finally add Music Library support as well as NetCast (Video/Podcast) support.

Posted in android, googletv, serenity | Leave a comment

Serenity for Android

serenity-bonsai-logo

Version 1.1.2 is now available in the play store. This is mainly a logo and name change for the app.  Why the name change, because Serenity runs on more than just Google TV devices.  It will currently run on any Android device running version 3.1 or above.  This means it is possible to load it on Kindle Fires, almost any Android Tablet, and even some android phones.   It also means it can run on those Android mini usb sticks, as well as the recently released OUYA device.     Having “Google TV” in the name was in some ways saying that it only ran on Google TV devices, which isn’t the case, it is optimized for those devices though.


Get it on Google Play

We changed the logo as well to help de-emphasize the TV aspect of the app, and also to differentiate it from other apps in the play store that were using the Serenity name. Logo created by Spiderfly Studios.

So if you are a Plex Media Server user and have a tablet or another android based device and were hesitant to give Serenity a try because you thought it was only for Google TV, please give it another look.  It has a different approach to playing back your content than the official plex client.

Posted in android, googletv, serenity | Leave a comment

Serenity for Google TV 1.1.0


Get it on Google Play

Version 1.1.0 is now available in the play store. There is one minor bug fix that came in with this release, and that is for situations where there are TV Show entries in Plex, but they have no episodes. This was reported through Google Play, so thanks to whoever reported this situation.

In addition to the bug fix, the following additonal items are new in 1.1.0.

  • Subtitle playback support (SRT format only)
  • Video Tutorial through Options menu
  • Refactored Video Download manager
  • Remove Music and Photo options from menu.
  • Support for Long menu names.
  • Keyboard Shortcuts
  • TV Show content ratings
  • OSD D-Pad navigation
  • Improved inforgraphic size for 1080p displays

Subtitle support works on Google TV as well as tablets.  Only SRT format is supported at this time as it appears to be the most popular version supported.  If you have other formats you would like supported by the internal player, please let me know.  Both the internal and supported external players will work with subtitles.

In addition, there is now a Video tutorial to help get people going with the app.  You can view this on YouTube.

It’ll provide a good overview of the application and how to get things setup.  In addition, I have tried to address the navigation issues for those with large video collections.  See the Keyboard short cuts list for a list of quick navigation features.

One final item, if you are in Columbus, OH on April 18th, I’ll be discussing Google TV development at the Google Developer’s Group meetup.

Posted in android, googletv, serenity | Leave a comment

Subtitle Support

One of the more frequent questions from users of Serenity for Google TV, is the ability to play back subtitles with the movie. Plex does provide the information if it is there, but until Android 4.1 (aka Jelly Bean), there was no native subtitle support for the video player. Even then it seems to have problems with reading streams for the subtitles. Google TV devices are currently based on Android 3.2 (Honeycomb) which doesn’t have an api to play subtitles back. Plex in these cases would normally Transcode the subtitles into the video stream, however, Serenity doesn’t support transcoding. So what to do. Simple turn to open source software for some help.


Get it on Google Play

Hidden on GitHub is subtitleConverter by J. David Requejo. This was a PHD research project, and allows for converting from one subtitle format to another. The nice thing is that the TimedTextObject contains a general format for subtitles. Once it is in this format it is a matter of navigating the tree and checking the time offsets for when the title is displayed and when it should disappear.

Since Google TV devices don’t have native support for displaying the subtitles, how do we go about this. Serenity uses a modified version of the MediaController, and SurfaceView. The main activity contains the following layout xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:id="@+id/video_playeback"
    android:background="#000000"
    android:keepScreenOn="true" >
    
    <SurfaceView android:id="@+id/surfaceView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        />
    
    <TextView android:id="@+id/txtSubtitles"
        android:layout_alignParentBottom="true"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:gravity="center"
        android:layout_centerHorizontal="true"
        android:visibility="invisible"
        style="@android:style/TextAppearance.Large"/>

</RelativeLayout>

This contains the surfaceview for the video to be drawn on, and a TextView to be used to display the subtitles.

For knowing when to display the subtitles during playback we use a Handler with a small time delay for when it should execute. The first time it is called with it’s runnable, it executes immediately. Every subsequent execution is delayed by 100 milliseconds.

private Handler subtitleDisplayHandler = new Handler();
private Runnable subtitle = new Runnable() {
 public void run() {
   if (isMediaPlayerStateValid() && mediaPlayer.isPlaying()) {
      int currentPos = mediaPlayer.getCurrentPosition();
      Collection<Caption> subtitles =  srt.captions.values();
      for(Caption caption : subtitles) {
         if (currentPos >= caption.start.getMilliseconds() && currentPos <= caption.end.getMilliseconds()) {
            onTimedText(caption);
            break;
  	 } else if (currentPos > caption.end.getMilliseconds()) {
	    onTimedText(null);
         }
      }
   }
   subtitleDisplayHandler.postDelayed(this, SUBTITLE_DISPLAY_CHECK);
 };
};

The postDelayed will re-execute the Handler with the runnable by the amount of milliseconds specified.

The onTimedText is what is responsible for displaying or hiding the subtitles during playback.


public void onTimedText(Caption text) {
   TextView subtitles = (TextView) findViewById(R.id.txtSubtitles);
   if (text == null) {
      subtitles.setVisibility(View.INVISIBLE);
      return;
   }
   subtitles.setText(Html.fromHtml(text.content));
   subtitles.setVisibility(View.VISIBLE);
}

Since the subtitles can be marked up with HTML to specify italics, bold, or underline we use the Html.fromHtml method to set the text as appropriate and set the visibility. If text came in null, the view is hidden.

The whole process is kicked off by a Async task that retrieves the Subtitles from Plex as a stream.

public class SubtitleAsyncTask extends AsyncTask<Void, Void, Void> {

  @Override
  protected Void doInBackground(Void... params) {
    if (subtitleURL != null) {
       try {
          URL url = new URL(subtitleURL);
          InputStream stream = url.openStream();
          FormatSRT formatSRT = new FormatSRT();
          srt = formatSRT.parseFile(stream);
          subtitleDisplayHandler.post(subtitle);
       } catch (Exception e) {
          Log.e(getClass().getName(), e.getMessage(), e);
       }
    }
    // TODO Auto-generated method stub
    return null;
  }
}

This just reads the stream, and parses the SubRip (SRT) formatted subtitles files into a TimedTextObject, and then starts the handler.

It is important to make sure when your Activity finishes that you remove any callbacks on the Handler. So make sure to do the following in your onFinish method:

   subtitleDisplayHandler.removeCallbacks(subtitle);

This should work regardless of Android version. It has been tested on Android 3.2 through the lastest JellyBean release. If you need to manipulate Subtitles, use them, or covert them to other formats, you may want to try out the subtitleConverter project. Expect to see this support with Serenity for Google TV v1.1.0.

Posted in android, googletv, open source, serenity | Leave a comment