Tuesday, November 28, 2017

Plex DVR Postprocessing Script

I've been using Plex DVR the last couple months, testing the Plex Pass and Beta capabilities, and figuring ways to make it a solid solution for me and my family. The DVR aspect works well on the latest Beta release, and the GUI is very simple to use. Setting up recordings and having them auto-added to my library works almost like magic.

But amidst the magic, I had some requirements that took more than out-of-the-box configuration. My two requirements were

  1. Remove commercials
  2. Reduce the final file size while preserving quality
Through lots of trial and error (lots), I was able to provide Plex with a script that takes care of both of these requirements. This script is provided to Plex via its path on the server in the DVR settings of the web console. Here, you can see I have added the script plex_pp.sh

The Plex Pass beta build mentioned above introduced commercial cutting natively within the Plex GUI. For those just starting out with Plex DVR, this is a fantastic addition they've added, and will greatly reduce the technical challenges of implementing it yourself. This newly built-in feature is still, however, in beta and may come with some unwanted bugs.

This script is a combination of information found online and tweaks for my needs (my household is mostly Apple products, hence the transcoding presets). All of this is maintained on my GitHub page, so check there for the latest bits.

My Environment (not earth shattering by ANY means)

  • PMS (latest Plex Pass Beta) running on a virtual Ubuntu 16.04
  • 4vCPU / 2GB RAM
  • AMD A-10 6800k APU in host running Windows 10 Pro
  • HDHomeRun Connect Tuner


  1. Comcut
    1. Comskip
    2. ffmpeg
  2. Handbrake-CLI
This script is used to run comcut on completed Plex DVR recordings, then transcode them using handbrake with the Apple TV 1080p preset.

Shout out
Original inspiration for this script came from this post

  • Be sure to change permissions on the .sh file, something like chmod 777 or u+x
  • Edit the script to put the paths to your Comcut and Handbrake-CLI locations. I've included mine as examples within the script
#! /bin/bash
# Plex DVR Postprocessing
# Version 0.0.1
# twitter.com/thatvirtualboy
# www.thatvirtualboy.com


time=`date '+%Y-%m-%d %H:%M:%S'`
handbrake=/PATH/TO/YOUR/INSTALL (mine is /usr/bin/HandBrakeCLI)
cut=/PATH/TO/YOUR/COMCUT/INSTALL (mine is /home/ryan/comchap/comcut)

echo "'$time' Plex DVR Postprocessing script started" | tee $dvrPostLog

# Check if post processing is already running
while [ -f $lockFile ]
    echo "'$time' $lockFile' exists, sleeping processing of '$inFile'" | tee -a $dvrPostLog
    sleep 10

# Create lock file to prevent other post-processing from running simultaneously
echo "'$time' Creating lock file for processing '$inFile'" | tee -a $dvrPostLog
touch $lockFile

# Run comcut
echo "'$time' Comcut started on '$inFile'" | tee -a $dvrPostLog
$cut "$inFile"

# Encode file to MP4 with handbrake-cli
echo "'$time' Transcoding started on '$inFile'" | tee -a $dvrPostLog
$handbrake -i "$inFile" -o "$tmpFile" --preset="Apple 1080p30 Surround" --encoder-preset="veryfast" -O

# Overwrite original ts file with the transcoded file
echo "'$time' File rename started" | tee -a $dvrPostLog
mv -f "$tmpFile" "$inFile"

#Remove lock file
echo "'$time' All done! Removing lock for '$inFile'" | tee -a $dvrPostLog
rm $lockFile

exit 0

Once the recording is complete, the script will kickoff and get to work on the file before adding it to the Plex library. While the script is running, you'll see that the recording sits at a 100% complete status until it's done.

If you have two shows recording back-to-back, this script will also process one recording at a time, to not tax your system.

I hope you find this useful. Thanks for reading!

Tuesday, November 14, 2017

Using Ubuntu 17.10 For Work

While my MacBook Pro was in the shop (that issue-riddled machine) I found myself in need of a substitute. The iPad Pro is great for quick bursts of productivity and for trips, but for work requiring 8 hours of sitting down at a desk, you just can't find a replacement for a mouse and keyboard.

I had a 2009 white MacBook in my garage running Linux Mint that was used for garage things, you know, playing classic rock, YouTube, etc. I decided to take it in, install the latest Ubuntu 17.10 on it and see how easy it would be to get by doing my day to day work.

