Page 5 of 25 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 246

Thread: HOWTO: Proper Screencasting on Linux

  1. #41
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Quote Originally Posted by bashologist View Post
    On another computer it's working fine except the sound's very low and sounds terrible. Is it supposed to sound like that?
    There can be many reasons for this, and it depends on your source of audio (mic? system audio?). Again, have you checked input/output volumes?
    How did your commandline look like? Posting it here might help.

    If audio options get misplaced in the commandline, you might end up recording to mp2 (which is the default in ffmpeg) and therefore end up with terrible quality audio.

    EDIT: and no, it's not supposed to sound like that. (unless your mic is of low quality, like the ones integrated with laptops)
    Last edited by verb3k; June 20th, 2010 at 07:32 AM.
    Freedom is neither exclusive nor unlimited.

  2. #42
    Join Date
    Mar 2007
    Location
    Your Closet
    Beans
    380
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Proper Screencasting on Linux

    Trying to record system sounds. The command line for testing I used was actually pretty complicated for just a test lol. This is from my $HISTFILE.

    Code:
    output=$(tempfile -s .mp3)
    mplayer -ao alsa:device=hw=0.0 /usr/share/sounds/alsa/*.wav &> /dev/null < /dev/null &
    sleep 1
    ffmpeg -f alsa -ac 2 -i hw:0,0 -ab 320k -y "$output" &> /dev/null < /dev/null &
    sleep 5
    kill -2 %1 %2
    sleep 1
    mplayer "$output" &> /dev/null < /dev/null
    Also tried with flac etc... The sound is hearable if I turn my volume up about 200%. It's also very staticy. I redirected the stderr but there's no errors or warnings with ffmpeg. Tried with "-i pulse". Can't think of anything else to test. Maxed out everything in alsamixer and sound preferences.
    Last edited by bashologist; June 21st, 2010 at 02:09 PM.

  3. #43
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Quote Originally Posted by bashologist View Post
    Trying to record system sounds. The command line for testing I used was actually pretty complicated for just a test lol. This is from my $HISTFILE.

    Code:
    output=$(tempfile -s .mp3)
    mplayer -ao alsa:device=hw=0.0 /usr/share/sounds/alsa/*.wav &> /dev/null < /dev/null &
    sleep 1
    ffmpeg -f alsa -ac 2 -i hw:0,0 -ab 320k -y "$output" &> /dev/null < /dev/null &
    sleep 5
    kill -2 %1 %2
    sleep 1
    mplayer "$output" &> /dev/null < /dev/null
    Also tried with flac etc... The sound is hearable if I turn my volume up about 200%. It's also very staticy. I redirected the stderr but there's no errors or warnings with ffmpeg. Tried with "-i pulse". Can't think of anything else to test. Maxed out everything in alsamixer and sound preferences.
    When recording system sound, maxing out volume above 100% might result in some statics. It's better if you record with the normal volume and then increase the volume with ffmpeg. Also, it's better to explicitly set the audio codec on the command line.

    So, what I suggest is replacing your commandline with this one:

    Code:
    ffmpeg -f alsa -ac 2 -i hw:0,0 -acodec pcm_s16le -vol 400 -y output.wav
    Note the -vol 400 to increase the audio volume, you can change this value up or down according to your desired amplification. Also note that we used pcm instead of mp3, becuase it's always better to record in lossless first and then do the compression to mp3 later.

    One question though, how did you get -i hw:0,0 to record system audio?
    Doesn't that usually record mic input?
    Freedom is neither exclusive nor unlimited.

  4. #44
    Join Date
    Mar 2007
    Location
    Your Closet
    Beans
    380
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Proper Screencasting on Linux

    Edit: Got everything working on one of my computers. Just didn't follow the great guide well enough.

    Edit 2: Yay, got it working on both computers. My first problem where I manually installed a new alsa was solved by adding the below lines to /etc/asound.conf.

    Code:
    pcm.pulse {
        type pulse
    }
    ctl.pulse {
        type pulse
    }
    pcm.!default {
        type pulse
    }
    ctl.!default {
        type pulse
    }
    These lines may need to be manually added after you manually install alsa.
    Last edited by bashologist; June 21st, 2010 at 11:13 PM.

  5. #45
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    *Updated the guide with info on how to use mkvmerge concatenation as an alternative of pausing/resuming.
    Freedom is neither exclusive nor unlimited.

  6. #46
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Can’t you send SIGSTOP the process? Would be easy to assign a shortcut to that.

    Code:
    pkill -f -s STOP ffmpeg.*x11grab
    pkill -f -s CONT ffmpeg.*x11grab

  7. #47
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Quote Originally Posted by hugmenot View Post
    Can’t you send SIGSTOP the process? Would be easy to assign a shortcut to that.

    Code:
    pkill -f -s STOP ffmpeg.*x11grab
    pkill -f -s CONT ffmpeg.*x11grab
    Didn't seem to work properly. Also, your syntax didn't work for me:
    Code:
    pkill: invalid session id: STOP
    Last edited by verb3k; June 24th, 2010 at 06:43 PM.
    Freedom is neither exclusive nor unlimited.

  8. #48
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Quote Originally Posted by verb3k View Post
    Didn't seem to work properly. Also, your syntax didn't work for me:
    Code:
    pkill: invalid session id: STOP
    Sorry for that. I mixed the syntax of killall and pkill.
    Try this:

    Code:
    pkill -f -STOP ffmpeg.*x11grab
    pkill -f -CONT ffmpeg.*x11grab

  9. #49
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Quote Originally Posted by hugmenot View Post
    Sorry for that. I mixed the syntax of killall and pkill.
    Try this:

    Code:
    pkill -f -STOP ffmpeg.*x11grab
    pkill -f -CONT ffmpeg.*x11grab
    That also doesn't work :
    Code:
    pkill: invalid option -- 'S'
    However changing to "pkill -STOP ffmpeg" does stop the recording, but the output file is wrecked (Pause time still recorded showing the last frame before the pause). I think mkvmerge is a safer solution until ffmpeg supports concatenation or pausing the encode
    Freedom is neither exclusive nor unlimited.

  10. #50
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: HOWTO: Proper Screencasting on Linux

    Quote Originally Posted by verb3k View Post
    That also doesn't work :
    Code:
    pkill: invalid option -- 'S'
    However changing to "pkill -STOP ffmpeg" does stop the recording, but the output file is wrecked (Pause time still recorded showing the last frame before the pause). I think mkvmerge is a safer solution until ffmpeg supports concatenation or pausing the encode
    Gah! Ya, the -f has to come before the process regex. Scusa.
    But when you encode the second time around it drops the idle time. And mplayer skips it during play.

Page 5 of 25 FirstFirst ... 3456715 ... 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
  •