UT Video recorder



  • 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 ?


  • Marketing

    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


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



  • 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
    
    


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



  • @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 .


Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.