# FreeBSD Screen Casting



## Deleted member 48958 (Apr 24, 2018)

Found very nice app, that is possible to use with FreeBSD,
it is a X11 screencasting tool, it supports GIF/APNG/WebM and MP4 formats,
it is very handy and easy to use. It is named as peek - https://github.com/phw/peek






To build and install it, install build and run dependencies:
`# pkg ins cmake dri3proto txt2man gawk gettext intltool keybinder-gtk3 libsigsegv libuv rhash xml2`
Then get its source code, build and install it:
`# git clone https://github.com/phw/peek.git`
`# mkdir peek/build`
`# cd peek/build`
`# cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..`
`# make install`

*Warining*: To make peek work, multimedia/ffmpeg should be rebuild wit "XCB" option on,
otherwise peek won't be able to capture the screen.





Here is GIF recording, that was made using peek.





Maybe one day, when I'll have some time, I'll try to port it. But feel free to do it first 
Because while I already have one port, I forgot how to port software, because
my first and only port was submitted in 2016, so I do not remember almost anything
about FreeBSD software porting. Also I have no idea how to add ffmpeg "XCB" option
as a peek dependency (maybe it is not bad idea to create pkg-message with info about ffmpeg in it?).


----------



## aragats (Apr 24, 2018)

Thanks, ILUXA !

I use a simple script to capture screen with the same *x11grab* option of `ffmpeg`:

```
#!/usr/local/bin/bash

FNAMEBASE=/tmp/out
SELECTED=`import -verbose $FNAMEBASE.png 2>&1`
DIM=`echo $SELECTED | cut -d' ' -f3`
OFFS=`echo $SELECTED | sed 's/.*[0-9]*x[0-9]*\(+[0-9]*\)+\([0-9]*\).*/\1,\2/'`

ffmpeg -video_size $DIM -framerate 18 -f x11grab -i :0$OFFS -preset ultrafast -qp 0 -y $FNAMEBASE.mp4
```
It depends on `import` from graphics/ImageMagick (I need it anyway). However, the coordinates for the captured area can be entered manually instead.


----------



## Deleted member 48958 (Apr 24, 2018)

Anyway it is much more easy to use such app, than to calculate window position every time.
BTW, *to record terminal sessions* in GIF format, also it is possible to use misc/ttyrec with graphics/ttygif,
all my terminal sessions in GIF, that were posted on these forums, were created using these applications.


----------



## aragats (Apr 24, 2018)

ILUXA said:


> it is much more easy to use such app, than to calculate window position every time


Agree, however, `import` does it for you too! It shows crosshair and let you select the area to capture. As a side affect, it creates a png file from it.


----------



## slackz (Jun 3, 2018)

Hey all!  this is actually my first comment on the forums, though I have been browsing them plenty recently (reading through handbook, faqs, and the many fantastic resources available throughout the FreeBSD and wider BSD community).  So excited to be using it as my primary desktop OS now and just stumbled upon this thread when looking for screenrecording options.

Just wanted to add that simplescreenrecorder exists as a FreeBSD package and it works beautifully.
I am running 11.2-RC1 (necessary for my graphics card); but looking through ports commit history, looks like it was added in November of 2017.  Thanks yuri for your work on that!

Here's the website:
http://www.maartenbaert.be/simplescreenrecorder/
and github repo:
https://github.com/MaartenBaert/ssr

The version on the FreeBSD package (as of 11.2-RC1) is 0.3.10, which is nicely up to date with latest


----------

