UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UT Video recorder

    Scheduled Pinned Locked Moved App Development
    7 Posts 5 Posters 1.1k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • lduboeufL Offline
        lduboeuf
        last edited by

        hi,
        anyone developing a screen video recorder ?.
        I think would be great to share experiences, improvements of UT etc... to the world

        Difficult to do ?

        1 Reply Last reply Reply Quote 1
        • J Offline
          joe
          last edited by

          Coincidentally, @Amolith just taught me this today:

          1. Connect device to computer with USB cable (make sure it's in developer mode: Settings --> About --> Developer Mode)
          2. Open terminal on computer
          3. adb exec-out timeout 120 mirscreencast -m /run/mir_socket --stdout --cap-interval 2 -s 384 640 | tee ubuntu_touch.raw
          4. Then you can convert the raw file into an mp4:
            ffmpeg -f rawvideo -pix_fmt rgba -s:v 384x640 -i ubuntu_touch.raw -filter:v "setpts=2*PTS" ubuntu_touch.mp4
          1 Reply Last reply Reply Quote 1
          • lduboeufL Offline
            lduboeuf
            last edited by

            yes, thank you, i already know this. But i'm looking for an app on UT without the need of a another computer

            1 Reply Last reply Reply Quote 2
            • jezekJ Online
              jezek
              last edited by

              On your phone you can do this via terminal (I used ssh).

              Open terminal app, change to Video folder, capture raw video to file.
              eg. to use the command from post above:

              $ cd ~/Videos
              $ mirscreencast -m /run/mir_socket --cap-interval 2 -s 384 640 -f screencast.rgba
              

              Note: use Ctrl+C to cancel screencast recording, or just use the timeout to capture exact duration. Also it helps to see mircast --help to see the params meanings.

              Then you need ffmpeg command. You can install it into libertine container. (mine default is xenial)

              $ libertine-container-manager install-package -p ffmpeg
              

              after ffmpeg installed you can use it inside Video folder (also inside Documents, Downloads, Music and Pictures folders) using libertine. So to encode saved screencast.rgba to mp4 using params as in post above:

              $ libertine-launch --id xenial ffmpeg -f rawvideo -pix_fmt rgba -s:v 384x640 -i screencast.rgba -filter:v "setpts=2*PTS" screencast.mp4
              

              Note: we are still in the ~/Video directory with screencast.rgba file.

              Now you should see the screencast.mp4. I can play it on my computer, but on the phone there is some error.

              I tried to pipe the mirscreencast command to ffmpeg directly, but it didn't work 😞 maybe libertine-launch don't support stdin input.

              $ # not working
              $ mirscreencast -m /run/mir_socket --cap-interval 2 -s 384 640 --stdout | libertine-launch --id xenial ffmpeg -i - -f rawvideo -pix_fmt rgba -s:v 384x640 -filter:v "setpts=2*PTS" newscreen.mp4
              
              

              jEzEk

              1 Reply Last reply Reply Quote 1
              • bhdouglassB Offline
                bhdouglass
                last edited by

                @darkeye (I assume I'm tagging the right username) was working on an app a while back: https://github.com/dark-eye/miracast

                open-store.io && bhdouglass.com

                lduboeufL 1 Reply Last reply Reply Quote 0
                • lduboeufL Offline
                  lduboeuf @bhdouglass
                  last edited by

                  @bhdouglass ok thank you, i see it is another example with a connected PC.
                  Now, maybe recording directly to the device would be probably a performance killer .

                  1 Reply Last reply Reply Quote 0
                  • gimenezG Offline
                    gimenez
                    last edited by

                    Would this work to cast the desktop screen during convergence ?

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post