5

I am trying to record my screen (without sound) using avconv but i think there is something wrong with it.

I gave the command

  avconv -f x11grab -s hd720 -r 30 -i 0:0  sample.mov

it ends up with an error

 [x11grab @ 0x84c03c0] device: 0:0 -> display: 0:0 x: 0 y: 0 width: 1280 height: 720
 No protocol specified
 [x11grab @ 0x84c03c0] Could not open X display.
 0:0: Input/output error

Am i doing something wrong if, please tell me the solution

guntbert
  • 13,134
Umar
  • 140
  • 1
    How are you running this command? In a terminal window in your desktop environment or via SSH? Are you the same user as the X session is running as? And what does echo $DISPLAY give you? – gertvdijk Apr 02 '13 at 20:04
  • i am running it through terminal – Umar Apr 02 '13 at 21:08
  • when i give the command with the first user ( created when installing ubuntu ) it works but on the second user ( created after install ubuntu ) it gives me the error @gertvdijk – Umar Apr 03 '13 at 18:34
  • The best way to add additional information to your question is by editing it, with the edit button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself. – guntbert Apr 21 '13 at 17:29
  • Have you tried "-i $DISPLAY" instead of "-i 0:0"? Btw: What is the output of: echo $DISPLAY ? –  Apr 21 '13 at 16:36

1 Answers1

4

your problem is one missing : and .

In your command where you specifiy the display -i 0:0

avconv -f x11grab -s hd720 -r 30 -i 0:0 sample.mov

It should be -i :0.0

avconv -f x11grab -s hd720 -r 30 -i :0.0 sample.mov

You can always double check by looking at your environmental variable for display in your terminal.

echo $DISPLAY
:0.0

To understand what the display variable means have look at this post. https://pangea.stanford.edu/computing/unix/xterminal/xclients.php

-display hostname:n.m

Where hostname is the network hostname, qualified with domain name as needed (or use the IP address directly); n is the display number on that host (usually 0); and m is the screen number on that host (usually 0). For example, if you am logged into the console on the workstation eluard and want to run the xload client on pangea with the output window coming back to eluard, you could start this program on pangea with the option:

xload -display eluard:0.0

localhost is assumed if the hostname is omitted localhost:0.0 is the same as :0.0

nelaaro
  • 10,028