UT Video recorder
-
hi,
anyone developing a screen video recorder ?.
I think would be great to share experiences, improvements of UT etc... to the worldDifficult to do ?
-
Coincidentally, @Amolith just taught me this today:
- Connect device to computer with USB cable (make sure it's in developer mode: Settings --> About --> Developer Mode)
- Open terminal on computer
adb exec-out timeout 120 mirscreencast -m /run/mir_socket --stdout --cap-interval 2 -s 384 640 | tee ubuntu_touch.raw
- 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 seemircast --help
to see the params meanings.Then you need
ffmpeg
command. You can install it into libertine container. (mine default isxenial
)$ libertine-container-manager install-package -p ffmpeg
after
ffmpeg
installed you can use it insideVideo
folder (also insideDocuments
,Downloads
,Music
andPictures
folders) using libertine. So to encode savedscreencast.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 withscreencast.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 toffmpeg
directly, but it didn't work maybelibertine-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 . -
Would this work to cast the desktop screen during convergence ?