Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: FFmpeg and x11grab?

  1. #1
    Join Date
    Dec 2006
    Beans
    6,927

    FFmpeg and x11grab?

    Hi,

    Has anyone managed to grab there screen display using FFmpeg and x11grab? I have ransacked the man pages and html docs and the best I have managed is a string of quite varied error messages .

    I am using the current svn FFmpeg.

    Andrew
    You think that's air you're breathing now?

  2. #2
    Join Date
    Dec 2006
    Beans
    6,927

    Re: FFmpeg and x11grab?

    Well I have made a little headway but the encoding parameters need a little work. The following grabs the entire screen for 30 seconds and encodes to x264:

    Code:
    ffmpeg -y -t 30 -f x11grab -qscale 2 -r 15 -s 1024x768 -i :0.0 \
    -s 800x600 -vcodec libx264 -vpre hq -crf 22 -threads 0 x11grab.mp4
    Quality is a little horrible though. Can anybody expand on this a little?

    Andrew

  3. #3
    Join Date
    Sep 2006
    Beans
    3,484

    Re: FFmpeg and x11grab?

    I'm not very familiar with x11grab, although for quite some time I've been thinking it would make a good FFmpeg guide. Does it look better if you cut out the resizing of the output? What about using a lossless type of codec: ffv1, huffyuv, ffvhuff; vpre lossless_slow, lossless_medium, lossless_fast, lossless_ultrafast? I'm just guessing here.

  4. #4
    Join Date
    Dec 2006
    Beans
    6,927

    Re: FFmpeg and x11grab?

    Hi FakeOutdoorsman,

    Quote Originally Posted by FakeOutdoorsman View Post
    I'm not very familiar with x11grab, although for quite some time I've been thinking it would make a good FFmpeg guide. Does it look better if you cut out the resizing of the output? What about using a lossless type of codec: ffv1, huffyuv, ffvhuff; vpre lossless_slow, lossless_medium, lossless_fast, lossless_ultrafast? I'm just guessing here.
    I suspect the problem seemed to be that I was a little ambitious trying to grab a whole desktop and then play back a big h264 clip . I cut down the size and fiddled the coordinates a little and I have achieved a more acceptable result:

    Code:
    ffmpeg -y -t 5 -f x11grab -r 12 -s 800x600 -i :0.0+75,30 \
    -vcodec libx264 -vpre hq -crf 22 -threads 0 $HOME/Desktop/x11grab.mp4
    I look forward to seeing some FFmpeg guides in this format from you and I am sure with your skill the video will look better than my crude effort .

    Andrew

  5. #5
    Join Date
    Nov 2006
    Location
    There and back again
    Beans
    1,097

    Re: FFmpeg and x11grab?

    Not bad, seems to do better than recordmydesktop as far as cpu intensity. Still like to see a screencast program that can be moved, follow the mouse... on Linux though.

  6. #6
    Join Date
    Apr 2008
    Location
    CA, US
    Beans
    119
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: FFmpeg and x11grab?

    i'm trying to use x11grab but just get this...


    FFmpeg version SVN-r19369, Copyright (c) 2000-2009 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
    libavutil 50. 3. 0 / 50. 3. 0
    libavcodec 52.32. 0 / 52.32. 0
    libavformat 52.36. 0 / 52.36. 0
    libavdevice 52. 2. 0 / 52. 2. 0
    libswscale 0. 7. 1 / 0. 7. 1
    built on Jul 7 2009 20:59:55, gcc: 4.3.3
    Unknown input or output format: x11grab

  7. #7
    Join Date
    Dec 2006
    Beans
    6,927

    Re: FFmpeg and x11grab?

    Hi bgiannes,

    Quote Originally Posted by bgiannes View Post
    i'm trying to use x11grab but just get this...

    Code:
    Unknown input or output format: x11grab
    Could you post the full terminal output including the actual command that you are using? Could be that your syntax is not quite right.

    All the best,

    Andrew
    You think that's air you're breathing now?

  8. #8
    Join Date
    Jun 2007
    Beans
    13,028

    Re: FFmpeg and x11grab?

    removed - should read more carefully
    Last edited by mc4man; July 8th, 2009 at 10:19 PM.

  9. #9
    Join Date
    Apr 2008
    Location
    CA, US
    Beans
    119
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: FFmpeg and x11grab?

    1) i just used the command from your post

    ffmpeg -y -t 30 -f x11grab -qscale 2 -r 15 -s 1024x768 -i :0.0 \
    -s 800x600 -vcodec libx264 -vpre hq -crf 22 -threads 0 x11grab.mp4
    i've tryed change things around a bit but same result

    in fact i have two ubuntu installs 8.10 and 9.04 that give me the same result

    2) ffmpeg is built with x11grab enabled.

    what i'm trying to do here:-
    i'd like to use ffmpeg to capture the screen and the sound output. i know about recordmydesktop but i get sure bad sound, besides i love ffmpeg!
    Last edited by bgiannes; July 8th, 2009 at 07:44 PM.

  10. #10
    Join Date
    Apr 2008
    Location
    CA, US
    Beans
    119
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: FFmpeg and x11grab?

    once x11grab is working i hope to use:

    ffmpeg -f oss -i /dev/dsp -f x11grab -s cif -i :0.0 /tmp/out.mpg




    update

    https://bugs.launchpad.net/ubuntu/+s...peg/+bug/59849

    ?
    Last edited by bgiannes; July 8th, 2009 at 09:03 PM.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •