Announcement

Collapse
No announcement yet.

RecordItNow help wanted

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    RecordItNow help wanted

    I've been looking for desktop recording software, and I found this Qt-based program called RecordItNow. I guess it's a front-end for recordmydesktop and has plugin support. But I'm not getting a very good quality on the video.

    I don't know if it's like this for all Linux desktop recording, but it doesn't do a good job at catching all of what's going on. First I tried recording a window of FCEUX running in Wine, and then the native Linux version of FCEUX, and in both cases it only caught maybe a dozen frames of video through a single Super Mario Bros. level. It recorded the audio just fine, and it seemed to be more reliable at catching video if a screen remained static for a couple seconds (like at the level/lives screen). The default FPS was around 16, and I tried bumping it to 30, and didn't have any better results. What's worse is that when these recordings were played back in VLC, the player would skip ahead several seconds as if no video information existed in the first half of the file. Reencoding it via ffmpeg didn't change the quality.

    I just tried recording a window of Klickety (so happy it now has a KDE4 version) and I cranked the FPS up to 90, and it now records about one frame of action for every second. So essentially 90 FPS is now equaling 1 FPS.

    This is all very confusing. I'm sure that the actual output file is running at 90 FPS, but the program is only really capturing one frame per second at that setting. I tried recording Klickety again with Desktop Effects turned off, but that didn't do any good. I do still have a number of programs running, so that might have something to do with it, I suppose. But I'm not even using half my system's RAM.

    Is there anything I can do to get better results?

    #2
    Re: RecordItNow help wanted

    Anyone? Please?

    Comment


      #3
      Re: RecordItNow help wanted

      I've found that ffmpeg does an excellent job with screencasts.
      Here are my notes that I've picked up from other members of this forum and other places on that topic:
      Capture video of a linux desktop using ffmpeg

      Xdpyinfo is a utility for displaying information about an X server. It is used to examine the capabilities
      of a server, the predefined values for various parameters used in communicating between clients and the
      server, and the different types of screens and visuals that are available. (see man xdpyinfo).

      We use it as follows to determine the screen resolution:

      xdpyinfo | grep 'dimensions:'|awk '{print $2}'

      FFmpeg can grab the X11 display

      ffmpeg -f x11grab -i :0.0 /tmp/out.mpg

      0.0 is display.screen number of your X11 server, same as the DISPLAY environment variable.

      -r will be used to set the output file to 25 fps.

      Now you know how to capture video of a linux desktop using ffmpeg:

      ffmpeg -f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -r 25 -i :0.0 -sameq /tmp/out.mpg

      ========================
      i am always having to look this up. now at least i'll have it here:
      ffmpeg -f x11grab -vc theora -s vga -r 24 -b 1200 -g 300 -i :0.0 ~/screencapture1.ogv
      or without sound:
      ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq ~/out.mpg



      option by option:

      -f x11grab = take video from X...ffmpeg must have been compiled with enable-x11grab included;
      your distro or version may or may not have this enabled!

      -vc = Video Codec...usually you will have ogg theora, xvid, [ff]mpeg (the default), and x264 available

      -s = size. see the ffmpeg man page for details; vga is something like 800x600 and there are many other
      sizes available. know that it starts from the top left corner counts pixels from there.

      -r = frame rate. lower frame rate gives smaller file size but looks a little less smooth

      -b = bitrate. higher bitrate looks better but makes for a larger file size

      -g = GOP size...300 provides a pretty nice looking image without increasing file size too much;
      it's got one intra frame every...i dunno....300/24 = 12.5 seconds or so.

      -i = input...in this case it's :0.0 meaning your main screen. or display. or whatever it's called.


      As you can imagine, there are a LOT more options available to you via man ffmpeg. Probably the most
      notable would be the offset, so if you wanted the capture area to not start at the very top left, you could tell
      it to, say, go down 10 pixels and over 10 pixels and THEN capture vga-size images, or xga-size images, or
      whatever.

      ======================
      ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
      ===================
      Creating screencasts using ffmpeg

      While experimenting with creating demo videos for QBoard, i had to tinker quite a lot to get the video
      capture working how i wanted it. For anyone doing screencasts (whether of QBoard or not), here's a
      simple shell script which can simplify the process:

      #!/bin/bash
      # Generates an ffmpeg command line for capturing a given X11 window.
      # Usage: $0 [optional output file name]
      # It will prompt you to click on the window you want to capture.
      # Output is simply echoed, for use in copy/pasting (adjusting/adding
      # parameters as needed).
      # Tip: the command uses screen coordinates, so do not resize or move
      # the target window once capturing as begun.
      echo "Click the window to capture..."

      tmpfile=/tmp/screengrab.tmp.$$
      trap 'touch $tmpfile; rm -f $tmpfile' 0

      xwininfo > $tmpfile 2>/dev/null
      left=$(grep 'Absolute upper-left X:' $tmpfile | awk '{print $4}');
      top=$(grep 'Absolute upper-left Y:' $tmpfile | awk '{print $4}');
      width=$(grep 'Width:' $tmpfile | awk '{print $2}');
      height=$(grep 'Height:' $tmpfile | awk '{print $2}');
      geom="-geometry ${width}x${height}+${left}+${top}"
      echo "Geometry: ${geom}"
      size="${width}x${height}"
      pos="${left},${top}"
      echo "pos=$pos size=$size"

      out=${1-screengrab.avi}
      #test -f $out && rm $out

      framerate=4
      echo "# ffmpeg command"
      echo -n "sleep 2; " # give caller time to switch to captured window
      echo ffmpeg -f x11grab \
      -r ${framerate} \
      -s ${size} \
      -i ${DISPLAY-0:0}+${pos} \
      -sameq \
      $out

      It's used like this:

      stephan@jareth:/space/stephan$ ./screencap.sh
      Click the window to capture...
      Geometry: -geometry 598x686+764+0
      pos=764,0 size=598x686
      # ffmpeg command
      sleep 2; ffmpeg -f x11grab -r 4 -s 598x686 -i :0.0+764,0 -sameq screengrab.avi

      The output is intended to be copy/pasted to your shell (or script, or whatever), adding or adjusting
      parameters as necessary. The sleep call is helpful when running the command from a shell, as it gives the
      caller time to click on the target window before ffmpeg starts capturing.
      ===================================
      Once the video has been created you can edit it with LIVES, OpenShot, Kino or what ever to clean it up, add text or audio, etc...


      You can start this line
      ffmpeg -f x11grab -vc theora -s vga -r 24 -b 1200 -g 300 -i :0.0 ~/Videos/screenCapture1.ogv
      in a Konsole, minimize it, and then do your stuff with the desktop. When you are done, use 'q' to stop the ffmpeg in the konsole.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        Re: RecordItNow help wanted

        I gave RecordItNow another shot with the ffmpeg option, and the video came out looking smooth. Even more smooth than the script that's near the bottom of your quote.

        There's just one problem. Ffmpeg doesn't seem to capture sound. I don't just want to capture me talking while the video is recording, but I want to capture the game audio I want to record myself playing the game, with the game audio, and with my own commentary. RecordItNow along with the RecordMyDesktop plugin records the video and game audio, but the video quality is poor (especially when I try to record an NES emulator, both via Wine and native). Ffmpeg does better with the video, but it doesn't give sound. I need the sound. Which is why I was hoping for a solution to my RecordMyDesktop issues. Whether I need to fuss with the plugin settings or use a different front-end.

        (I haven't tried RecordMyDesktop while talking into my mic, so I don't know if it can even do that.)

        Comment


          #5
          Re: RecordItNow help wanted

          I hadn't tried RecordMyDesktop in several years so I gave it another try last night.

          The "RecordMyDesktop" creates the ogv video and sound (from your mic, not the screen) format, so I doubt that it would pick up sounds from an app or game that is playing, but, there are settings in the configuration that allow modifying the recording command that is issued. When using the ogv format as soon as you stop recording the app begans processing the intermediate file and converting it into the final ogv format. Depending on the length of your recording the conversion could take several minutes.

          The ffmpeg format generates an mp4 video immediately, with no intermediate step. When you click the stop button the files is closed and ready to view. Ffmpeg may be configurable to add sound. Check the man pages.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: RecordItNow help wanted

            I did a Google search about recording audio with ffmpeg, and after some fiddling with stuff I got it to work.

            Basically you have to add "-f alsa -i pulse" to the ffmpeg command, and also use pavucontrol to set the PulseAudio recording to Monitor (or however it's shown) while ffmpeg is recording something. Apparently that setting in pavucontrol is remembered, so I won't have to do it again.

            Of course this leaves me confused as to whether or not I can record desktop sounds and audio commentary at the same time. Pavucontrol seems to indicate it's one or the other, but I would hope that the mic input can be counted as desktop audio. Or maybe I'm wrong on that.

            Comment


              #7
              Re: RecordItNow help wanted

              Using the following command:
              Code:
              ffmpeg -f alsa -i plughw -f x11grab -s wxga -r 25 -i :0.0 -sameq /home/jerry/out.mpg
              I was able to capture sound on my Intel audio chip using the phonon driver: plughw. When I played the test music in the Phonon setting dialog of Settings, I could hear it in the background at a low level. I opened kmixer and moved the "capture" button, which was enabled, from half to full volume. I lowered my mic setting to half it former value because increasing the capture value increased it as well. I could hear the music playing reasonably well and hear my own voice through my mic. A couple of test recordings would probably be in order to learn what your best settings would be.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment

              Working...
              X