Record with OBS Studio

The biggest challenge when recording from an Android TV Box (video streaming hardware) is to record video and surround sound in sync. I tried several ways of doing this and found one which allows me to do it in one recording without too expensive hardware. I have not found a video capture card on the market which allows to record a protected video stream or multi-channel surround sound.

Note: This guide is not intended to teach you how to circumvent copy protection. Make sure the source or service you are recording from allows you to make a copy for your own use before you record. Creating multiple copies or selling copies is prohibited by law.
Note: Subtitles stretch to convert from PAL to NTSC or vice versa: 0.960 / 0.959 or 1.0416

Settings

Gear

With this setup you can record video and 5.1 or 7.1 audio at the same time.

Cost of gear

  • Media Player: 100 USD
  • Disc Player: 1000 USD (you need to find a premium player or another device with HDMI passthrough and analog surround audio outputs). Instead of a Disc Player you can utilitze any 5.1 pre-amplifier which supports an audio codec currently used by Netflix, Disney+, Amazon Prime, HBO Go, etc. If you use a pre-amplifier with variable output volume make sure you adjust the volume so you don't need to post-process amplification to it. Note that not every 5.1 pre-amplifier works, only one which supports the audio codec in the source stream.
  • Multi-channel USB audio interface: 300 USD (with 6 or 8 analog inputs). If you don't have one or do not want to buy one you can record the 6 channels in 3 stereo pairs and then sync the audio with Audacity. 3 stereo pairs means you need to record the stream 3 times, each time you connect a different pair of analog output to the analog stereo input of the Video Capture card (e.g. L/R, C/LFE, SL/SR).
  • Ground Loop Isolators: 30 USD (for 6 channels)
  • HDMI to HDMI converter: 30 USD (to remove HDCP)
  • TOTAL: 1500 USD

Connection diagram

HDMI
HDMI
FL/FR
C/SW
SL/SR
(6ch RCA)
HDMI
PCI-e
or
USB
FL/FR
C/SW
SL/SR
(6ch RCA)
USB
Ground
Isolator
Video
Capture
USB Audio
Media Player
NoHDCP
Disc Player
PC

Notes:

  • The UDP needs to be set to Source Direct to pass through the video to the capture card, and the input needs to be set to HDMI In.
  • While Netflix has a desktop client from which you could separately record 5.1 audio, other streaming clients on Windows do not have this feature.

Steps

  1. Switch on Media Player
  2. Switch on Disc Player
  3. Set Disc Player to HDMI in with remote or handheld app
  4. Start OBS

Software

Desktop Audio 5.1

  • Video: none
  • Audio: Windows 10 App

FHD Surround 5.1 (Intensity Pro)

  • Video: Mi Box S → 40281 (HDMI) → Intensity Pro (HDMI)
  • Audio: Mi Box S → 40281 (SPDIF) → AVR-4308 (5.1 through Pre Out) to U86XT (Line IN 1-6)
  • Make sure you connect the U86XT through a Ground Loop Isolator to the AVR to avoid ground loop issues while recording
  • Set the AVR-4308 to volume -10 dB

VHS Stereo (Intensity Pro)

  • Video: HR-S6711EU (composite) → Intensity Pro (Y - green)
  • Audio: HR-S6711EU (stereo) → Intensity Pro (RCA)
  • Audio monitor: HR-S6711EU (stereo) → AVR-4308

OBS Studio

Settings

  • Output
    Hint: Chose Simple or Advanced, not both, then save. Simple is good for lossless recording of both video and audio. Advanced is only necessary for some special use cases.
    • Output Mode: Simple
      • Recording Path
      • Recording Quality: Lossless Quality
    • Output Mode: Advanced
      • Type: Custom Output (FFmpeg)
      • File path or URL
      • Container Format: matroska
      • Audio Bitrate: 256 Kbps
      • Audio Track: 1
      • Audio Encoder: pcm_s16le
  • Audio
    • Sample Rate: 48 kHz
    • Channels: 5.1 or Stereo
  • Video
    • Base (Canvas) Resolution: 1920×1080
    • Output (Scaled) Resolution: 1920×1080
    • Downscale Filter: [no downscaling required]
    • Common FPS Values: 60

Properties Intensity Pro 4K

  • Video Connection: HDMI
  • Audio Connection: Analog RCA (we do not record the audio stream)

Properties ESI U86 XT

  • Device: U86 Multichannel 8 (ESI Audio Device (WDM) - U86)
  • Advanced Audio Properties - Sync Offset: -120ms
  • Advanced Audio Properties - Tracks: 1

Filters

  • Limiter: Threshold -1.00 dB, Release 60 ms

Deinterlacing

  • Disable

HandBrakeCLI

Player Apps

In general, I recommend to set the Android TV Box to Do not auto-update apps in Google Play Store. I will explain below in the app sections.

Max

  1. The Max app does not run smoothly on Xiaomi Mi Box S, but does so on Mecool KM9 Pro
  2. Install app version 5.11.0. This app version remembers your choice of displaying the full end credits without popping up choices of other movies, app version 5.12.0 (and probably later versions) do not remember your choice. I assume this was a bug in version 5.11.0 and I did not check whether older versions show the same behavior.
  3. How to handle the end credits:
    1. When the end credits start the app will display a choice of other movies
    2. Press OK on the remote to bring back the end credits screen
    3. Press LEFT to go back to a marker position in the movie before the display of choice of other movies shows up, then BACK to remove the status bar at the bottom
    4. This time the end credits show through without display of choice of other movies
    5. Use HandBrakeCLI to cut 2 parts of the movie including audio

How Tos