I'm not missing macOS at all
After reading the news several months ago that Ubuntu was ditching Unity for GNOME 3, I thought, "Oh great, they're replacing a bad DE with an even worse one." However, I've been pleasantly surprised at the usability of Ubuntu 17.10, and dare I say, I've actually really enjoyed using it. I'm not missing macOS at all. The minimalist and streamlined top panel works great to show me the system info I need. Desktop notifications are front and center without getting in the way.
Once I configured a proper theme (took all of 5 minutes using GNOME Tweaks) I was ready to go. It's strange saying this, but Ubuntu 17.10 feels like the mashup of Windows 10 and macOS that I've always wanted. Between the system's Activities (mission control) screen, Application Drawer, and multi-monitor support, everything works in a way that makes sense and is a joy to use.
Ubuntu 17.10 feels like the mashup of Windows 10 and macOS that I've always wanted.
One example is having multiple Firefox windows open. In macOS, if all these windows are minimized, clicking the Firefox icon on the dock will maximize just one of the windows, causing me to have to right click the icon and figure out which window I meant to maximize. Ubuntu 17.10 handles this way better. When I click on the icon in the dock, instead of picking a random window to maximize, it shows me a preview of the open windows to ensure I open the desired one. Seems small enough, but it makes a big difference in your workflow.

Ok, I brought his thing inside to do work... Luckily, we use our very own Workspace ONE at VMware as well as an O365 subscription allowing access to the full Office suite from the browser, so almost all of my work could be done right in Firefox.
There were scenarios where the full PowerPoint exe was necessary, as well as Skype for Business, and that's where our internal Horizon View VDI came into play, again, completely accessible from Firefox.
All in all, I feel comfortable saying that Ubuntu 17.10 is the best Ubuntu yet. Now if only we can get Linux working on the latest MacBook Pros!

Thursday, August 31, 2017

VMworld US 2017 Wrap Up

Sitting at the airport waiting to board allows you time to reflect on all he awesomeness that happened at VMworld US 2017. Product Announcements, Demos and Deep Dives, networking, and of course the Appreciation Party - Las Vegas was overtaken with VM goodness. 

Day 1 and 2 General Sessions can be watched here

Top Sessions from each day can be watched here

Full conference registers have access to all on-demand sessions here

Sunday, August 27, 2017

VMworld US 2017 Day #1

Today marks the official first day of VMworld US as the Welcome Reception and Solution's Exchange opened for all 20k attendees. Everyone here is energetic and excited to get the conference started. The 110 degree weather here in Las Vegas only made the drinks and apps better at the welcome reception. Mini-Grilled cheese anyone? How about a Greek Salad Shooter?

The registration and merch lines were almost non-existent (I guess it pays to land right as the welcome reception is starting!). After running into some fun faces like Ray O'Ferrell (CTO), Jack McMichael (EUC SE), and Brian Davidson (PREM Sr. Mgr), I got to mingle with some TAM customers and discuss the SDDC Journey they're on.

VMware's booth (at the very back of Solution's Exchange) has an amazing setup with demos and experts to talk about VMware vision and to dig into the technical details of our solutions. Other than beer sleeves, the hand out of choice this year appears to be none other than the fidget spinner.

Tomorrow's General Session with Pat Gelsinger should be great. See you there!

Tuesday, August 22, 2017

Download the VMworld 2017 app now!

VMware released today the all-new VMworld 2017 mobile app. The app is free and will work on your phone and tablet. Here are a few things you can do with the app:
  • Get your QR code for express badge check-in
  • Watch breakout session recordings on-demand
  • Add sponsors, exhibitors, and speakers to your Favorites List
  • Find your way around with the interactive and searchable map
  • Access VMworld Social Visualization, Community Offerings, and Social Channels
  • Network with other conference attendees
  • Keep current with daily highlights and important notifications
  • Provide feedback through session surveys
The app is compatible with iOS, Android, and Windows devices

Find out more at https://www.vmworld.com/en/mobile-app.html
Download from the iOS App Store

Monday, August 7, 2017

Mapping VMware Updates and Tools to Build Numbers

VMware has always branded its software as GA, Update 1, Express Patch 4, etc etc. This makes it easy to discuss features and fixes among employees and customers alike. The challenge, as many of you know, is knowing the exact build numbers that correlate to these upgrades and patches. Those specific build numbers are often requested by TAMs, Support, and Engineering in order to ensure accurate recommendations when upgrade planning or troubleshooting.

Another challenge is knowing where in the stack of released versions you line up. If you're on vSphere 6.5.0b Patch 1, is that before or after Express Patch 1b? When did Update 1 come out again?

Luckily, VMware has made it easy for you to track down these build numbers, and know where you are in the greater timeline of releases. VMware Knowledge Base Article 1014508 is a hub of build numbers for most VMware products. Be sure to bookmark this page!

Table from KB1014508

