question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Try to get version 2 to run

See original GitHub issue

I’ve taken the following steps:

With UnicornFFMPEG I generated the Plex transcoder and swapped it with the original, deleting “Plex Relay” as well. In it I define the UnicornLoadBalancer URL like e.g. https://domain.com/.

Then I install the UnicornLoadBalancer and change the following values in src/config.js:

SERVER_PUBLIC to https://domain.com/ I leave DATABASE_MODE on sqlite.

Then I create iptable entries to block port 32400:

sudo iptables -A INPUT -p tcp --dport 32400 -i eth0 -s XX.XX.XX.XX -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 32400 -i eth0 -j DROP

And then we come to the UnicornTranscoder, first I install it well-behaved with “npm install”, set the LOADBALANCER_ADDRESS to “https://domain.com” and the INSTANCE_ADDRESS to “https://transcoder.domain.com” everything else I leave on default.

The UnicornLoadBalancer domain was still stored at Plex in the network tab with “https://domain.com”.

Now I am not redirected to the transcoder via 302, port 32400 is somehow not blocked, and I get the following in the log of the UnicornLoadBalancer:

npm start

> unicorn-load-balancer@2.0.0 start /home/plex/LoadBalancer
> node index.js

FFMPEG CALLED 1
FFMPEG CALLED 2
FFMPEG ade7bblx2v4zv05hi1vz4lk9 { args:
   [ '-codec:0',
     'h264',
     '-codec:1',
     'dca',
     '-ss',
     '0',
     '-noaccurate_seek',
     '-probesize',
     '10000000',
     '-i',
     'https://domain.com/library/parts/3/0/file.stream?download=1',
     '-filter_complex',
     '[0:1] aresample=async=1:ocl=\'stereo\':osr=48000[0]',
     '-map',
     '0:0',
     '-metadata:s:0',
     'language=eng',
     '-codec:0',
     'copy',
     '-map',
     '[0]',
     '-metadata:s:1',
     'language=ger',
     '-codec:1',
     'aac',
     '-b:1',
     '256k',
     '-f',
     'dash',
     '-min_seg_duration',
     '5000000',
     '-skip_to_segment',
     '1',
     '-time_delta',
     '0.0625',
     '-manifest_name',
     '{INTERNAL_TRANSCODER}video/:/transcode/session/ade7bblx2v4zv05hi1vz4lk9/79082013-1fb8-463c-943a-aa48e4054e06/manifest',
     '-avoid_negative_ts',
     'disabled',
     '-map_metadata',
     '-1',
     '-map_chapters',
     '-1',
     'dash',
     '-start_at_zero',
     '-copyts',
     '-vsync',
     'cfr',
     '-y',
     '-nostats',
     '-loglevel',
     'quiet',
     '-loglevel_plex',
     'error',
     '-progressurl',
     '{INTERNAL_TRANSCODER}video/:/transcode/session/ade7bblx2v4zv05hi1vz4lk9/79082013-1fb8-463c-943a-aa48e4054e06/progress' ],
  env:
   { EAE_ROOT: '/tmp/pms-54915d4a-3244-4cfd-bd35-cdd4b37c4168/EasyAudioEncoder',
     FFMPEG_EXTERNAL_LIBS: '/var/lib/plexmediaserver/Library/Application\\ Support/Plex\\ Media\\ Server/Codecs/531e313-1328-linux-ubuntu-x86_64/',
     HOME: '/home/plex',
     INVOCATION_ID: '0ebca021523440f18137a12804d1f9d0',
     JOURNAL_STREAM: '9:49159',
     LANG: 'en_US.UTF-8',
     LD_LIBRARY_PATH: '/usr/lib/plexmediaserver',
     LIBVA_DRIVERS_PATH: '/usr/lib/plexmediaserver/dri',
     LOGNAME: 'plex',
     PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
     PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR: '/var/lib/plexmediaserver/Library/Application Support',
     PLEX_MEDIA_SERVER_HOME: '/usr/lib/plexmediaserver',
     PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS: '6',
     PLEX_MEDIA_SERVER_TMPDIR: '/tmp',
     PWD: '/',
     SHELL: '/bin/bash',
     USER: 'plex',
     XDG_CACHE_HOME: '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache',
     XDG_DATA_HOME: '/usr/lib/plexmediaserver/Resources',
     X_PLEX_TOKEN: 'XXXXXXXXXXXXXXXX' },
  session: 'ade7bblx2v4zv05hi1vz4lk9',
  sessionFull: 'ade7bblx2v4zv05hi1vz4lk9/79082013-1fb8-463c-943a-aa48e4054e06' }

Now the question is, what did I do wrong? Unfortunately I can’t get any further.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Maxou44commented, Feb 26, 2019

Unfortunately it don’t work at the moment, I hope it will be supported soon (after Plex 1.15 compatibility).

Unsupported features:

  • Sync
  • Media optimization
  • Auto quality
  • Music transcode
0reactions
cruex-decommented, Feb 26, 2019

Sorry last question:

Does synchronization work in apps? 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install Linux on Windows with WSL - Microsoft Learn
To set the default version to WSL 1 or WSL 2 when a new Linux distribution is installed, use the command: wsl --set-default-version...
Read more >
How to get version number for any installed program using cmd?
The first of all, you need to get the path of the .exe file of the application. You can use wmic to get...
Read more >
How to Upgrade to Bundler 2
If you want to try out Bundler 2 for yourself, this guide will help you do that. ... You can check your Ruby...
Read more >
Overwatch 2's 'Different Version' Error Is Actually Easy To Solve
If you've gotten the 'different version' error while trying to invite your friends, there's a workaround for that.
Read more >
WSL: Am I running version 1 or version 2? - Ask Ubuntu
At a Windows 10 command prompt, run ver . Is the next-to-last numeric group version 18917 or higher? If so, it is possible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found