Announcement

Collapse
No announcement yet.

Making a video that captures the screen.

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

    Making a video that captures the screen.

    I have a Minecraft server setup so that I and my two grandsons (7yrs and 12 yrs) can log in from home and we can play togeather, using Mumble to talk with each other. Works fantastic.

    I decided I wanted to record my screen while playing the game at full screen. I have an i7-3610QM CPU with 6GB of RAM and an Intel HD4000 cpu, and a 1600X900 display. (I am not using Bumblebee with the seconday Nividia GT650M because currently the stock Nouveou driver on the Intel chip is at least twice as fast).

    I had saved a record of our experiments with ffmpeg on this forum in July of 2011. When I tried that command in a console:
    Code:
    ffmpeg -f x11grab -vc theora -s vga -r 24 -b 1200 -g 300 -i :0.0 ~/Videos/screenCapture1.ogv
    ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
      built on Apr  2 2013 17:02:36 with gcc 4.6.3
    [COLOR=#ff8c00]*** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.[/COLOR]
    This option is deprecated, use -channel.
    [x11grab @ 0x23fec00] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 640 height: 480
    [x11grab @ 0x23fec00] shared memory extension  found
    Option channel not found.
    So, not having any experience with avconv, I tried avconv using a command I found on the Internet:

    Code:
    avconv -r 25 -s 1900x600 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 2 -f alsa -ac 2 -i pulse -acodec pcm_s16le filename.avi
    avconv version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
      built on Apr  2 2013 17:02:36 with gcc 4.6.3
    [x11grab @ 0x6639c0] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1900 height: 600
    [x11grab @ 0x6639c0] shared memory extension  found
    X Error of failed request:  BadMatch (invalid parameter attributes)
      Major opcode of failed request:  140 (MIT-SHM)
      Minor opcode of failed request:  4 (X_ShmGetImage)
      Serial number of failed request:  11
      Current serial number in output stream:  11
    Obvously, kx11grab wouldn't work because it is a front end for ffmpeg. It would never start recording.

    Istanbul would immediately, display "Finished" when its record button was clicked, and show no other activity.

    I next tried "recorditnow" for KDE at 30 fps. I set it to record the Minecraft window, not full screen. It seemed to record well but when I played it back instead of smooth motion I got one frame out of five, making it appear to be a montage of snapshots, about one every two or three seconds.

    That left recordmydesktop. It worked. I went to full screen and it still worked. The playback of the video of my activity on Minecraft was as smooth as if I were playing the game. It'is easy to use. Open a Konsole and enter "recordmydesktop". That's all. The man pages give other options. The recording starts immediately. Minimize the Konsole and proceed to do what it is you are going to record. When you are done open the Konsole and enter "Ctrl-C" to stop it. It will immediately begin processing the video to produce out.ogv (or what ever you named it as a parameter to the command). Processing takes bout one minute per 30MB. When it is done you get the command prompt back. The processing is very intensive. It takes 100% of one of my 8 cores, and even though I have 7 cores left other jobs are not as quick as they normally.
    Last edited by GreyGeek; Sep 16, 2013, 09:57 AM.
    "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.

    #2
    Another option is vokoscreen.

    http://www.unixmen.com/vokoscreen-a-...ool-for-linux/
    Linux because it works. No social or political motives in my decision to use it.
    Always consider Occam's Razor
    Rich

    Comment


      #3
      Hi
      Back when I was at another distro I made a Halloween Video, played it full screen and used recordmydesktop.

      I thought that it would might not be of sufficiently high quality to be acceptable, but I uploaded it to YouTube, we had the "Halloween Party" at the distro and .... I think maybe three or four people viewed it!

      I used it as an app from the menu and it did not seem that processor intensive at the time, but that was what.... 6 - 8 years ago, so dunno.

      But recordmydesktop does indeed work.

      woodsmoke

      Comment


        #4
        I'm not sure why it's failing for you, Jerry; it's working here fine. Does Google reveal anything if you search for that error?


        I have placed the following in my ~/.bash_aliases file:
        Code:
        screenrecord () { avconv -f x11grab -s $(xdpyinfo | awk '/dimensions/ {print $2}') -i :0.0 -c:v libtheora -q 10 $*.mkv ;}
        At a command prompt, run:
        Code:
        screenrecord [i]file[/i]
        The command immediately begins recording the full dimensions of your screen, encoded with Theora, and stored in a Matroska format file called file.mkv. Press Ctrl+C to stop encoding.

        Audio is not included. I suspect the following would be sufficient:
        Code:
        avconv -f x11grab -s $(xdpyinfo | awk '/dimensions/ {print $2}') -i :0.0 -f pulse -i default -c:v libtheora -q 10 -c:a libvorbis $*.mkv
        Last edited by SteveRiley; Sep 16, 2013, 12:56 AM.

        Comment


          #5
          Capture

          About ffmpeg

          Short: The Ubuntu is using the Libav - the Ubuntu version of the ffmpeg is old and for the compatibility.

          More: http://www.kubuntuforums.net/showthr...l=1#post329309


          Upgrade:

          The ffmpeg home has a link to the PPA: http://www.ffmpeg.org/ -> http://www.ffmpeg.org/download.html

          An alternative is to install the ffmpeg to the /opt: http://www.kubuntuforums.net/showthr...l=1#post334852


          For the ffmpeg is the QX11Grab: http://qx11grab.hjcms.de/

          „QX11Grab“ is a system tray applet for X11 desktop environments that uses FFmpeg to recording X11 Desktops and Windows.
          Seems to work - sort of - with the Saucy & ffmpeg 2.0.1.




          VLC - jack of many trades

          The VLC media player can capture the desktop: VLC > Media > Open Capture Device : Capture Desktop



          Set the destination and transcoding options



          Click the Stream button


          Works with the Linux & Windows.

          More: http://www.wikihow.com/Screen-Capture-to-File-Using-VLC
          Last edited by Rog132; Sep 16, 2013, 09:29 AM.
          A good place to start: Topic: Top 20 Kubuntu FAQs & Answers
          Searching FAQ's: Google Search 'FAQ from Kubuntuforums'

          Comment


            #6
            Originally posted by richb View Post
            From that URL: "It basically uses FFMPEG".
            "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


              #7
              Steve, It's probably me and my dwindling skillset.

              Rog131, thanks for jogging my memory about VLC and screen capture. I knew that it could do it, but as I've explained to Steve, my memory seems to have taken a permenant vacation and I had forgotten that fact. Sigh...
              "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


                #8
                I had tried to use Recordmydesktop before. It works. However, I also use KDEnlive for encoding and editing. However, KDEnlive will not open a .ogv file. This boggles my mind, since .ogv is an opensource format. Just for reference, there is also a KDE front-end for Recordmydesktop using FFMpg: http://kde-apps.org/content/show.php...content=114610.
                ​"Keep it between the ditches"
                K*Digest Blog
                K*Digest on Twitter

                Comment


                  #9
                  this one works well @hear , great quality (you'd sware it was the screen wile watching it) but LARGE file size,,,,,,,,,,,,
                  Code:
                  ffmpeg -f alsa -ac 2 -i pulse -f x11grab -s 1366x768 -r 25 -i :0.0 -vcodec ffv1 filename.avi
                  these work ok as well
                  Code:
                  good screen grab with audio
                  ffmpeg -r 30 -s 1024x768 -f x11grab -i :0.0 -f oss -i /dev/dsp -vcodec msmpeg4v2 -qscale 2 filename.avi
                  
                  ffmpeg -r 30 -s 1366x768 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 2 -f alsa -ac 2 -i pulse -acodec pcm_s16le filename.avi
                  
                  ffmpeg -r 30 -s 1366x768 -f x11grab -i :0.0 -vcodec camtasia -f alsa -ac 2 -i pulse  filename.avi
                  VINNY

                  OOPS you may want to replace /dev/dsp in the first one in that set with "pulse",,,,,,he he guess I'v had that one in the list a wile
                  Last edited by vinnywright; Sep 16, 2013, 03:35 PM.
                  i7 4core HT 8MB L3 2.9GHz
                  16GB RAM
                  Nvidia GTX 860M 4GB RAM 1152 cuda cores

                  Comment


                    #10
                    Originally posted by dequire View Post
                    However, KDEnlive will not open a .ogv file. This boggles my mind, since .ogv is an opensource format.
                    Speaking of container formats... my small one-liner uses Matroska format only because I can't seem to get OGG/OGV to work at all. Specifying file.og{g|v} seems to work during recording and encoding, but the resulting playback halts after a couple seconds. This is very odd, since Xiph maintains OGG/V, Theora, and Vorbis.

                    Originally posted by vinnywright View Post
                    this one works well @hear , great quality (you'd sware it was the screen wile watching it) but LARGE file size
                    Yawp, thus my use of Theora and Vorbis. The file sizes are much more manageable, and the codecs are patent-free too.



                    Now then, regarding audio...
                    Code:
                    avconv -f alsa -i pulse
                    I think a better approach is to specify PulseAudio as the input format, because in KDE PA sort of "owns" ALSA anyway. Then you can select which Pulse source to record from. To grab the default source, use:
                    Code:
                    avconv -f pulse -i default
                    To see a list of sources, run:
                    Code:
                    pactl list short sources
                    Last edited by SteveRiley; Sep 16, 2013, 09:38 PM.

                    Comment


                      #11
                      Well, I tried VLC to do a screen capture. I couldn't get it to capture the sound nor to show the mouse pointer. Other than that, Mrs. Lincoln, how was the play?

                      While searching for a solution to including the sound in the screen capture I saw this:
                      http://richard.esplins.org/siwi/2013...cording-linux/

                      Pretty well sums up what I found out.

                      P.S. -- Steve, I tried your avconv command:
                      Code:
                      $ avconv -f pulse -i default
                      avconv version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
                        built on Apr  2 2013 17:02:36 with gcc 4.6.3
                      [B]Unknown input format: 'pulse'[/B]
                      Here's the recordmydesktop command that does it at 30 fps with glorious sound, AND, it show the mouse cursor as well!
                      recordmydesktop --width 1600 --height 900 -x 0 -y 0 --full-shots --fps 30 --channels 1 --device "hw:0,0" --v_quality 63 --s_quality 63 --v_bitrate 2000000 -o/home/jerry/kdenlive/screen_capture/capture.ogv --delay 5
                      Last edited by GreyGeek; Sep 16, 2013, 07:22 PM.
                      "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


                        #12
                        VLC - Jack of all trades...

                        It seems that: Jack of all trades, master of none



                        The VLC can capture the audio:

                        vlc -H:
                        ...
                        --input-slave <string> Input slave (experimental)
                        This allows you to play from several inputs at the same time. This feature is
                        experimental, not all formats are supported. Use a '#' separated list of inputs.
                        ...
                        =>

                        With the command:
                        Code:
                        vlc screen:// --screen-fps=25 --input-slave pulse://alsa_output.pci-0000_00_14.2.analog-stereo.monitor --sout '#transcode{vcodec=h264,acodec=mp3,audio-sync}:file{dst="/home/rog132/Test.mp4"}'
                        The VLC captures the screen to the file with the sound but:

                        - if you need the cli - why not use the ffmpeg et.alt.
                        - the mouse pointer is missing.
                        - the sound is not sync with the video.

                        The audio device can be found: vlc > view > playlist > Devices > Audio capture...

                        A good place to start: Topic: Top 20 Kubuntu FAQs & Answers
                        Searching FAQ's: Google Search 'FAQ from Kubuntuforums'

                        Comment

                        Working...
                        X