eyal360
Posts: 18
Joined: Fri Nov 18, 2016 9:57 am

Screen recording on Pi

Mon Feb 13, 2017 4:34 pm

is there any way to screen record what I am doing on my RaspberryPi3 ? , I have used RecordMyDesktop, Kazam, Vokoscreen none of them work properly.. Maybe it has something to do with the ARM processor..

RecordMydesktop is the only one that works but it shows me the recording in pink .. I have no idea why and I didnt mess with the configurations, the other ones just dont work or get stuck in the middle of the recording..

Any suggestions? desperate here.

omenie
Posts: 98
Joined: Fri Dec 09, 2011 5:09 pm
Contact: Website

Re: Screen recording on Pi

Tue Feb 14, 2017 9:41 am

It's not the most straightforward programming exercise, effectively boiling down to the work I did to support Minecraft over RealVNC last year - you need to collapse / composite the frame buffers into a single buffer then pass that into an encoder. For RealVNC that was a frame by frame JPG encoder but you will need to use an h.264 encoder for video. And yiu will need to GPU accelerate it for performance. As I said, not the most straightforward piece of coding, but doable. The Foundation really should fund this as a development, it would be generally extremely useful to capture audio and video from the Pi as videos for YouTube upload, the educational uses are huge.

mattmiller
Posts: 2247
Joined: Thu Feb 05, 2015 11:25 pm

Re: Screen recording on Pi

Tue Feb 14, 2017 9:45 am

You could VNC into your Pi from a PC/Mac, if you have one, and record the screen on them instead as a temp solution

eyal360
Posts: 18
Joined: Fri Nov 18, 2016 9:57 am

Re: Screen recording on Pi

Tue Feb 14, 2017 10:20 am

mattmiller wrote:You could VNC into your Pi from a PC/Mac, if you have one, and record the screen on them instead as a temp solution
throughout my recording I will disconnect from the internet so thats not an option.

mattmiller
Posts: 2247
Joined: Thu Feb 05, 2015 11:25 pm

Re: Screen recording on Pi

Wed Feb 15, 2017 10:53 pm

OK - then _ ive managed to get something

Code: Select all

ffmpeg -f x11grab -r 30 -s cif -i :0.0 /tmp/out.mpg
seems to grab part of the screen but the problem is that ffmpeg is not currently part of Raspbian JEssie

So you have to go thru these hoops from

Code: Select all

git clone --depth 1 git://git.videolan.org/x264
cd x264
./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
make -j4
sudo make install

sudo apt-get install libxfixes-dev

# build and make ffmpeg
git clone --depth=1 git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree -- enable-x11grab
make -j4
sudo make install
(It takes about 30 mins altogether)

I think these are all the steps needed (they are a summary of the trial and error I went thru myself!)

I've not bothered try to work out how to get a bigger screen capture but I'm sure that bit is trivial - once you've worked it out - come back and tell us what you did :)

Refs: http://hannes.enjoys.it/blog/2016/03/ff ... pberry-pi/
and
https://soledadpenades.com/2010/04/26/u ... ab-ubuntu/

fruitoftheloom
Posts: 26288
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Screen recording on Pi

Thu Feb 16, 2017 12:35 am

FYI ffmpeg has been replaced by libav-tools in Raspbian Jessie

https://wiki.debian.org/ffmpeg
The information is out there....you just have to let it in.

My other Linux machines: ChromeBox
https://www.aliexpress.com/item/32966393971.html
& Stone Desktop Intel CoreDuo circa 2010

tvjon
Posts: 810
Joined: Mon Jan 07, 2013 9:11 am

Re: Screen recording on Pi

Thu Feb 16, 2017 8:55 am

Yes indeed, so instead of ffmpeg, avconv. so no need to build or install anything probably.

@OP,

You may find something like this is worth experimenting with?


avconv -f x11grab -r 25 -s 1920x1080 -i :0.0+0,0 -vcodec libx264 video.mkv

To play the clip back:

omxplayer video.mkv

or

mplayer video.mkv


HTH

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 28371
Joined: Sat Jul 30, 2011 7:41 pm

Re: Screen recording on Pi

Thu Feb 16, 2017 9:40 am

