screencast.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 28 Nov 2022 01:04:47 +0200
changeset 2541 c41a01871780
parent 2230 9e6ad6607a9e
permissions -rw-r--r--
About pacman.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 916
diff changeset
     1
.. -*- coding: utf-8; -*-
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
     2
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
     3
============
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
     4
 Screncast.
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
     5
============
912
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
     6
.. contents::
1905
fba288d59662 Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1635
diff changeset
     7
   :local:
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
914
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
     9
VLC.
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    10
====
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    11
::
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    12
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    13
  $ cvlc screen:// --screen-mouse-image cursor.png --screen-fps=12 \
916
f96040b5d018 Reindent code
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 915
diff changeset
    14
    --screen-width=1680 --screen-height=1050 --no-sout-audio --sout \
f96040b5d018 Reindent code
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 915
diff changeset
    15
    "#transcode{venc=theora,quality:10,scale=0.75,fps=12}:duplicate{dst=std{access=file,mux=ogg,dst=desktop.ogg}}}"
914
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    16
916
f96040b5d018 Reindent code
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 915
diff changeset
    17
  $ cvlc screen:// --screen-fps=12 --screen-mouse-image=e:/home/.icon/cursor.png --no-sout-audio --sout \
f96040b5d018 Reindent code
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 915
diff changeset
    18
    "#transcode{venc=x264,quality:100,scale=1,fps=12}:duplicate{dst=std{access=file,mux=mp4,dst=desktop.ogg}}}"
915
fab4d33f24c0 Add x264 example.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 914
diff changeset
    19
914
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    20
Available options:
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    21
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    22
``screen-caching <integer>``
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    23
  Time in milliseconds.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    24
``screen-fps <integer>``
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    25
  Capture frames per second (0 default).
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    26
``screen-top <integer>``
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    27
  The top edge coordinate of the subscreen.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    28
``screen-left <integer>``
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    29
  The left edge coordinate of the subscreen.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    30
``screen-width <integer>``
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    31
  The width of the subscreen.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    32
``screen-height <integer>``
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    33
  The height of the subscreen.
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    34
``screen-mouse-image <filename>``
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    35
  Mouse pointer image to use.
914
e6f53a520f24 VLC for screencast.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 913
diff changeset
    36
912
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
    37
vnc2flv.
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
    38
========
378
1aeb77e1b4be Added vnc2flv and ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 377
diff changeset
    39
1aeb77e1b4be Added vnc2flv and ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 377
diff changeset
    40
In order to rrecord require VNC server running on host.
1aeb77e1b4be Added vnc2flv and ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 377
diff changeset
    41
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    42
http://www.unixuser.org/~euske/python/vnc2flv/index.html
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    43
  home page
378
1aeb77e1b4be Added vnc2flv and ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 377
diff changeset
    44
1519
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    45
libav.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    46
======
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
    47
::
378
1aeb77e1b4be Added vnc2flv and ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 377
diff changeset
    48
1519
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    49
  $ sudo apt-get install libav-tools
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    50
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    51
  $ avconv -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    52
  $ avconv -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    53
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    54
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    55
ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    56
=======
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    57
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    58
Only video::
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    59
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    60
  $ ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    61
  $ ffmpeg -f x11grab -r 25 -s 1024x768 -i :0.0 out.mpg
378
1aeb77e1b4be Added vnc2flv and ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 377
diff changeset
    62
1519
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    63
Video with audio::
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    64
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    65
  $ ffmpeg -f oss -i /dev/audio -f x11grab -s cif -r 3 -ab 11 -i :0.0 out.mp4
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    66
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    67
Oprsions description:
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    68
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    69
* ``-r`` frames per second
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
    70
* ``-s`` resolution
1519
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    71
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    72
recordMyDesktop.
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
    73
================
1519
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    74
::
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1356
diff changeset
    75
1635
b2a2555a4368 recordMyDesktop.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1520
diff changeset
    76
  $ recordmydesktop --no-sound --windowid $(xwininfo | awk '/Window id:/ {print $4}')
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
    77
912
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
    78
Screenshort movies.
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
    79
===================
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    80
1356
6760780a620b Screenshort movie by mencoder.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    81
Screenshort movie by mencoder.
6760780a620b Screenshort movie by mencoder.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    82
------------------------------
6760780a620b Screenshort movie by mencoder.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    83
::
6760780a620b Screenshort movie by mencoder.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    84
6760780a620b Screenshort movie by mencoder.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    85
  $ mencoder "mf://*.jpg" -mf fps=30 -o output.avi
6760780a620b Screenshort movie by mencoder.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    86
1520
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    87
Screenshort movie by ffmpeg.
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    88
----------------------------
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    89
::
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    90
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    91
  mplayer -ao null -ss 0:0:33 -endpos 2 eagles.avi -vo jpeg:outdir=~/dir
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    92
  mplayer -ao null -ss 0:0:33 -endpos 2 eagles.avi -vo png:z=9:outdir=~/dir
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    93
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    94
Here:
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    95
2230
9e6ad6607a9e Fixed formatting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2228
diff changeset
    96
* ``-ss`` tells mplayer where you begin
9e6ad6607a9e Fixed formatting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2228
diff changeset
    97
* ``-endpos`` tells mplayer where to stop (minutes)
9e6ad6607a9e Fixed formatting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 2228
diff changeset
    98
* ``z=9`` sets compression level
1520
c029267830ff Screenshort movie by ffmpeg.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1519
diff changeset
    99
912
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
   100
ImageMagic and shell script.
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
   101
----------------------------
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
   102
::
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   103
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   104
  #!/bin/bash
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   105
  let iter=1
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   106
  while [ "$iter" -le "$stop" ]; do
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   107
    import $iter.png
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   108
    sleep 1
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   109
    let x+=1
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   110
  done
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   111
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   112
If you interesting in capturing specific window - by 'xwininfo' find,
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
   113
intereesting your window id (hex value) and use command::
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   114
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   115
  import -window $windowid $iter.png
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   116
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
   117
To quick view result run::
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   118
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   119
  $ cd $img_dir
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   120
  $ animate -delay 20 *.png
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   121
  ^C
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   122
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
   123
To compound image together::
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   124
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   125
  $ convert -delay 20 *.png capture.mng  # license free, multi-image file format
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   126
  $ convert -delay 20 *.png capture.gif
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   127
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
   128
You can add text to pictures before compound theirs::
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   129
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   130
  $ mogrify -fill yellow -draw 'Rectangle 10,10 150,30' -fill black -pointsize 14 \
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   131
     -draw 'text 15,25 "by http://example.com"' $iter.png
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   132
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   133
If screen capturing slow for you use MIFF file format.
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   134
913
f7cb11596372 Fix reStructedText error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 912
diff changeset
   135
Use root flag to capture all screen::
377
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   136
3716a7f903f0 About screen capturing.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   137
  $ import -window root $iter.png
379
4b3846dd6a01 Added link.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 378
diff changeset
   138
2228
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   139
http://linuxdevcenter.com/pub/a/linux/2004/03/04/screen_capture_movies.html
837f1337c59b Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1912
diff changeset
   140
  Making Screen-Capture Movies by Robert Bernier
912
b9eab34a4ce1 Take proper file name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 597
diff changeset
   141