Skip to content

FFmpeg-based screen capturing script for X11 with Pulse/ALSA-support for audio

License

Notifications You must be signed in to change notification settings

leveled-up/x11-capture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Screen cast capturing script for X11 and Pulse/ALSA

With this script you can easily capture your screen including audio played by applications on a Linux distro currently using X11 and Pulse/ALSA.

Usage

$ ./capture.sh
Available audio devices:
    index: 1
    name: <alsa_output.pci-0000_00_10.3.analog-stereo>
Current audio device: alsa_output.pci-0000_00_10.3.analog-stereo.monitor (#0)
Tip: Change using 'pacmd set-default-sink SINK'
Device volume (%): 76
Screen size: 1920x1080
Output file: /home/myuser/capture-YYYYMMDD-HHMMSS.mkv
Select framerate [10]: 
Framerate: 10
Set video scaling (disable with 0) [720:-1]: 
Video scaling: 720:-1
Set audio scaling (disable with 0) [1]: 20
Audio scaling enabled: x20
Select constant rate factor [15]: 
Constant rate factor: 15
Select video codec [libx264]: 
Video codec: libx264
Select audio codec [aac]: 
Audio codec: aac
Select tune (0 to disable) [stillimage]: 
Tuning video for: stillimage

[Enter] Start recording  //  [Ctrl-C] Abort  //  [q] End recording

Requirements

  • run on bash shell
  • ffmpeg installed
  • for recording without playback: module snd_aloop loaded
  • pulse CLI available

Ubuntu 21.10 and higher

Select Ubuntu on XOrg during login in order to start GUI on X11 instead of unsupported Wayland, otherwise the script will fail with x11 needed.

Acknowledgements

About

FFmpeg-based screen capturing script for X11 with Pulse/ALSA-support for audio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages