You are not logged in.

#1 2015-05-24 23:36:49

SnowyClaw
Member
Registered: 2015-05-12
Posts: 24

ffmpeg: :0.0: Invalid argument

Hello, everyone.
I'm having a problem with ffmpeg. My screen size is 1366x768.

Running the command,

ffmpeg -s 1366x768 -f x11grab -r 30 -i :0.0 hello.mp4

Produces:

Capture area 1366x768 at position 0.0 outside the screen size 1366x768
:0.0: Invalid argument

How can I fix this? Any help is welcome.

Last edited by SnowyClaw (2015-05-25 00:16:29)

Offline

#2 2015-05-25 06:53:55

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: ffmpeg: :0.0: Invalid argument

The frame size should be smaller that the screen resolution, so If your screen resolution is WxH then the max  size allowed is (W - 1)X(H - 1).
This should work

ffmpeg -s 1365x767 -f x11grab -r 30 -i $DISPLAY hello.mp4

About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#3 2015-05-25 17:48:04

esa
Member
Registered: 2011-12-29
Posts: 143
Website

Re: ffmpeg: :0.0: Invalid argument

I'd use: ${DISPLAY:-:0} if manualy writing (a script),  so if the variable is empty, it refers to the default/internal screen
But you'll be missing audio in that video for sure.

Me using:
* vhs -S
* with: vhs -SAs 1366x768 ('A' is just 'needed' to open the text editor before the command gets executed -> Advanced)
i can copy paste you this:

ffmpeg -v quiet -f x11grab -video_size  1366x768 -i :0 -f alsa -i default   -c:v libx264 -c:a aac -ac 2 -strict -2   -strict -2  -f mp4 "output.13.mp4"

* Or a bit simpler tongue to 'standard resolution': hd-ready

vhs -SQ hd
ffmpeg -v quiet -f x11grab -video_size  1920x1080 -i :0 -f alsa -i default   -c:v libx264 -vf scale=1280x720 -b:v 1280K -minrate 2560K -maxrate 2560K -bufsize 1280K  -c:a ac3 -b:a 384K -ac 2   -strict -2   "output.3.mkv"

Hope this helps


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#4 2015-05-25 23:29:08

McKlain
Member
Registered: 2013-06-23
Posts: 12

Re: ffmpeg: :0.0: Invalid argument

mauritiusdadd wrote:

The frame size should be smaller that the screen resolution, so If your screen resolution is WxH then the max  size allowed is (W - 1)X(H - 1).
This should work

ffmpeg -s 1365x767 -f x11grab -r 30 -i $DISPLAY hello.mp4

I have the same screen resolution (1366x768) and that command worked for me. However, it used to work well with:
ffmpeg -s 1366x768 -f x11grab -r 30 -i $DISPLAY hello.mp4

For some reason it doesn't work now.

Regards!

Offline

#5 2015-05-26 16:47:24

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: ffmpeg: :0.0: Invalid argument

This was FFmpeg bug #4574 and was fixed with commit 7971fa9.

I could request that this get backported to the next release (if it hasn't already), but because you did not include the complete console output I am not sure what version you are using. I'm guessing 2.6.3 from Extra.

If you need it to work right away then you'll have to compile FFmpeg from current git master. A clean way to do that until the fix gets backported would be to simply get the source and compile, but don't install it, then just explicitly execute the resulting binary from that directory. Or edit the ffmpeg ABS PKGBUILD, or use ffmpeg-git from AUR, but personally I would just do the first option.

Offline

Board footer

Powered by FluxBB