IT Blog

Quick solutions from me

Author: david

3in1: PC to Xbox1 to analog 5.1 dolby surround

A couple days ago I was working with an Xbox One, and faced some problems with the audio output. As this was the first time I used an Xbox, I was not familiar with the system, but turned out many people has similar issues, so here is a summary. My configuration is the following:

  • Xbox One (HDMI Out, separate audio out with optic only)
  • An old TV with only DVI input (no HDMI), connected to the X1 with an HDMI –> DVI cable.
  • 5.1 sound system with only analog input (RCA), AC3/Dolby Surround support
  • Laptop with HDMI out, connected to X1’s HDMI in via simple HDMI cable.

Problem 1: No sound from Xbox

The first problem I had, I was unable to connect my audio system with Xbox at al: The Xbox had optic out only, and the HDMI –> DVI does not transmit audio (in this case). The solution was to convert the Optic out (X1) to RCA input (5.1 system). This is not a simple thing, as optic is a digital signal, while RCA is analog, so I needed an Digital-Analog converter (DAC). I went to ebay and ordered something like this (using the keywords: “optic to rca surround”).

DAC

Note: I also needed an Optic cable, and 3 pairs of RCA (depends on the input of the audio system, mine had 6 RCA input).

I connected the optic to X1 – DAC, and RCA cables to DAC – Sound system. Okay, how to test it? I found a link across the forums, that plays this video:

5.1 Surround Sound AAC Test.mp4

I used Edge on X1 to test it. Before it was working properly, I had to check these options: Xbox button, Gear icon, Settings, Display & Sound…

  • Audio output:
    • Optical audio: Bitstream out
    • Bitstream format: Dolby Digital
    • Headset format: Stereo uncompressed
  • Volume / Set up TV & A/V control: Audio: Surround sound

After these options were set up, I got surround directly from the browser (and I also used VLC from the Microsoft store, which also worked).

Problem 2: Displaying PC screen on X1

To get surround sound out of my Laptop, I had to connect it to the X1, as the laptop does not have optic or RCA out, only the HDMI (or a stereo jack, which would down mix it to stereo). Of course, an external 5.1 audio card would be also a working solution, but hey, we already have the X1 connected to the surround.

This issue was not that complex, but for me it was not still trivial. To get it working, I connected the HDMI cable between the PC and X1, and found that the Laptop does not find any output devices. Turned out this is normal, as X1 only enabled the input port when you configured it. You have to open the “OneGuide” app on X1, and go through the Wizard. During the steps, your laptop should recognize the output device.

Any time you want to see your HDMI input screen on the X1, you’ll have to launch this app. Let’s check the audio configration…

Problem 3: PC – X1 – 5.1 surround audio

I opened up the sound manager (On Win10: Right click on the sound icon, Open Sound Settings, Sound control panel), selected the Xbox One playback device, and clicked on Configure: Boom, stereo only.

I also noticed, there is a “Dolby surround item” under Properties / Supported Formats. This is important.

After a couple Google searches, I found two threads (1, 2) that helped me in sorting this out:

The PC will use the Stereo output to pass Encoded Dolby Digital 5.1 surround signal to X1, which will pass it through to our DAC, which will decode it to RCA channels.

Based on this, you won’t see 5.1 channels in the sound manager, but you will get surround sound if the source supports Dolby Digital surround.

I figured out that most of the applications works out of the box (like Windows Media Player and Chrome – listening to the video above), but I played around with VLC player to be sure it’s true Dolby Digital:

VLC Audio configuration (from Hungary – sorry)

This configiration would force the audio output to Dolby Surround, but it probably works without changing anything. A note here: If I enabled S/PDIF support enforcement, the surround sound did not work anymore.

So after the above, I was able to get 5.1 sound out of my laptop through HDMI cable, Xbox one, and a Digital Analog Converter, all the way to an older RCA-in-only 5.1 Dolby Digital Surround home theater.

Passman extension: 401 Unauthorized – Basic HTTP auth not working

I was looking for a self hosted password management solution, and decided to to use Passman, which is:

  • An extension (app) for OwnCloud / Next Cloud
  • Can be used to store your passwords securely
  • Open source, and can be installed on your own environment (on top of OwnCloud or Next Cloud)
  • Has browser extension (for Chrome and Firefox) for automatic password fill

So I installed a copy of OwnCloud (v10.0.10) to a shared cPanel hosting, and tried to use the Passman App in it. The process all went okay, I also downloaded the Passman extension for Chrome. After the extension installation, the first step is to fill the server URL, and your username + password. After I filled the forms, I received

[401] Unauthorized

After I enabled the logging (OwnCloud admin panel, Administration / General, bottom section), I saw the following messages:

{"reqId":"...","level":0,"time":"2019-01-12T20:20:12+00:00","remoteAddr":"...","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::getToken","method":"GET","url":"\/index.php\/apps\/passman\/api\/v2\/vaults","message":"token ... does not exist"}
{"reqId":"...","level":0,"time":"2019-01-12T20:20:12+00:00","remoteAddr":"...","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::getToken","method":"GET","url":"\/index.php\/apps\/passman\/api\/v2\/vaults","message":"token ... does not exist"}
{"reqId":"...","level":0,"time":"2019-01-12T20:20:12+00:00","remoteAddr":"...","user":"--","app":"no app in context","method":"GET","url":"\/index.php\/apps\/passman\/api\/v2\/vaults","message":"Current user is not logged in"}

I made several Google searches, and found multiple issues could cause this problem (like this), but none of the fixes solved my problem.

So I took a look in extension’s requests, the source code, and found that the extension uses Basic HTTP Authentication. I tracked the problem to the auth() function in the lib\private\User\BasicAuthModule.php file: The $request->server[‘PHP_AUTH_USER’], $request->server[‘PHP_AUTH_PW’] variables were empty. These values should be filled automatically by the webserver/PHP based on the “Authorization” header, so I checked, and the header was not present. Google lead me to a stack overflow issue: somehow the Authorization Header was lost. After I added the recommended three lines to the Owncloud .htaccess file, the plugin started working:

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

As I said, there can be many things that cause the same problem, but If you tried every other solution, go and check if the PHP Basic Auth variables are correctly set.

© 2020 IT Blog

Theme by Anders NorenUp ↑