• Stars
    star
    1,742
  • Rank 26,723 (Top 0.6 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ffscreencast - ffmpeg screencast/desktop-recording with video overlay and multi monitor support

ffscreencast

Features | Installation | Usage | Screenshots | FAQ | Todo | Contribution | License | Version | Awesome

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Type

About

ffscreencast is a shell wrapper for ffmpeg that allows fool-proof screen recording via the command line. It will auto-detect all available monitors, cameras and microphones and is able to interactively or manually choose the desired recording device(s). Additionally ffscreencast will let you overlay the camera stream on top of the desktop session.

Besides that ffscreencast can act as an ffmpeg command generator. Every available option can also just show the corresponding ffmpeg command instead of executing it. Non-ffmpeg commands, such as how the camera resolution is pulled and others can also be shown instead of being executed.

Screencast

Supported platforms

OSX Linux FreeBSD Windows
OSX Linux FreeBSD Windows
via AVFoundation via x11grab coming soon coming soon

Requirements

Program Required Description
bash yes The whole script is written in bash and might not be 100% Posix compliant
ffmpeg yes The ffmpeg binary must be present
v4l2-ctl Linux Required for linux to list camera devices
arecord Linux Required for linux to list sound devices
xdpyinfo Linux Required for linux to list screends

1. Features

  • Config file for default configuration
  • Screen recording
  • Camera overlay
  • Audio support
  • Allows to manually (parameter) or interactively choose monitor
  • Allows to manually (parameter) or interactively choose camera
  • Allows to manually (parameter) or interactively choose sound device
  • ffmpeg command generation

2. Installation

2.1 OSX

brew install cytopia/tap/ffscreencast

2.2 Linux/BSD

git clone https://github.com/cytopia/ffscreencast
cd ffscreencast
sudo cp bin/ffscreencast /usr/local/bin

3. Usage

3.1 Overview

To simply start desktop recording your screen call the program without any arguments ffscreencast and it will use the default screen without camera overlay and without sound.

$ ffscreencast

Usage: ffscreencast [-s[num]] [--sargs=] [-a[num]] [--aargs=] [-c[num] [--cargs=] [--oargs=] [-e<ext>] [--dry]
       ffscreencast --slist [--dry]
       ffscreencast --alist [--dry]
       ffscreencast --clist [--dry]
       ffscreencast --help
       ffscreencast --version
       ffscreencast --test

When invoked without any arguments, it will start screen recording
on the default screen without sound and without camera overlay.

Input options:
-s[num]           (Default) Enable screen capturing [with device number X].
                  If no device number is specified it will use the default, if only
                  one device is present, otherwise it will ask you to choose one
                  Use: -s or -s1

--sargs=          Additional screen arguments.
                  Specify additional ffmpeg arguments for the screen input device.
                  Use: --sargs="-framerate 30"
                  Default: ''

-a[num]           Enable audio capturing [with device number X]
                  If no device number is specified it will use the default, if only
                  one device is present, otherwise it will ask you to choose one
                  Use: -a or -a1

--aargs=          Additional audio arguments.
                  Specify additional ffmpeg arguments for the audio input device.
                  Use: --aargs="-ac 1"
                  Default: '-ac 2'

-c[num]           Add camera overlay [with device number X]
                  If no device number is specified it will use the default, if only
                  one device is present, otherwise it will ask you to choose one
                  Use: -c or -c1

--cargs=          Additional camera arguments
                  Specify additional ffmpeg arguments for the camera input device.
                  Use: --cargs="-video_size 1280x720"
                  Default: ''


Output options:
-e<ext>           Output video format extension (Default: mkv)
                  E.g.: -emkv, or -eavi, or -emp4

-oargs=           Additional output arguments
                  Specify additional ffmpeg arguments for the output encoding.
                  Use: --oargs="-crf 0"
                  Default: '-crf 0 -preset ultrafast'


Behavior options:
--dry             Show the command (without executing)


List options:
--list            List all devices
--slist           Only list screen capturing devices (monitors)
--alist           Only list audio capturing devices (microphones)
--clist           Only list camera capturing devices (cams)


System information:
--help            Show this help screen
--version         Show version information
--test            Test requirements

The num (device numbers) can be omitted. If there is only one device of its type available, ffscreencast will automatically default to this device, otherwise it will ask interactively which device to use for recording.

3.2 Examples

Do a screencast on the default screen (without explicitly choosing the monitor)

$ ffscreencast

List monitors and record on monitor 2 (Capture screen 0)

$ ffscreencast --slist
Available screen recording devices (monitors):

[2] Capture screen 0    Color LCD: Resolution: 2880 x 1800 Retina
[3] Capture screen 1    S2431W: Resolution: 1920 x 1200
[4] Capture screen 2    Thunderbolt Display: Resolution: 2560 x 1440


$ ffscreencast -s2

List cameras

Start a screencast with camera overlay (only one camera present)

$ ffscreencast -c

or select the camera device

$ ffscreencast -c0

Show the ffmpeg command for camera recording

$ ffscreencast -c --dry

ffmpeg -hide_banner -loglevel info -f avfoundation   -i "1" -f avfoundation  -i "0" -c:v libx264 -crf 0 -preset ultrafast -filter_complex 'overlay=main_w-overlay_w-10:main_h-overlay_h-10' "/Users/cytopia/Desktop/Screencast 2015-10-06 at 21.28.01.mkv"

4. Screenshots

Showing screen recording with and without camera overlay.

Screencast Screencast

5. FAQ

This section will be updated whenever questions arise that are worth mentioning here

5.1 How to convert to other formats?

There is currently no built-in gif support, mainly because it will not produce such a good quality. It is recommended to first create your screencast with the best possible quality and least possible resources (you are obviously going to do something and will not want to consume all your cpu for the encoding) and afterwards convert it to a high quality gif or other formats.

See contrib for converters and feel free to add more.

5.2 How to enable cursor capturing on OSX?

By default ffmpeg on OSX (using AVFoundation) does not capture the mouse (on Linux it does). You can however pass this as a custom option to ffscreencast

In order to capture the mouse pointer itself add the following --sargs:

ffscreencast --sargs="-capture_cursor 1"

If you also want to see when you actually click the mouse, do it like this:

ffscreencast --sargs="-capture_cursor 1 -capture_mouse_clicks 1"

5.3 How to hide the cursor on Linux/BSD?

By default ffmpeg on Linux/BSD (using x11grab) does show the mouse pointer by default (OSX does not). You can however pass this as a custom option to ffscreencast in order to hide the mouse pointer:

ffscreencast --sargs="-draw_mouse 0"

5.4 How to alter the default options (config file)?

When you run ffscreencast for the first time, it will create a configuration file in ~/.config/ffscreencast/ffscreencastrc. Everything specified in this file will be applied when you run ffscreencast without any arguments. So if you have your own nice defaults you always need to enter, you can simply add them to the config file.

6. Todo

6.1 Bugs

  • General: Sound is still behind one second when using camera overlay
  • OSX: USB Monitors (see #1)

6.2 Enhancements

  • BSD: Support for [Free]BSD (needs testing)
  • Windows: Support for Windows (via cygwin and dshow)
  • Linux: set sound options via cmd (alsa vs pulse)
  • Linux: Get default resolution/framerate for camera
  • OSX: Get default resolution/framerate for camera
  • General: Set camera resolution via cmd use --cargs
  • General: Set camera position via cmd
  • General: Be able to record one or multiple screens (monitors)

7. Contribution

Contributors are welcome.

8. License

license

9. Version

For a complete list of verion see CHANGELOG

10. Awesome

Added by the following Awesome lists:

More Repositories

1

devilbox

A modern Docker LAMP stack and MEAN stack for local development
PHP
4,153
star
2

pwncat

pwncat - netcat on steroids with Firewall, IDS/IPS evasion, bind and reverse shell, self-injecting shell and port forwarding magic - and its fully scriptable with Python (PSE)
Shell
1,624
star
3

linux-timemachine

Rsync-based OSX-like time machine for Linux, MacOS and BSD for atomic and resumable local and remote backups
Shell
674
star
4

awesome-ci

Awesome Continuous Integration - Lot's of tools for git, file and static source code analysis.
Shell
322
star
5

badchars

Bad char generator to instruct encoders such as shikata-ga-nai to transform those to other chars.
Python
221
star
6

docker-ansible

Alpine-based multistage-build version of Ansible for reproducible usage in CI
Makefile
188
star
7

urlbuster

Powerful mutable web directory fuzzer to bruteforce existing and/or hidden files or directories.
Python
152
star
8

mysqldump-secure

[sh] Encrypted mysqldump script with compression, logging, blacklisting and Nagios/Icinga monitoring integration
Shell
141
star
9

thunar-custom-actions

Custom actions for Thunar (or Nautilus) File manager
Shell
135
star
10

ansible-debian

Buildfiles: Ansible automated leight-weight and sensible Debian provisioning
Jinja
86
star
11

smtp-user-enum

SMTP user enumeration via VRFY, EXPN and RCPT with clever timeout, retry and reconnect functionality.
Python
83
star
12

coinwatch

Coinmarketcap console client to keep track of your crypto currency trades - are you winning or losing?
Python
78
star
13

docker-bind

Bind (bind9) caching DNS server on Alpine or Debian with wild-card domain support [multi-arch]
Shell
77
star
14

docker-terraform-docs

Alpine-based multistage-build version of terraform-docs and terraform-docs-replace in multiple versions to be used for CI and other reproducible automations
HCL
60
star
15

crawlpy

Scrapy python crawler/spider with post/get login (handles CSRF), variable level of recursions and optionally save to disk
Python
55
star
16

aws-export-profile

Export AWS profiles to your shell environment
Shell
46
star
17

docker-dvwa

Docker Compose setup for DVWA with all available PHP versions
Makefile
44
star
18

ansible-role-cloudformation

Ansible role to render an arbitrary number of Jinja2 templates into cloudformation files and create any number of stacks.
Python
43
star
19

aws-export-assume-profile

Export AWS profiles to your shell environment
Shell
41
star
20

i3blocks-modules

Custom modules for i3blocks status bar
Shell
40
star
21

docker-terragrunt

Alpine-based multistage-build version of Terragrunt and Terraform for reproducible usage in CI
Makefile
40
star
22

fuzza

Customizable TCP fuzzing tool to test for remote buffer overflows.
Python
32
star
23

docker-yamllint

Alpine-based multistage-build of yamllint for reproducible usage in CI
Makefile
30
star
24

autorunner

Configurable and notification aware autostart helper for minimalistic window managers like i3, openbox and others
Shell
29
star
25

check_drupal

[sh] Nagios drupal plugin to monitor the state of a drupal site (or multisite) for security updates, core errors and more
Shell
27
star
26

ansible-role-k8s

This role render an arbitrary number of Jinja2 templates and deploys or removes them to/from Kubernetes clusters.
Python
26
star
27

redmine-like-a-boss

[sh] Simple redmine installation with plugins and themes
Shell
25
star
28

makefiles

Makefile
25
star
29

linkcheck

Search for URLs in files (optionally limited by extension) and validate their HTTP status code
Shell
23
star
30

aws-ec2-sg-exporter

A dockerized Prometheus exporter that compares desired/wanted IPv4/IPv6 CIDR against currently applied inbound CIDR rules in your security group(s).
Shell
22
star
31

kusanagi

Kusanagi is a bind and reverse shell payload generator with obfuscation and badchar support.
Python
21
star
32

metrics-server-prom

Prometheus adapter to scrape from Kubernetes metrics-server
Python
21
star
33

docker-black

Alpine-based multistage-build version of Python Black for reproducible usage in CI
Roff
20
star
34

ansible-modules

Custom ansible modules
Python
18
star
35

terraform-aws-iam

This Terraform module manages AWS IAM to its full extend.
HCL
18
star
36

dotfiles

dotfiles
Shell
17
star
37

docker-phpcs

Alpine-based multistage-build version of phpcs for reproducible usage in CI
Makefile
16
star
38

kali-openbox-menu

Kali-Linux menu for openbox
16
star
39

docker-php-cs-fixer

Alpine-based multistage-build version of php-cs-fixer for reproducible usage in CI
Makefile
16
star
40

git-rewrite-author

[sh] Rewrite git author and committer history (locally and remotely)
Shell
16
star
41

docker-ansible-lint

Alpine-based multistage-build version of ansible-lint for reproducible usage in CI
Makefile
14
star
42

nginx-certwatch

[sh] certwatch cron implementation for nginx vhosts
Shell
13
star
43

awesome-nagios-plugins

A curated list of awesome nagios plugins
13
star
44

docker-file-lint

Alpine-based Docker image to perform generic file checks on your source code in order to improve consistency within your repository (e.g. for easy usage in CI).
Shell
12
star
45

terraform-aws-route53-zone

A Terraform module that handles creation of multiple Route53 zones including attachment to new or existing delegation set
HCL
12
star
46

ansible-module-diff

Ansible module to diff strings, file contents or command outputs against each other
Python
11
star
47

slidocli

Command line utility to list available questions on sli.do and automatically upvote any question specified by their id.
Shell
11
star
48

yolo

discover new commands
Shell
10
star
49

docker-gofmt

Alpine-based multistage-build version of gofmt for reproducible usage in CI
Shell
9
star
50

header-fuzz

header-fuzz allows you to fuzz any HTTP header with a wordlist and evaluate success or failure based on the returning HTTP status code.
Shell
9
star
51

ultimate-shell-template

The ultimate shell template with optional GUI support
Shell
9
star
52

check_php

[sh] Nagios plugin for PHP to check for startup errors, missing modules, wrong php.ini configurations and PHP updates.
Shell
9
star
53

check_git

Nagios plugin to monitor the state of a git repository: clean, branch, tag, gpg verified etc
Shell
9
star
54

ansible-role-aws_account_match

Ansible safe-guard role to ensure you are currently using the correct AWS account(s)
9
star
55

docker-pylint

Alpine-based multistage-build version of pylint for reproducible usage in CI
Makefile
9
star
56

letsencrypt-watch

[sh] certwatch cron implementation for letsencrypt certificates
Shell
9
star
57

lsl

Colorful file labels for you terminal which are displayed in ls output.
Shell
8
star
58

docker-eslint

Alpine-based multistage-build version of eslint for reproducible usage in CI
Makefile
8
star
59

docker-yamlfmt

Alpine-based multistage-build version of yamlfmt for reproducible usage in CI
Makefile
8
star
60

docker-golint

Alpine-based multistage-build version of golint for reproducible usage in CI
Makefile
8
star
61

i3-utils-bin

Shell
7
star
62

docker-phplint

Alpine-based version of PHP for linting and reproducible usage in CI
Makefile
7
star
63

docker-linkcheck

Alpine-based multistage-build version of linkcheck for reproducible usage in CI
Makefile
7
star
64

docker-mypy

Alpine-based multistage-build version of Python mypy for reproducible usage in CI
Roff
6
star
65

terraform-aws-iam-cross-account

This Terraform module creates AWS cross-account assumable roles with multiple polcies to be specified via files
HCL
6
star
66

ansible-filter-get_attr

Ansible filter to have variable substitution in keys and values inside dictionaries
Python
6
star
67

docker-bandit

Alpine-based multistage-build version of bandit for reproducible usage in CI
Makefile
6
star
68

docker-terragrunt-fmt

Alpine-based multistage-build version of terragrunt-fmt to be used for CI and other reproducible automations
Shell
6
star
69

docker-jsonlint

Alpine-based multistage-build version of jsonlint with file globbing search for reproducible usage in CI
Makefile
6
star
70

docker-phpcbf

Alpine-based multistage-build version of phpcbf for reproducible usage in CI
Makefile
6
star
71

yii-check-translations

Shell script to check/validate yii translations in various folders
PHP
5
star
72

docker-goimports

Alpine-based multistage-build version of goimports for reproducible usage in CI
Shell
5
star
73

check_http_expect

[sh] Nagios plugin that will check a website (behind .htacess and/or behind POST login) for an expected string or regex expression.
Shell
5
star
74

vault-auto-unseal

HashiCorp Vault auto-unseal
Shell
5
star
75

jsparsy

Scan urls for javascript run-time errors
JavaScript
5
star
76

docker-checkmake

Alpine-based multistage-build version of checkmake for reproducible usage in CI
Makefile
5
star
77

dotfiles-kali

Shell
4
star
78

git-ids

Use git as an intrusion detection system for your servers
4
star
79

sweany

Sweany is a performance-orientated, self-validating and feature-rich MVC framework for PHP
PHP
4
star
80

terraform-aws-elb

This Terraform module creates an ELB with optionally a public and/or private Route53 DNS record attached to it.
HCL
4
star
81

docker-pycodestyle

Alpine-based multistage-build version of pycodestyle for reproducible usage in CI
Makefile
4
star
82

upload-artifact-verify-action

4
star
83

upload-artifact-retry-action

This action allows you to upload an artifact with retries in case the upload has failed. It wraps upload-artifact-verify-action and retries it
4
star
84

freebsd-tools

[sh] FreeBSD script collection
Shell
3
star
85

i3-utils

Some tools I use for my i3 setup
3
star
86

ecss

Exteended CSS (ECSS) is a preprocessor that easily adds constants and inheritance (single, multiple & recursive) as a language construct
PHP
3
star
87

docker-tag-action

GitHub Action to create Docker tag based on git branch or git tag
3
star
88

prometheus-redbox_exporter

Prometheus exporter that throws stuff to httpd endpoints and evaluates their response
Python
3
star
89

terraform-aws-rds

Remake of terraform-aws-modules/terraform-aws-rds without sub-modules
HCL
3
star
90

docker-pydocstyle

Alpine-based multistage-build version of pydocstyle for reproducible usage in CI
Makefile
2
star
91

asm

Assembly
2
star
92

git-tools

Shell
2
star
93

tools

Various cli tools
Shell
2
star
94

check_mysqldump-secure

[sh] Nagios Plugin to monitor mysqldump database backups
Shell
2
star
95

i3-utils-systemd

Makefile
2
star
96

docker-kubeval

Alpine-based multistage-build version of kubeval for reproducible usage in CI
Makefile
2
star
97

homebrew-tap

[ruby] Cytopia's homebrews
Ruby
2
star
98

download-artifact-retry-action

2
star
99

git-ref-matrix-action

This composite action creates a stringified JSON list of git refs to be used as a build matrix.
2
star
100

terraform-aws-iam-roles

This Terraform module creates an arbitrary number of IAM roles and policies/trusts to attach.
HCL
2
star