# Screen video capture/grabbing



## smooky (Mar 5, 2010)

Hi guys!

How can I record my screen and put to video file? I read some suggestion for
multimedia/recordmydesktop but it does nor work...

[cmd=]ffmpeg -r 60 -g 120 -s 1280x1024 -f x11grab -i :0.0+0,0 -vcodec qtrle -s 640x240 screencast.mov[/cmd] does not work too...

What's wrong?

*p.s. I'm using FreeBSD 8.0 KDE 4.3.5*

Thanks.


----------



## SirDice (Mar 5, 2010)

Sigh.. "does not work" doesn't tell us much. 
What doesn't work? Is there actually a file created? Wrong format? Black screen? What?


----------



## sixtydoses (Mar 5, 2010)

Am guessing that you've compiled multimedia/ffmpeg without 'X11GRAB' option checked.


----------



## graudeejs (Mar 5, 2010)

sixtydoses said:
			
		

> Am guessing that you've compiled multimedia/ffmpeg without 'X11GRAB' option checked.



yup, you're probably right, before i reinstalled ffmpeg with x11grab, it didn't work for me


----------



## smooky (Mar 6, 2010)

Aha! I'm sorry guys... recordmydesktop is console app and start capturing after launching immediately to /tmp by default... hehe... and filled my all free space...

but now i've try to reinstall ffmpeg with x11grab supporting


----------



## lyuts (Mar 7, 2010)

I have used recordmydesktop couple of times and never had a problem with it. Well, I had some issues on OpenSuse, but not on FreeBSD. It works just fine. And don't forget to specify the out file, so you don't have to waste time looking for it in /tmp.


----------



## BeautifulFish (Apr 14, 2010)

installed multimedia/ffmpeg with 'X11GRAB' option checked... but still no video here, only audio


----------



## lyuts (May 11, 2010)

smooky said:
			
		

> Aha! I'm sorry guys... recordmydesktop is console app and start capturing after launching immediately to /tmp by default... hehe... and filled my all free space...



recordmydesktop has '-o <filename>' switch.


----------



## ybungalobill (Jan 16, 2018)

sixtydoses said:


> Am guessing that you've compiled multimedia/ffmpeg without 'X11GRAB' option checked.



As of 2018 there's no 'X11GRAB' option in multimedia/ffmpeg. I run 'make config' and the only relevant option that I see is 'XCB', which says 'X11 grabbing using XCB'. I compiled and installed multimedia/ffmpeg with this option enabled, but it still says that

`Requested output format 'x11grab' is not a suitable output format`

What's the proper way to build multimedia/ffmpeg with X11 grabbing? Why this isn't even the default?

(Necromancy rationale: for future googlers.)


----------



## scottro (Jan 16, 2018)

If you feel it should be a default, you can file a PR.  (For example, I felt that libx265 should be a default, filed a PR, and they agreed).

My own experience with screen grab has been rather poor, though I haven't tried that hard.   I had better luck with recordmydesktop. 
https://www.freshports.org/multimedia/gtk-recordmydesktop/
I am guessing that searching for info on it led you to this thread, hence the addition to such an old thread, which, to my mind, makes sense.  Looking through the Makefile, I don't see anything aside from the XCB option that you mention.

At this point, I think your best bet might be to file a PR.  (Although, judging from VERY limited experience, and only with Linux, and probably only CentOS-6 or 7, I've forgotten which, you might have better luck with the gtk-recordmydesktop that I mentioned earlier.

More a workaround than an answer, and I apologize for that, but at least a confirmation that someone else didn't see the x11grab option.

EDIT:  Looking at an old post, https://forums.freebsd.org/threads/54464/  it may be that one needs to install x11/xgrab, but I have no personal experience with it.


----------



## ybungalobill (Jan 16, 2018)

scottro said:


> I had better luck with recordmydesktop.



Thank you, but I already tried multimedia/recordmydesktop. The result is choppy, it seems to encode the video in the end (which is a problem for long sessions) and the worst part is that it decides to tweak screen settings along with the following output:

`Initial recording window is set to:
X:0   Y:0    Width:1366    Height:768
Adjusted recording window is set to:
X:6   Y:0    Width:1354    Height:768`

I tried multimedia/vlc. It works well but does not capture the cursor properly. So the next try is to use ffmpeg directly, which honestly I would prefer to vlc if I made it to work.



> EDIT:  Looking at an old post, https://forums.freebsd.org/threads/54464/  it may be that one needs to install x11/xgrab, but I have no personal experience with it.



I read that thread too. But I think it is about somebody building another software that depends on xgrab. I'm not sure how installing xgrab would make a difference given that ffmpeg does not depend on it anyhow during the build... may worth a try though.


----------



## ybungalobill (Jan 16, 2018)

OK, thanks everybody! I forgot the `-i :0.0+0,0` switch. I assumed that it should work without it, but it didn't. And the error message wasn't helpful at figuring it out. Now it works great!


----------

