1/19/2016

EyeTV3 n Plex, Using VLC as a DLNA client

HDHomeRun Extend is a dual Over The Air network tuner with built in H.264 transcoding. EyeTV3 is a mature Electronic Program Guide (EPG) downloader and scheduling application for choosing and tracking programs and seasons of shows for recording.

Plex is a flexible media server which automatically downloads program details and artwork, serving it up through a web appplication or DLNA service for viewing. VideoLAN Client (VLC) is a multiformat multimedia viewing application.

EyeTV3 manages the tuner and begins a schedule by waking up any sleeping devices, and records the scheduled programs. A post program script moves the tuner transcoded H.264 file to the Plex media archive where it is automatically cataloged and indexed and made available.

The Plex web application provides a choice of Flash or HTML5 browser client for viewing programs.

Plex also provides a DLNA streaming service to access the recorded program using a DLNA client.

VideoLAN client is a more fully functional alternative to a web based client. Until recently the VLC client was not a good DLNA client, as of version 3.0.0 (and 12/3/15)(currently only available in nightly builds) however it has become a fast and stable DLNA client. Previous versions 2.2 and lower had a consistent habit of taking minutes to complete a recursive audit of the DLNA source, and abruptly crashing. The behavior has greatly improved.


DLNA is a protocol for discovery and streaming that relies upon http protocol to communicate SOAP requests to determine the clients capabilities, and then serves the stream or transcodes it "on the fly" to service the client request. It relies upon an xml file formated Client Profile, which the DLNA server chooses to use based upon the Clients self indentifying information in the Clients http request.

These Client Profiles are unique to the Client application or Network device and must be written custom to make sure the DLNA server properly provides service to the DLNA Client.

They have a specific format, well described here:

Writing profiles for DLNA devices...

The Plex server application on OSX has an Applications/{base install directory}/Resource/Profiles directory which is a cache of Profiles for commonly recognized  clients and one 'Generic' profile which makes no attempt to transcode and is reserved for use with unidentified clients.

One of the Plex server "Flagship" features however is that it does make an attempt to specifically "identify" the client requesting service in order to determine the appropriate "real-time" transcode it should perform on a stream for that client. While using the client in "non-transcoding" form is possible, it was not a specific design goal of the Plex media server project, but rather as a final resignation step to provide service to a client.  {Sometimes} it is "preferred" to moderate, or selectively "choose" not to transcode, or rather to adjust the transcoding so that the hardware the Plex media server is running on is not over powered or its resources over subscribed. In those cases modifying the client profiles (in the user account directory for the Plex server application) would be the appropriate choice. Creating and modifying "client profile - overrides" is preferred and more appropriate, since the Plex server update process also retrieves "revised" base client profiles from the project upstream sources, which could in-advertently "overwrite" any user specific modifications.

Plex server Profiles are brought along with the install of the Plex server program and updated periodically. Personal Plex server Profiles are added to the personal home Plex server application data directories (specific to the user account that runs the Plex server) and sourced (i.e. included when the Plex server starts up and searches its application data directory for account specific application data files) during the start of the service to amend (revise, alter, change, modify, qualify, adapt, adjust)or collaborate or (even) override and supercede those of the inital base Plex server application install.

One of the key things to take note of is at this time the VLC nightly builds come as .7z, .zip, .exe, .msi installation bundles. Neither the .exe or .msi will install a functional version of the nightly builds as of 1/18/16. However a manual install using the .zip file results in a fully functional VLC client program.

Another advantage of the DLNA service is many of the 10 ft user interface devices like Home Televisions, Mobile phones and personal tablets are all DLNA compatible and can also discover and source content. Plex also has the ability to automatically transcode the content for the client devices as needed rather than permenantly degrading or duplicating content from its original storage format.

A convergence of services is also occuring in this space as AppleTV, Roku, Amazon, Netflix and other media sources and devices already support Channels on their native interfaces and are beginning to offer add-on clients that will similarly source DLNA content.. such as the VLC interface on AppleTV. A Channel is merely a streaming source that makes its output available through a DLNA enabled media server. This can include Live Cable or Over the Air broadcasts, or Personal and Business conferencing applications currently replacing traditional personal communications such as Skype, Facetime and Hangouts. Gaming sources like Twich can also provide a Channel as can real time in persona or via avatar persona games.

Scheduling remains a logistical tangle of cooperative management of limited resources made easier by multiple on demand sources. But it has not been replaced, it has merely been transformed into an artform entrusted to individuals and mobile assistants that can interpolate and make the best decisions among many less desirable outcomes.

1/17/2016

OSX, using RDP to autoscale resolutions

The Microsoft RDP client mtsc can be used to connect to a remote OSX desktop, if the iRAPP terminal service is installed and running. This has many advantages over traditional VNC or Screen Sharing. Pixels are normally displayed 1:1 unless the RDP client profile for the connection is manually edited in a text file editor to enable "auto-scaling" of the connection based on client drag and drop re-sizing of the remote window corners. This is how to do that.

screen mode id:i:1
use multimon:i:0
desktopwidth:i:1280
desktopheight:i:1024
session bpp:i:16
winposstr:s:0,1,60,1,1280,1054

 ...