AFAIK, avconv is installed by default, if not

sudo apt-get install avconv

should get it. Unless you want the very latest bleeding edge version, that should be fine.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

mattmiller
Posts: 2247
Joined: Thu Feb 05, 2015 11:25 pm

Re: Screen recording on Pi

Thu Feb 16, 2017 10:39 am

JFEI - the circle is swinging back to round to ffmpeg (just not there yet) which is why I went with it instead of avconv (since neither were installed on my Pi or available using apt-get )

tvjon
Posts: 810
Joined: Mon Jan 07, 2013 9:11 am

Re: Screen recording on Pi

Thu Feb 16, 2017 11:24 am

Correct, there is no "avconv" install.

Should avconv be absent,

sudo apt-get install libav-tools

will install it, along with other maybe-useful tools.

For the OP's application, in fact,

avplay

may be better for playing back the recording than the 2 app's I mentioned.

bkelly212
Posts: 17
Joined: Fri Feb 17, 2017 8:26 pm

Re: Screen recording on Pi

Tue May 02, 2017 3:32 pm

Hello, for starters this thread has been helpful in getting avconv working for me, but I have a question/problem. I am trying to get a screenshot of what is on my HDMI touchscreen running from my rPi 3B. A video would suffice as I could then take a still on my computer. I cannot find any program that will take a shot of what is displayed there. Scrot takes a pictures of whats running in the background (I believe the program is using the frame buffer to send the images) and nothing I can find will work. Does anyone know of a program to do so or how I can change the selected display that avconv uses?
Thanks!!

runboy93
Posts: 352
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland
Contact: Website

Re: Screen recording on Pi

Tue May 02, 2017 4:15 pm

So avconv is best option for RPi? Anyone have test videos recorded by it?

tvjon
Posts: 810
Joined: Mon Jan 07, 2013 9:11 am

Re: Screen recording on Pi

Wed May 03, 2017 6:04 pm

bkelly212 wrote:... I am trying to get a screenshot of what is on my HDMI touchscreen running from my rPi 3B. ... I cannot find any program that will take a shot of what is displayed there. Scrot takes a pictures of whats running in the background (I believe the program is using the frame buffer to send the images) and nothing I can find will work. Does anyone know of a program to do so?
Thanks!!
This:

https://github.com/AndrewFromMelbourne/raspi2png

works fine for screenshots, & as you can specify which display you want a screenshot from (for example I have an additional screen connected to the DPI/VGA pins on RPi) it works for both HDMI/ DPI.

Piman2009
Posts: 1
Joined: Thu Jan 03, 2019 10:46 am

Re: Screen recording on Pi

Thu Jan 03, 2019 10:58 am

how do I record minecraft pi im struggling to find recording software for it thanks guys :)
:(

Jayaramachandran
Posts: 1
Joined: Thu Mar 14, 2019 3:35 am

Re: Screen recording on Pi

Thu Mar 14, 2019 4:17 am

This can be done with recordmydesktop option

Refer this video

https://www.youtube.com/watch?v=EoLLQmp ... dex=9&t=0s

juliagorman
Posts: 2
Joined: Thu Jun 06, 2019 8:49 pm

Re: Screen recording on Pi

Thu Jun 06, 2019 8:55 pm

how do i retrieve my files from recordmydesktop onto VLC. Where did they even go once I finished in LINUX

raddub15
Posts: 2
Joined: Tue Jan 28, 2020 7:50 pm

Re: Screen recording on Pi

Wed Jun 03, 2020 8:38 pm

WHAT... recordmydesktop uses only 1 core???
This app is like, so badly optimized... But at least it works, however it takes forever to process a 2 minute video on 1080p, 15fps...

Is there any lightweight alternatives? Which are optimized for Raspberry Pi (4) ?

carlrowan
Posts: 5
Joined: Sun Jan 06, 2019 4:31 pm

Re: Screen recording on Pi

Mon Jan 04, 2021 4:38 pm

For my raspberry pi 4, what only works seamlessly is simplescreenrecorder. I've tried Kazam, VLC and recordmydesktop but didn't work well or not at all. Check out my evaluation and installation of all four https://youtu.be/JIgwx07t3dY

Return to “Graphics, sound and multimedia”