You may notice a key component missing from this table, and that would be VMware Tools, VMware's guest operating system management and performance solution. VMware Tools can throw in some complexity since there are versions that come bundled with ESXi hosts, and there are separate build numbers for how ESXi sees it, vs how the Guest OS sees it. This can be overly complicated in mapping out. Here's the second page to bookmark:
Notice the 4 columns of information. As the page states, the columns represent the Tools Client registered build, the source ESXi build bundle, the GOS identified build, and the ESXi server build number. All in a public setting that easy to consume and report on.

Thanks for reading!


Saturday, March 18, 2017

Horizon 7.1 | Everything you need to know [Updated]

VMware released the highly anticipated Horizon 7.1 this week and there are all sorts of enhancements and new features related to the next-gen virtual desktop infrastructure. Here's your one-stop-shop for everything you need to know.

[Update] Check out the new Horizon 7.1 Technical Overview Video on YouTube and ensure sure your environment is configured properly for a successful upgrade.

Horizon 7.1 Official Pubs including installation, upgrades, configuration, and administration.

See the official What's New post hosted on the VMware EUC Official Blog

Always review the Official Release Notes prior to upgrading your environment

Credit to Tony Huynh, VMware Director of Horizon Product Management and the EUC Technical Marketing Team

Enhancements to Horizon

  • Instant Clone (IC) updates

    • Instant clone support for RDS hosts provides the ability to rapidly provision RDS hosts and build out your RDSH farms.

    • Automated maintenance mode allows the administrator to schedule windows and put their RDS hosts in maintenance mode.

    • Multi-vLAN support for Instant Clones removes the limitation of 1 vLAN per 1 IC pool, and enables multiple vLANs per pool.

    • vGPU-backed Instant Clones provides the option to provision IC desktop pools with vGPU enabled.

    • Automatic deletion of Instant Clone parent VMs with host maintenance mode – currently, administrators must manually delete ParentVMs before ESX can go into maintenance mode. This feature eliminates the need for admin intervention.

  • Unauthenticated Access - allows users to directly access their RDSH applications without having to logon using Windows AD credentials. This preserves workflows for nurses and doctors using kiosk stations (Windows and Linux clients only).

  • RDSH Application Icon Customization - administrators can now customize the icon for their RDSH Applications.

  • Windows Server 2016 support for Horizon infrastructure - deploy Horizon Broker and Composer using Windows Server 2016.

  • Enterprise scale Cloud Pod Architecture (CPA) – increases the scale for CPA up to 75k sessions across 5 sites

  • Support for ADMX files - upgrade to ADMX files, which are used exclusively by Windows 10, 2012, 2016.

  • Support of tags for global entitlements in CPA – supports the use of tags to allow the administrator to control desktop accessed based on admin-specified attributes and extends support for global entitlement in CPA environments.

  • Protect full clone pools with vSphere VM encryption – for environments running vSphere 6.5 and above, VMware has qualified and now support encryption with full clone pools.

  • Horizon desktop restart – allows users to restart their virtual desktop from the client menu without administrative intervention.

  • Horizon PowerCLI updates – instead of requiring a separate package to support PowerShell, Horizon 7 now provides an integrated module included in VMware PowerCLI 6.5 R1.  These PowerCLI samples have now been posted to GitHub to be shared with community.

Unified Access Gateway (UAG) 2.9.1

  • Formerly known as Access Point

  • Blast Extreme Adaptive Transport (BEAT) support – supports a new release of Blast Extreme.

  • FIPs OVA - Separate OVA for FIPS-140-2 with restrictive functionality with only PSG support available in this release, BSG support will be released in patch v2.9.1

  • Admin User Interface (UI) - minimal UI enhancements

    • To make deployment and troubleshooting easy, new health status for services and backend resources using color coding has been added in the UI

    • Ability to change log levels from UI for ease of debugging

  • Access to on premise legacy apps - Supports access to on premise legacy apps using headers and Kerberos based authentication. UAG acts as Identity Bridge to convert SAML to Kerberos or headers for back end resources access.

  • Security enhancements - SLES 12 SP2 with updated opens’ version.

  • Hyper-V support - Provides additional flexibility and footprint for UAG in Microsoft environments. Current release only AirWatch uses cases has been qualified by QE. Horizon use cases to be qualified in future

