v2: scrcpy is a much better option than using ApowerMirror but I'm leaving the old tutorial here (in strikethrough) just in case someone else wants it, as ApowerMirror offers many more features than simply mirroring the display.
I've been looking for a way to stream mobile games in decent quality/audio for a while now, and Android Pie doesn't seem to make this task easier. This was done on a OnePlus 7 Pro, but I don't see any reason why this wouldn't work on any other phone.
You don't need root to use this method, but you do need a PC.
Okay, I know people don't like extremely lengthy posts/videos, so I'm going to make this as fast as possible. Requirements:
- Streamlabs OBS or OBS
ApowerMirror (Both Desktop / Google Play App)
- Minimal ADB and Fastboot
- Aux Cable (or USB-C to 3.5mm adapter)
- Enable USB Debugging. (Go to About Phone, tap "Build Number" 5 times to enable Developer Options -- USB Debugging is located here, enable it) If enabled correctly, you should receive a prompt about your PC's fingerprint, accept it.
- Optional, but works best with a headset that can accept more than one input (Like the Logitech G933)
- Download your choice of OBS.
- Download scrcpy from GitHub.
Download ApowerMirror for Desktop
Install ApowerMirror for Mobile from the Google Play Store
After you install Minimal ADB and Fastboot, head to its installation directory (should be C:\Program Files (x86)\Minimal ADB and Fastboot) and extract the entirety of the scrcpy archive to the directory, overwriting files.
From here if you want a simple plug and go experience, you can just run the scrcpy.exe file and you should see your screen mirrored.
If you want to customize some of the settings, open Minimal ADB and Fastboot and you can run adb/scrcpy/fastboot commands from the CMD window that pops up. More information on all of the available options such as quality, resolution, as well as how to connect wirelessly can be found here Mirroring Audio:
Most, if not all desktops have at least two audio ports. One for microphone and one for speakers. If you're on a computer that does not have these split (i.e. a laptop with one 3.5mm jack), I would recommend either getting a splitter or an external sound card.
As for mirroring the audio, use an aux cable to connect your phone to the microphone port on your PC, and open the Sound Control Panel, Recording tab, right click your microphone and open Properties and "Listen to this device" on your playback device of choice.
At this point you should be able to hear the sounds of your device coming from your PC speakers/headphones as well as OBS picking up your device audio. I would recommend changing the default mic in OBS or muting it.
(The reason I recommended having a headset with more than one input for audio is for the ability to isolate your device's audio to one playback device, that way OBS will only pick up your device's audio, not the audio from your desktop + device.) Streaming/Recording:
Add a new source by clicking the + icon in OBS and select Game or Window Capture (I think Game Capture is smoother). Select the [scrcpy.exe] window and you should see your device, thus, your game appear in OBS now. From here, you can setup OBS to stream to your favorite platform or record in high quality.
I would also recommend to enable "Show Taps" to show any viewers what exactly you're doing. You can enable this by going to Developer Options, scroll down, and enable "Show Taps". Video Tutorial Full Twitch VOD of Test Streaming
Connecting ApowerMirror: Setting up mirroring through ApowerMirror is simple. Within the settings menu of the mobile app lies all of the quality settings you could ask for (I personally use 1440p on max definition, and "Quality Priority" for mirroring mode, HQ makes the mirroring lag hard) The Desktop app does not really have many settings to configure, the only one I'd recommend changing is the FPS to 60FPS. Whether it is through Wi-Fi or USB, connecting through the app is easy, just click the "M" icon at the bottom, it will connect automatically through USB, but initiate a search on Wi-Fi. After it finds your PC, select it and select Phone Mirror. At this point you should already see your phone screen mirrored in ApowerMirror.