smart sizing:i:1

Basically screen mode, winposstr and ["smart sizing"] are the only RDP settings that matter for initiating the osx-server connection window state.

The "smart sizing" value is new and cannot be set by any of the GUI edit fields in the RDP "Edit" mode. To set it you must open the RDP profile for the connection in a text editor like notepad and save the changes.

RDP profiles are "saved" configurations for a connection that can hold destination, username at logon time and even a semi encrypted password from the last session. They are created by running the RDP client [%windir%\system32\mstsc.exe] and choosing ["V" Show Options] instead of pressing the [Connect] button. Then "tabbing" through the options to pick and choose settings, finally returning to the first tab and selecting [Save As..] -- by default the profile will be given a name and placed in your "Documents" or "My Documents" folder depending on the version of windows your running (they are essentially the same location).

All files with the extension .rdp are automatically "opened" with the [%windir%\system32\mstsc.exe] RDP client program. Depending on your selections in the profile it can completely automatically open a connection with a remote osx-server. Short-cuts to these profiles can then be placed in the Start Menus or on the Taskbar to simplify quickly connecting to a remote system.

In the first image below the window is opened normally, when "auto-scale" is turned on it automatically resizes the window to a pixel ratio of [osx-server:windows-client] of  [1:1]


But with "auto-scale" enabled, a Microsoft Windows desktop mouse can "GRab" any corner and initiate a "re-scale" of the same number of [osx-server] pixels to "fit inside" the re-defined [windows-client] window.

The effect is that the pixels can be "crushed" or "densified" or "squished & stretched" into non-rectangular blocks. But this can be very useful when multiple client windows to different osx-server instances are being managed simultaneously. They can be instantly resized  or "zoomed-down" to maintain a live window without taking up the entire desktop space.

It is possible to resize osx-server windows into randomly small windows "temporarily" and then "double-click" their title bar to instantly [Pop] them back to Full Size.. and double-click again to return them to their former, "smaller" scaled "recessed" state. The autoscale only works one-way however.. you can re-size the windows "smaller" but they can never be "enlarged" beyond their 1:1 value. When the osx-server windows are at 1:1 that is as big as they can get.


One of the really cool things about this is the running [resolution] of the osx-server console can be "really" high and yet the full desktop can still be seen on a lower or smaller screened desktop client.

And with the other profile attributes you can make sure "the volume" is turned down on "first connection" so that it doesn't whallop you with a Massive 1:1 scale in your face at first sight.

RHEL6, How to install Solr 5.4


Solr is a Java based full-text search service which uses the Apache Lucene search engine. Red Hat Network does not have an offical package for it and it is not available through EPEL for RHEL6. Here is one way to install it with a minimum of effort.

First download a recent version of Java 1.8 and use the [Alternatives] command to make sure it is selected as the default for the operating system. Note this example installs it into /opt
sudo su -

---------------

cd /opt
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u40-b25/jdk-8u40-linux-x64.tar.gz"
tar -xzf jdk-8u40-linux-x64.tar.gz

cd /opt/jdk1.8.0_40/
alternatives --install /usr/bin/java java /opt/jdk1.8.0_40/bin/java 3

alternatives --config java
select option #3

java -version

java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
---------------
Then download a recent version of Solr and  install it. Note that this version of Solr comes with a special script which will install a runtime script in the /etc/init.d directory. [Also] Note in this example Solr is being unpacked into /tmp and the installation script is run relative to /tmp.
---------------

cd /tmp
wget --no-cookies --no-check-certificate  http://www.us.apache.org/dist/lucene/solr/5.4.0/solr-5.4.0.tgz
tar -zxvf solr-5.4.0.tgz

cd /tmp/solr-5.4.0
bin/install_solr_service.sh /tmp/solr-5.4.0.tgz

"wait for the completed status message -- it can take a while"

chkconfig solr on

---------------
Depending on how you manage your local firewall rules, put an exception in to allow connecting to port 8983. Solr installs a copy of the java based minimal jetty webserver to provide service, it listens on port 8983.
---------------

sudo firewall-cmd --zone = public --add-port = 8983 / tcp --permanent
sudo firewall-cmd --reload

[or]

iptables -I INPUT -p tcp -m tcp --dport 8983 -j ACCEPT
service iptables save

--------------- 
Be wary of the status of selinux if you don't maintain its "invisible" state for permissions on directories and resources. In this example its shut off.
---------------

vi /etc/sysconfig/selinux => disabled

setenforce 0


---------------
The installation script will copy files from the unpack location "/tmp" to the "/opt/solr" directory and create a collections directory /var/solr. Make sure its owned by the new solr user, the previously run installation script created a user and group named "solr".
---------------

chown -R solr:solr /var/solr

---------------
[Be sure] to change user context to the [solr] user, then "Create" a collection and index a collection by "Posting" it.
---------------
sudo su - solr
cd /opt/solr
bin/solr create -c documents
bin/post -c documents docs/
cd /opt/solr
bin/solr create -c gettingstarted
bin/post -c gettingstarted example/exampledocs/*.xml
---------------
You can now go to the Solr admin panel at http://localhost:8983/solr/