Author Topic: X11grab of screen/area  (Read 354 times)

0 Members and 1 Guest are viewing this topic.

Offline johnaaronrose

  • Jr. Member
  • **
  • Posts: 29
  • Karma: 0
  • Gender: Male
    • View Profile
    • Awards
X11grab of screen/area
« on: July 18, 2020, 08:24:46 pm »
I'm using Ubuntu 18.04 with ffmpeg 3.4.6

I want to grab (video & sound) of the whole screen or grab (video & sound) of a region (e.g. window or area, in the screen) using ffmpeg. I found an example at
ffmpeg -f x11grab -r 25 -s 1024x768 -i :0.0 -vcodec huffyuv screencast.avi
But it doesn't create an avi file and gives "Output file #0 does not contain any stream".
I adapted it slightly (i.e. for my monitor) but it didn't work.
ffmpeg -f x11grab -r 25 -s 1920x1080 -i :0.0 -f pulse -vcodec huffyuv screencast.avi
I've tried other variants e.g.:
ffmpeg -r 25 -video_size 1920x1080 -f x11grab -draw_mouse 0 -show_region 1 -i :0.0 -f pulse -ac 2 -i default -vcodec libx265 -y /home/john/Temporary/v.mp4 >/home/john/Temporary/l.txt 2>&1
That creates a .mp4 file but but won't play (in vlc or video player) as it has unknown video codec & audio codec in its properties.

« Last Edit: July 19, 2020, 06:12:12 am by johnaaronrose »


SimplePortal 2.3.3 © 2008-2010, SimplePortal