Post ATxGZS4aUSAmmRqfDc by lauren@mastodon.laurenweinstein.org
 (DIR) More posts by lauren@mastodon.laurenweinstein.org
 (DIR) Post #ATxGZS4aUSAmmRqfDc by lauren@mastodon.laurenweinstein.org
       2023-03-24T18:23:01Z
       
       0 likes, 0 repeats
       
       **** scrcpy v2.0 ****The excellent open source tool to mirror Android screens and provide remote control of those devices from Linux, Windows, and macOS -- scrcpy -- now newly supports native audio streaming as well for recent Android versions. No need to use third-party audio workarounds any longer if you have a suitable device! Super! - https://github.com/Genymobile/scrcpy
       
 (DIR) Post #ATxggdQdGaC4pnFHZA by jmorris@mastodon.social
       2023-03-25T03:39:34Z
       
       0 likes, 0 repeats
       
       @lauren If I'm reading correctly, nothing permanent is installed on the Android device? I'll have to give it a try once I get my phone back from the shop.
       
 (DIR) Post #ATxhV85dXgmiPMVE24 by lauren@mastodon.laurenweinstein.org
       2023-03-25T03:48:45Z
       
       0 likes, 0 repeats
       
       @jmorris Yeah, it's really clever. It pushes some java code over to the device on each run, as an apk (even though it's not an actual android apk app -- but it's the zip container). That's the server end and then it communicates with the client via an adb tunnel. That's my understanding, anyway. I haven't looked at the code in detail.
       
 (DIR) Post #ATxhhpeFQ55kybkTk8 by lauren@mastodon.laurenweinstein.org
       2023-03-25T03:51:04Z
       
       0 likes, 0 repeats
       
       @jmorris The java code jar is actually deleted before the video even starts, then actually vanishes for real when the last process is gone. So nothing is left over.
       
 (DIR) Post #ATxhvdUbPVzrKZorYG by jmorris@mastodon.social
       2023-03-25T03:53:32Z
       
       0 likes, 0 repeats
       
       @lauren That's clever and it also sounds useful.
       
 (DIR) Post #ATyqUYu3SYOA1Wqiy8 by lauren@mastodon.laurenweinstein.org
       2023-03-25T17:04:12Z
       
       0 likes, 0 repeats
       
       BTW, this will work via USB or *wirelessly* on a LAN if your Android device supports wireless debugging. Very cool.
       
 (DIR) Post #AU30BRKDBeILBzRblo by jmorris@mastodon.social
       2023-03-27T17:10:49Z
       
       0 likes, 0 repeats
       
       @lauren I'm trying it now. The ability to copy/paste from the host to the phone is great.
       
 (DIR) Post #AU30QfIPWdlKrlrV1U by lauren@mastodon.laurenweinstein.org
       2023-03-27T17:14:23Z
       
       0 likes, 0 repeats
       
       @jmorris I'm currently using a 500ms buffer for both video and audio which smooths things out notably. I also have a little quick and dirty bash file I wrote to simplify startup of mirroring from my tablet or phone, which you're welcome to if you want it.
       
 (DIR) Post #AU32ioToJoPaTDyXqK by jmorris@mastodon.social
       2023-03-27T17:40:04Z
       
       0 likes, 0 repeats
       
       @lauren Yes, please. I tried it with 500ms buffers and also I needed to choose the aac audio codec to get it to play sound on the computer. This looks useful.
       
 (DIR) Post #AU32p0D5cPCcaZ6c5o by lauren@mastodon.laurenweinstein.org
       2023-03-27T17:41:14Z
       
       0 likes, 0 repeats
       
       @jmorris I haven't needed to switch from the default codec so far. I'll get that bash file for you.
       
 (DIR) Post #AU32vln3d5w5tS9kpM by jmorris@mastodon.social
       2023-03-27T17:42:24Z
       
       0 likes, 0 repeats
       
       @lauren Thanks for that and alerting me to this tool.
       
 (DIR) Post #AU350DUInD0ErWdEH2 by lauren@mastodon.laurenweinstein.org
       2023-03-27T18:05:38Z
       
       0 likes, 0 repeats
       
       @jmorris :## tlink[a]/plink[a]/tl[a]/pl[a] - Screen mirroring and control from Android#                          tablet or phone via scrcpy 2.0.##  If run with name ending in "a"#  stream audio also, otherwise video only.##  If run without port argument, will use#  the same port as previous run, if possible.### Lauren Weinstein: 1/18/23 -> 3/25/23# Update for scrcpy 2.0 audio and misc. cleanup#dbuff=500  # display buffer (set to 0 for none)drate=3M   # display bitrate (M or K)abuff=500  # audio buffer (set to 0 for none)tabletip="192.168.1.130" # tablet IP addressphoneip="192.168.1.131"  # phone IP addressname=`basename "$0"`if [ $# -eq 0 ]then    if [ -f "/tmp/tplink.port" ]     then       port=$(<"/tmp/tplink.port")       echo "Using port: $port"    else       echo "Usage: $name <port>"       exit 1    fielse    port=$1    echo $port > "/tmp/tplink.port"    echo "Using port: $port"fiif [[ $name == *"t"* ]]   # tlink/tl means tablet, plink/pl means phonethen   echo Tablet   ip=$tabletip   # use tablet IP addresselse   echo Phone   ip=$phoneip   # use phone IP addressfiecho "Using IP: $ip"if [[ $name == *"a"* ]]   # ending in "a" means stream audio alsothen    echo Streaming video and audio    scrcpy -b $drate --display-buffer $dbuff --audio-buffer $abuff --tcpip=$ip:$port else    echo Streaming video without audio    scrcpy -b $drate --display-buffer $dbuff --no-audio --tcpip=$ip:$port fiexit 0
       
 (DIR) Post #AU3577kkVqT96TcPKa by lauren@mastodon.laurenweinstein.org
       2023-03-27T18:06:54Z
       
       0 likes, 0 repeats
       
       @jmorris Here you go. You may have to fix some of the line breaks that Mastodon messed up.
       
 (DIR) Post #AU3ciCmk3yKLucq8ae by jmorris@mastodon.social
       2023-03-28T00:23:19Z
       
       0 likes, 0 repeats
       
       @lauren Thank you.