HD Homerun and Plex transcoding

So I got an HD Homerun with the intention of using it via plex to view TV when away from home or travelling. Sadly it seems plex needs to do transcoding of the stream to render it which means my poor old Synology NAS that can serve me all my locally stored media no problem gets hammered cpu wise when trying to send the HDHomerun streams. Is there no way to send the ‘native’ streams like you can with your local media. I have no issue streaming 1080p up from home to my remote locations with media (200mbps down / 20 mbps up) but the CPU bottleneck when streaming live TV is making the HDHomerun pretty useless to me.

I even tried accessing the HDHomerun via open VPN using the windows 10 Silicon Dust client from my remote machine but to no avail.

Any advice on solutions welcome otherwise the DVR will be going back to Amazon i think.

thanks
Ad

You can post process the recording to something that can be streamed without having to do on-the-fly transcoding. I have the Synology DS1512+ and use the script below with the HD Homerun (UK)

I have it as /volume1/Plex/Application Support/post_process.sh (remember to chmod so user / group can execute) and this is what you need to put in the “post processing” setup. Plex passes in the filename of the recording as the only option.

The script checks to see if HD(x264 - just copy video, transcode audio) or SD (MPEG2 - convert to x264, transcode audio). If the transcoding goes OK - then we delete the original source file. Plex will then handle copying the converted file to your library.

Am considering whether a mkv container would be more flexible (and to detect sub-titles that sometimes gets captured) - I stream to Sony (Android TV), Samsung (local & remote) and iPhone.

Script provided “as is” - was written for me by a much more skilled friend. A basic understanding of how to ssh to your Synology, create files / permissions / chmod etc… will be needed - check Synology forums for guidance.

Matt

#!/bin/sh

LOGFILE="/volume1/PlexLibrary/logs/postprocess-$$.log"
exec 2>&1
exec >>"$LOGFILE"

if [ ! -z "$1" ]; then
# The if selection statement makes sure $1 is not empty.

  FILENAME=$1
  SDINDICATOR="Stream.*Video: mpeg2video"
  HDINDICATOR="Stream.*Video: h264"

  MPEG_INFO=$(ffmpeg -i "$FILENAME" 2>&1)
  FFMPEG_ARGS=("-hide_banner" "-i" "$FILENAME" "-loglevel" 16 "-c:a" "libfaac" "-movflags" "+faststart")
  SD_ARGS=("-vf" "yadif" "-c:v" "libx264" "-preset" "veryfast" "-crf" 19 "-profile:v" "main" "-level" "3.1" "-b:a" "128k")
  HD_ARGS=("-c:v" "copy")

  if echo "$MPEG_INFO" | grep -e "$SDINDICATOR"; then
    echo SD
	OTHER_ARGS=("${SD_ARGS[@]}")
  else
    if echo "$MPEG_INFO" | grep -e "$HDINDICATOR"; then
      echo HD
	  OTHER_ARGS=("${HD_ARGS[@]}")
	else
	  echo "UNKNOWN RECORDING FORMAT"
	  exit
	fi
  fi

  ffmpeg "${FFMPEG_ARGS[@]}" "${OTHER_ARGS[@]}" "${FILENAME%.ts}.mp4"
  if [ $? -eq 0 ]; then
	rm "$FILENAME"
  fi
echo "****DONE*****"

else
  echo "Usage: $0 FileName"
fi

note this won’t help with LiveTV - Plex will still take into account the profile (capabilities) of the client device that is connecting and transcode accordingly.

When you connect via VPN - the HD HomeRun app cannot discover your network device… but if you know its IP address (look at your router DHCP table) you can connect with your web browser and get the list of channels.

When I do this, from Mac/Safari, the stream cannot be played - but I can launch VLC (http://videolan.org) and enter the address as a network source (e.g. http://ip-addr-of-hdhomerun:5004/auto/v104 for CH4HD) and watch the stream (tested local network - not VPN, but should work).

Matt