Parsing adb ouput into values to show currently playing youtube video on Fire TV

I’m running adb command ‘dumpsys media_content’. It’s showing what’s currently playing.

adb_response: >-
  MEDIA SESSION SERVICE (dumpsys media_session)


  5 sessions listeners.

  3 Sessions:

  spotify-android-tv-media-session
  com.spotify.tv.android/spotify-android-tv-media-session (uid=0)
    ownerPid=5903, ownerUid=10139, userId=0
    package=com.spotify.tv.android
    launchIntent=null
    mediaButtonReceiver=PendingIntent{9684307: PendingIntentRecord{43adc34 com.spotify.tv.android broadcastIntent}}
    active=false
    flags=3
    rating type=0
    controllers: 1
    state=PlaybackState {state=0, position=0, buffered position=0, speed=1.0, updated=129940, actions=2368383, custom actions=[], active item id=-1, error=null}
    audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
    volumeType=1, controlType=2, max=0, current=0
    metadata:size=0, description=null
    queueTitle=null, size=0

  Netflix media session com.netflix.ninja/Netflix media session (uid=0)
    ownerPid=10305, ownerUid=10137, userId=0
    package=com.netflix.ninja
    launchIntent=null
    mediaButtonReceiver=null
    active=false
    flags=3
    rating type=0
    controllers: 0
    state=PlaybackState {state=1, position=0, buffered position=0, speed=1.0, updated=210912228, actions=1049468, custom actions=[], active item id=-1, error=null}
    audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
    volumeType=1, controlType=2, max=0, current=0
    metadata:size=0, description=null
    queueTitle=null, size=0

  com.liskovsoft.smarttubetv.beta
  com.liskovsoft.smarttubetv.beta/com.liskovsoft.smarttubetv.beta (uid=0)
    ownerPid=25955, ownerUid=10155, userId=0
    package=com.liskovsoft.smarttubetv.beta
    launchIntent=null
    mediaButtonReceiver=null
    active=true
    flags=3
    rating type=0
    controllers: 1
    state=PlaybackState {state=3, position=0, buffered position=9333, speed=1.0, updated=211240137, actions=2360191, custom actions=[], active item id=0, error=null}
    audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
    volumeType=1, controlType=2, max=0, current=0
    metadata:size=6, description=Bored of Minecraft? Try this Challenge!, Call Me Kevin • 534K views • 4 weeks ago, null
    queueTitle=null, size=0

  Global priority session is null

  Sessions Stack - have 3 sessions:
    com.liskovsoft.smarttubetv.beta com.liskovsoft.smarttubetv.beta/com.liskovsoft.smarttubetv.beta (uid=0)
      ownerPid=25955, ownerUid=10155, userId=0
      package=com.liskovsoft.smarttubetv.beta
      launchIntent=null
      mediaButtonReceiver=null
      active=true
      flags=3
      rating type=0
      controllers: 1
      state=PlaybackState {state=3, position=0, buffered position=9333, speed=1.0, updated=211240137, actions=2360191, custom actions=[], active item id=0, error=null}
      audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
      volumeType=1, controlType=2, max=0, current=0
      metadata:size=6, description=Bored of Minecraft? Try this Challenge!, Call Me Kevin • 534K views • 4 weeks ago, null
      queueTitle=null, size=0

    Netflix media session com.netflix.ninja/Netflix media session (uid=0)
      ownerPid=10305, ownerUid=10137, userId=0
      package=com.netflix.ninja
      launchIntent=null
      mediaButtonReceiver=null
      active=false
      flags=3
      rating type=0
      controllers: 0
      state=PlaybackState {state=1, position=0, buffered position=0, speed=1.0, updated=210912228, actions=1049468, custom actions=[], active item id=-1, error=null}
      audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
      volumeType=1, controlType=2, max=0, current=0
      metadata:size=0, description=null
      queueTitle=null, size=0

    spotify-android-tv-media-session com.spotify.tv.android/spotify-android-tv-media-session (uid=0)
      ownerPid=5903, ownerUid=10139, userId=0
      package=com.spotify.tv.android
      launchIntent=null
      mediaButtonReceiver=PendingIntent{9684307: PendingIntentRecord{43adc34 com.spotify.tv.android broadcastIntent}}
      active=false
      flags=3
      rating type=0
      controllers: 1
      state=PlaybackState {state=0, position=0, buffered position=0, speed=1.0, updated=129940, actions=2368383, custom actions=[], active item id=-1, error=null}
      audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
      volumeType=1, controlType=2, max=0, current=0
      metadata:size=0, description=null
      queueTitle=null, size=0

  User Records:

  Record for user 0
    MediaButtonReceiver:null
    Restored ButtonReceiver:ComponentInfo{com.amazon.avod/com.amazon.avod.playbackclient.feature.audiofocus.AudioFocusManager$RemoteControlReceiver}
    3 Sessions:
    com.spotify.tv.android/spotify-android-tv-media-session (uid=0)
    com.netflix.ninja/Netflix media session (uid=0)
    com.liskovsoft.smarttubetv.beta/com.liskovsoft.smarttubetv.beta (uid=0)

I’m wanting to extract the description from the youtube app and split it into 2 values such as description: “Bored of Minecraft? Try this Challenge!”, Channel: “CallMeKevin”

com.liskovsoft.smarttubetv.beta com.liskovsoft.smarttubetv.beta/com.liskovsoft.smarttubetv.beta (uid=0)
      ownerPid=25955, ownerUid=10155, userId=0
      package=com.liskovsoft.smarttubetv.beta
      launchIntent=null
      mediaButtonReceiver=null
      active=true
      flags=3
      rating type=0
      controllers: 1
      state=PlaybackState {state=3, position=0, buffered position=9333, speed=1.0, updated=211240137, actions=2360191, custom actions=[], active item id=0, error=null}
      audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
      volumeType=1, controlType=2, max=0, current=0
      metadata:size=6, description=Bored of Minecraft? Try this Challenge!, Call Me Kevin • 534K views • 4 weeks ago, null
      queueTitle=null, size=0

I’m also open to other methods if there’s an easier way to get currently playing video from youtube app running on Fire Stick.