Page 2 of 25 FirstFirst 123412 ... LastLast
Results 11 to 20 of 246

Thread: HOWTO: Proper Screencasting on Linux

  1. #11
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    You can do the commands one by one:
    Code:
    sudo add-apt-repository ppa:towolf/codecs
    Code:
    sudo apt-get update
    Code:
    sudo apt-get install libvorbis0a libvorbis-dev libtheora0 libtheora-dev
    You should be able to install the libvorbis/theora even if some repositories fail to update.
    Last edited by verb3k; March 2nd, 2010 at 09:53 PM.
    Freedom is neither exclusive nor unlimited.

  2. #12
    Join Date
    Oct 2009
    Beans
    28
    Distro
    Ubuntu Development Release

    Re: HOWTO: Proper Screencasting on Linux

    A GUI would be nice =/

  3. #13
    Join Date
    Mar 2009
    Location
    Portland, OR
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Proper Screencasting on Linux

    It's been a bumpy road, but I'm getting there. I installed ffmpg successfully, and I can make a lossless video recording of my desktop- but there's no sound. I have pulseaudio, but I already tried replacing "-i pulse" with "-i /dev/dsp", but got a message that there's no such file or directory named /dev/dsp.

    Here's my output from recording a test video (where I play music in songbird and play a movie with vlc):

    Code:
    usr@cmptr:~/screencasts$ ffmpeg -f alsa -i pulse -f x11grab -r 30 -s 1680x1050 -i :0.0 -acodec flac -vcodec libx264 -vpre lossless_ultrafast -threads 0 output03.mkv
    FFmpeg version SVN-r22170, Copyright (c) 2000-2010 the FFmpeg developers
      built on Mar  3 2010 08:46:02 with gcc 4.4.1
      configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
      libavutil     50. 9. 0 / 50. 9. 0
      libavcodec    52.55. 0 / 52.55. 0
      libavformat   52.54. 0 / 52.54. 0
      libavdevice   52. 2. 0 / 52. 2. 0
      libswscale     0.10. 0 /  0.10. 0
      libpostproc   51. 2. 0 / 51. 2. 0
    [alsa @ 0x2bce3c0]capture with some ALSA plugins, especially dsnoop, may hang.
    [alsa @ 0x2bce3c0]Estimating duration from bitrate, this may be inaccurate
    Input #0, alsa, from 'pulse':
      Duration: N/A, start: 1267689871.428564, bitrate: N/A
        Stream #0.0: Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
    [x11grab @ 0x2bedad0]device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1680 height: 1050
    [x11grab @ 0x2bedad0]shared memory extension  found
    [x11grab @ 0x2bedad0]Estimating duration from bitrate, this may be inaccurate
    Input #1, x11grab, from ':0.0':
      Duration: N/A, start: 1267689871.649909, bitrate: 1693440 kb/s
        Stream #1.0: Video: rawvideo, bgra, 1680x1050, 1693440 kb/s, 30 tbr, 1000k tbn, 30 tbc
    [libx264 @ 0x2bfcb90]using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
    [libx264 @ 0x2bfcb90]profile High 4:4:4 Predictive, level 4.0
    Output #0, matroska, to 'output03.mkv':
      Metadata:
        encoder         : Lavf52.54.0
        Stream #0.0: Video: libx264, yuv420p, 1680x1050, q=10-51, 200 kb/s, 1k tbn, 30 tbc
        Stream #0.1: Audio: flac, 44100 Hz, 1 channels, s16, 64 kb/s
    Stream mapping:
      Stream #1.0 -> #0.0
      Stream #0.0 -> #0.1
    Press [q] to stop encoding
    frame=  883 fps= 24 q=-1.0 Lsize=   24540kB time=36.78 bitrate=5465.8kbits/s dup=0 drop=18    
    video:24527kB audio:4kB global headers:0kB muxing overhead 0.037449%
    [libx264 @ 0x2bfcb90]frame I:4     Avg QP: 0.00  size:802543
    [libx264 @ 0x2bfcb90]frame P:879   Avg QP: 0.00  size: 24920
    [libx264 @ 0x2bfcb90]mb I  I16..4: 32.8%  0.0% 67.2%
    [libx264 @ 0x2bfcb90]mb P  I16..4: 10.1%  0.0%  0.0%  P16..4:  1.4%  0.0%  0.0%  0.0%  0.0%    skip:88.5%
    [libx264 @ 0x2bfcb90]coded y,uvDC,uvAC intra: 23.8% 20.4% 20.3% inter: 1.2% 1.3% 1.3%
    [libx264 @ 0x2bfcb90]i16 v,h,dc,p: 87% 13%  0%  0%
    [libx264 @ 0x2bfcb90]i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 36%  3%  2% 29%  2%  2%  1%  2%
    [libx264 @ 0x2bfcb90]kb/s:6826.21
    And here's what I got in the terminal when I played the resulting video in vlc:
    Code:
    usr@cmptr:~/screencasts$ vlc output03.mkv 
    VLC media player 1.0.2 Goldeneye
    [0x23d0888] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
     m_el[mi_level] == NULL
     arrrrrrrrrrrrrg Up cannot escape itself
    [0x3443ad8] pulse audio output: No. of Audio Channels: 1
    [0x2823028] main input error: ES_OUT_RESET_PCR called
    usr@cmptr:~/screencasts$
    "Our bodies stirred with these waters briefly, danced with a certain intoxication before the love of life and self, dealt with a few strange ideas, then submitted to the instruments of Time."
    -Frank Herbert

  4. #14
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    From what I see, the pulseaudio recording is working fine for you. Make sure the microphone is connected properly and (more importantly) that it is not muted or turned down.

    EDIT: Are you trying to record sound from microphone or sound from your desktop? if it's the second case, then it should be possible but I don't actually know how.
    Last edited by verb3k; March 4th, 2010 at 12:47 PM.
    Freedom is neither exclusive nor unlimited.

  5. #15
    Join Date
    Mar 2009
    Location
    Portland, OR
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Proper Screencasting on Linux

    The 2nd case- I was trying to record sound from my desktop (from VLC and Songbird). I don't have a mic, so I can't test to see if that works.
    "Our bodies stirred with these waters briefly, danced with a certain intoxication before the love of life and self, dealt with a few strange ideas, then submitted to the instruments of Time."
    -Frank Herbert

  6. #16
    Join Date
    Sep 2006
    Beans
    558

    Re: HOWTO: Proper Screencasting on Linux

    To capture sounds from within the computer (like from webpages or media players) when using ffmpeg x11grab, after you execute ffmpeg just go to the pulseaudio volume control, select the recording tab and you should see ffmpeg appear there. Then move it's stream to the monitor of internal audio... or whatever it's called on your system. Once your audio starts playing you'll see the recording VU meter bumping. This is the real power of pulseaudio.

    BTW, thanks very much for this tutorial! I will use ffmpeg to start capturing videos that I can't rip from certain websites. recordmydesktop feels a bit long in the tooth after trying the x11grab method.

  7. #17
    Join Date
    Sep 2008
    Beans
    128
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Proper Screencasting on Linux

    thanks,
    that works, though the recorded sound sounds like it has been recorded with a mic with the levels upped to the max.

    note: I had to install pavucontrol in order to get the pulseaudio-controlcenter

    Now, if there were a way to shift the stream via the terminal (and beforehand), that would be awesome...

  8. #18
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Based on expert recommendations (relaxed at #ffmpeg), the guide has been updated to use pcm_s16le in step 1 instead of flac, because it is faster and utilizes less CPU. This shouldn't make a big difference to end users because both formats are lossless.
    Freedom is neither exclusive nor unlimited.

  9. #19
    Join Date
    Sep 2006
    Beans
    558

    Re: HOWTO: Proper Screencasting on Linux

    I've been using this method and it works really well for grabbing videos from webpages that can't be grabbed in any other way. You can add "-t hh:mm:ss" to limit the capture time for unattended recording.

    One thing I noticed is that this method is only "seeing" mono audio. I always see this regardless of the source audio:

    Stream #0.0: Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s

    What exactly is the options "-f alsa -i pulse" doing? I also tried "-ac 2" which produces an output file with 2 channels, but the problem is on the input side. The input only sees 1 channel for some reason.

  10. #20
    Join Date
    Dec 2006
    Beans
    7,349

    Re: HOWTO: Proper Screencasting on Linux

    Hi verb3k,

    Thanks for the great guide . A small query about Example 4: had you considered using the FFmpeg native 'Xvid' (MPEG-4) encoder rather than the external xvid library? Some details here:

    3.10 How do I encode Xvid or DivX video with ffmpeg?
    http://www.ffmpeg.org/faq.html#SEC22

    In my experience the FFmpeg version looks better and runs faster, but I would be interested to hear the experiences of others with this...

    All the best,

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

Page 2 of 25 FirstFirst 123412 ... 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
  •