Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
screencapture [2015/06/29 04:34]
slackermedia
screencapture [2021/06/03 19:48] (current)
Line 1: Line 1:
-[[{arrowp.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​left:​0;​}rosegarden|]] 
  
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​margin-left:​2.5em;​}screenwriter|]] 
  
 ====== Screen Capture ====== ====== Screen Capture ======
Line 10: Line 8:
 ===== FFmpeg ===== ===== FFmpeg =====
  
-my command here+[[http://​ffmpeg.org|Ffmpeg]] is a versatile video engine. You should have installed it when setting up Slackermedia;​ if not, read the section on how to do a proper Slackermedia [[ffmpeginstall|FFmpeg Install]], and the basic overview of its usage in the [[ffmpeg]] section.
  
 +Ffmpeg should have had [[kernel|setcap]] permission granted to it so that its attempt to capture activity in realtime is not squelched by the kernel.
  
-===== FFmpeg & Mplayer =====+Just as ffmpeg can capture input from webcams or existing movie streams, it can also capture the video display of your computer:
  
-User ''​rowinggolfer'' ​devised this hybrid method ​of not only capturing ​the screen, but also super-imposing and in-setting video from webcam ​to achieve ​live picture-in-picture mode.+<​code>​ 
 +$ ffmpeg -f x11grab -an -s hd1080 -r 25 \ 
 +-v:b 23000 -i :0.0 -g 1 -q:v 0.1 \ 
 +-vcodec libxvid screenCapture1.mp4 
 +</​code>​ 
 + 
 +This translates to: 
 + 
 +  * ''​-f x11grab'' ​sets the input format to x11grab, in absence ​of a video stream of a more traditional format 
 +  * ''​-an''​ means it will not capture audio 
 +  * ''​-s hd1080''​ captures HD video (1920x1080) 
 +  * ''​-r 25''​ sets frame rate to 25 
 +  * ''​-v:​b 23000''​ sets the video bitrate to 23Mbps 
 +  * ''​-i :​0.0''​ points the input the first monitor of your computer 
 +  * ''​-g 1''​ sets the group of pictures to 1, a very high setting, resulting in a large file 
 +  * ''​-q:​v 0.1''​ sets compression quality to very high 
 +  * ''​-vcodec''​ sets the video codec for output to use libxvid, ​good open source codec 
 +  * ''​screenCapture1.mp4''​ sets the filename of the ouput file 
 + 
 +The resulting file is a large, unwieldy video of whatever was happening on the screen from the start of the command up until it is terminated with ''​ctrl''​ ''​c''​.  
 + 
 +Probably, you will need to compress the video later, but this can be done with either [[ffmpeg2theora]] or [[ffmpeg]]. 
 + 
 + 
 +To capture the screen plus audio, you must know what audio device you want to record. This can often be frustrating process, and is best done [[linuxaudio|as a separate exercise]]. That is, figure out your audio setup, determine what device that the computer sees maps to which peripheral you have connected to the physical box, and then go about recording the screen with audio armed with your knew understanding of how your computer names its audio devices.
  
-Start the webcam in non-intrusive frame. mplayer fits the bill here.+Once you are ready, ​command like this should do nicely:
  
 <​code>​ <​code>​
-$ mplayer ​-cache 128 -tv driver=v4l2:width=320:height=240 ​-vo xv tv://foo+ffmpeg ​-f alsa -i hw:2 -f x11grab -s hd1080 \ 
 +-r 25 -v:b 21000 -:0.0 -g 1 -q:v 0.1 \ 
 +-vcodec libxvid output.mp4
 </​code>​ </​code>​
  
-When that window appears, resize it, place it where you find least intrusive, and set it to remain "on top" by right-clicking ​the title bar blah blah+It's basically the same command as abovebut this time one of the input formats is set to ''​alsa'' ​and an input device is set to ''​hw:​2'',​ which maps in the physical world (in this real-life example) to an external USB microphone headset.
  
 +The result is a large file with both video and audio.
  
-In another terminal, do this 
  
-~$ ffmpeg -f oss -i /dev/dsp -f x11grab -s xga -r 15 -i :0.0 out.mp4+==== FFmpeg & Mplayer ====
  
 +User ''​rowinggolfer''​ and Linux blog [[http://​linuxbookpro.com]] devised a hybrid method of not only capturing the screen, but also super-imposing and in-setting video from a webcam to achieve a live picture-in-picture mode.
  
-Record ​your screencast.+First, start Mplayer to capture input from your webcam in a relatively small window to achieve the picture-in-picture look:
  
-hit q in the second terminal when you are finished.+<​code>​ 
 +$ mplayer tv:// -tv driver=v4l2:​width=320:​height=240:​device=/​dev/​video0 -vo xv -noborder -geometry 100%:100% -ontop 
 +</​code>​
  
-If this works.. replace ​out.mp4 ​with whatever format or stream you wish to create.+When that window appears, ''​alt''​-click on it and drag it to where you want it on your screen. 
 + 
 +<WRAP tip> 
 +If you would rather have a border on the window, omit the ''​-noborder''​ switch from the commandPosition the screen and then right-click on the window'​s title bar and hide the border. 
 +</​WRAP>​ 
 + 
 +In a separate terminal, start ffmpeg: 
 + 
 +<​code>​ 
 +$ ffmpeg -f oss -i /dev/dsp -f x11grab -s hd1080 -r 25 -i :0.0 out.mp4 
 +</​code>​ 
 + 
 +Record your screencast.
  
  
 ===== RecordMyDesktop ===== ===== RecordMyDesktop =====
  
-THere are two versions: Record my desktop ​and Qrecordmy deskteop+There are two versions ​of RecordMyDesktop;​ the terminal command ''​recordmydesktop'' ​and the GUI frontend, **qt-recordmydeskteop**. The latter is just a frontend to the first, so the basic functionality is exactly the same.
  
 +==== Install ====
 +
 +Install the terminal command and, optionally, the frontend from [[http://​slackbuilds.org]]. If you have already installed [[kdenlive]] then you may already have these installed, as they are soft-dependencies for that.
 +
 +==== Usage ====
 +
 +Start ''​recordmydesktop''​ from the terminal, or ''​qt-recordmydesktop''​ from the **K Menu**.
 +
 +Recordmydesktop has the ability to use either ALSA or JACK as its audio input, meaning that it's a great choice if you're capturing a musical performance or tutorial.
 +
 +[{{ qtrecordmydesktop.jpg?​666 | The qt-recordmydesktop interface. }}]
 +
 +Two things to keep in mind:
 +
 +  * If you want your video to sync up with sound, use either **24** or **25** frames per second.
 +  * Generally, ''​compress on the fly''​ is a bad option to use, so avoid that unless your computer is very powerful, or you simply haven'​t got the harddrive space for a full-quality video to be saved onto it even temporarily.
 +
 +By default, the whole screen is recorded. If you don't need or want the whole screen to be recorded, you can set a specific area.
 +
 +Click the **Select Window** button in the **qt-recordmydesktop** control panel.
 +Click and drag on the preview window to set the "​hot"​ area.
 +
 +[{{ qtrecordmywindow.jpg | Capture a portion of your screen. }}]
 +
 +After capture, ''​recordmydesktop''​ will compress your video for you, and it usually does a good job of it. If you're unhappy with the results, you can try your hand at compressing the source video yourself using [[ffmpeg2theora]] or [[ffmpeg]].
  
 <WRAP tip> <WRAP tip>
 **See Also** \\ **See Also** \\
-Ffmpeg \\ +[[ffmpeg|Ffmpeg]] \\ 
-Open Broadcast Studio (OBS) \\ +[[obs|Open Broadcast Studio (OBS)]]
-Snowmix+
 </​WRAP>​ </​WRAP>​
  
  
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​float:​right;​}screenwriter|]][[{arrowp.png|border:​0;​background:​none;​width:​0;​float:​right;​}rosegarden|]]+<WRAP centeralign>​ 
 +<wrap fa>[[samplv1|R]]</​wrap>​ <wrap fa>[[start|S]]</​wrap>​ <wrap fa>​[[screenwriter|Q]]</​wrap>​ 
 +</​WRAP>​