Blast Extreme Updates

  • Blast Extreme Adaptive Transport (BEAT) – a new end-to-end protocol optimized for LAN and WAN environments, while delivering higher frame rates, faster file transfers and consuming up to 50% less bandwidth.

  • UDP-based transport is specially designed for low bandwidth, high latency, and high packet loss networks. UDP mode is only available with the Unified Access Gateway.

  • Over 4X faster file transfers for transcontinental connections and over 6X faster file transfers for intercontinental connections when compared to Horizon 7.0.2.

  • Automatically connects using UDP (primary) or TCP (secondary) transport protocol.

  • Intelligent error correction for increased data reliability.

  • Enterprise level security with SSL web sockets

    • AES encryption for TCP

    • DTLS encryption for UDP

  • Available across all Horizon desktop and mobile clients

Remote Experience Updates

  • Skype for Business (beta release) – with the new VMware Horizonâ Virtualization Pack for Skype for Business, customers can now communicate using rich audio and video codecs native to Skype. This initial release is only available for Windows clients. For more information, please refer to the Skype beta community page - https://communities.vmware.com/community/vmtn/beta/horizon-skype4business-beta/overview

  • User login enhancements – allows administrators to hide domain name from login list for increased security. Users can login using <domain name>/<user name> to access their desktops and apps.

  • Windows 10 Aero Peak and Aero Snap – allows users to take advantage of Windows 10 enhancements.

Horizon Client Updates

  • Windows 4.4 client updates

    • Support for Unauthenticated Access with Horizon Apps

    • Support for multiple proxy servers configured with proxy auto-config (PAC) file

    • Hide domain list and server URL from client UI for enhanced security

    • Support <domain>/<user name> format in username field

    • Desktop restart option from client menu

    • Resolution helper to show the resolution of virtual desktop

    • Aero snap-assist mode in Windows 10

    • Support for Aero Peak

  • Mac 4.4 client updates

    • Biometric authentication support with Touch ID

    • Touch bar integration for enhanced user experience

    • Hide domain list and server URL from client UI for enhanced security

    • Support <domain>/<user name> format in username field

    • Desktop restart option from client menu

    • Automatic client update

  • Linux 4.4 client updates

    • Unauthenticated Access for Horizon Apps

    • Support for Ubuntu 16.0 x86_64

    • Support for RHEL 7.3 x86_64

    • Hide domain list and server URL from client UI for enhanced security

    • Support <domain>/<user name> format in username field

    • Desktop restart option from client menu

    • USB redirection UI for Horizon Apps

  • iOS 4.4 client updates

    • New widget to easily launch Desktops and Apps

    • Push default user name to client with Airwatch using AppConfig

    • Hide domain list and server URL from client UI for enhanced security

    • Support <domain>/<user name> format in username field

    • Desktop restart option from client menu

    • Support App Transport Security (ATS) for enhanced security

  • Android 4.4 client updates

    • Support for multiple monitors (2 monitors) – Tech Preview

    • Immersive full screen experience and system mouse icon

    • Hide domain list and server URL from client UI for enhanced security

    • Support <domain>/<user name> format in username field

    • Desktop restart option from client menu

    • Preservation of sidebar and touch ball position

    • Connect to PCoIP secure gateway with FQDN

  • Chrome 4.4 client updates

    • Support for multiple monitors (2 monitors) – Tech Preview

    • Hide domain list and server URL from client UI for enhanced security

    • Support <domain>/<user name> format in username field

    • Desktop restart option from client menu

    • Connect to PCoIP secure gateway with FQDN

  • HTML 4.4 Access

    • UX redesign for enhanced user experience

    • Hide domain list from client UI for enhanced security

    • Support <domain>/<user name> format in username field

    • DPI Sync to deliver extremely sharp graphics and text

    • Desktop restart option from client menu

    • Support for multiple monitors (2 monitors with 2560*1600) – Tech Preview

  • Windows 10 4.4 UWP client updates

    • Support for Xbox One device

    • PCoIP General Availability

    • Pin Horizon client to start menu

    • Launch UWP client from Workspace ONE portal with vIDM integration

    • Screen rotation support for enhanced user experience

    • Enhanced stability and performance with H.264 codec of Blast Protocol

Horizon for Linux Updates

  • Support for USB redirection – Tech Preview

  • Support for CDR – Tech Preview

  • SSO with Ubuntu 14.04 and 16.04

  • Keyboard layout and locale sync-up

  • Support RHEL 7.3 x84_64 as guest OS

  • Support Cent OS 7.3 x84_64 as guest OS

  • Support for SUSE Linux Enterprise Desktop/Server 12 SP2 as guest OS


Tuesday, January 17, 2017

My Top 10 Horizon View Tips

If you're just getting started with managing a Horizon View environment, or if you're looking for ways to make the most of your new environment, then head on over to the VMware TAM Blog to see my Top 10 List for a successful Horizon View deployment. This post covers the basics for the core Horizon Infrastructure, so no mention of app virtualization or profile management. Those may come later if there's enough demand.


Follow by Email