This post originated from an RSS feed registered with Web Buzz
by Stuart Langridge.
Original Post: Ubuntu phone screencasting, a minor tip
Feed Title: as days pass by
Feed URL: http://feeds.feedburner.com/kryogenix
Feed Description: scratched tallies on the prison wall
An Ubuntu phone has a command-line utility called mirscreencast which dumps screen frames to a file, meaning that in theory it’s possible to record a video of your phone’s screen. In practice, though, it doesn’t work for video; the phone is that busy (a) grabbing frames and (b) writing them to the phone’s storage that you can’t actually use it for jerkiness, and the resultant video includes about one frame in ten. I can’t fix this, but I did come up with a way to make it at least a bit better — instead of saving the video onto the phone’s storage, send it over the network to a real machine.
On your computer: nc -l -p 1234 > out, which uses netcat to listen to port 1234 and send everything that comes in there to a file named out.
On the phone: mirscreencast -n 600 -m /var/run/mir_socket -s 360 640 --stdout | nc mycomputer 1234, which uses mirscreencast to record frames (at a particular smaller size) and then send them with netcat to port 1234 on the computer. (You may need to put your computer’s IP address instead of mycomputer, especially since Ubuntu phone won’t resolve computername.local names.)
Then, once recording finishes, mencoder -demuxer rawvideo -rawvideo fps=6:w=360:h=640:format=bgra -ovc x264 -o out.mp4 out makes a proper mp4. (Cheers Bill for the mirscreencast info.)