项目作者: Rafostar

项目描述 :
Universal screen recorder powered by GStreamer
高级语言: JavaScript
项目地址: git://github.com/Rafostar/gst-rec.git
创建时间: 2019-06-17T19:15:03Z
项目社区:https://github.com/Rafostar/gst-rec

开源协议:MIT License

下载


gst-rec

License
Downloads
Donate
Donate
Twitter

Universal screen recorder powered by GStreamer

Installation

  1. sudo npm install -g gst-rec

Requires GStreamer-1.0 with gst-launch-1.0 binary and following GStreamer1 plugins: base, good, bad, ugly.

Usage

The application is intended for use from terminal with gst-rec command.

With default configuration gst-rec will record desktop and save it to /tmp directory. Default configuration can be overwritten by ~/.config/gst-rec.json config file.

Examples

  1. # Record 25 fps video and scale it to HD resolution:
  2. gst-rec --video width=1280,height=720,fps=25,scaling=true
  3. # Change encoding preset, video container, output file location and set custom filename:
  4. gst-rec --preset ultrafast --format mp4 --file 'dir=/my/custom/path,name=My Awesome Recording'
  5. # Record desktop with audio from pulseaudio sink:
  6. gst-rec --audio device=alsa_output.pci-0000_00_01.1.hdmi-stereo.monitor
  7. # Show list of system audio devices:
  8. gst-rec --list-audio-devices
  9. # Record to `~/Videos` directory as MP4 file with AAC audio from dev0:
  10. gst-rec --audio device=dev0,encoder=faac --format mp4 --file dir=~/Videos
  11. # Run GStreamer tcp server to allow connecting from multiple devices:
  12. gst-rec --output server --server host=127.0.0.1,port=8080
  13. # Create http server in addition to tcp server for devices that only support it:
  14. gst-rec --output server --server port=8080 --http-port 8081
  15. # Send scaled video output to `stdout` and receive it through `ffplay`:
  16. gst-rec --video width=960,height=540,fps=30,scaling=true -o - | ffplay -fflags nobuffer -
  17. # Run with default options, ignoring custom config file:
  18. gst-rec --ignore-config
  19. # Stream desktop to Chromecast using `castnow`:
  20. gst-rec -o - | castnow --quiet -
  21. # Stream desktop with audio to Chromecast:
  22. gst-rec --audio device=dev0,encoder=lamemp3enc -o - | castnow --quiet -
  23. # Alter default configuration and display it in JSON format (can be placed in config file):
  24. gst-rec --preset superfast --video width=1280,height=720,fps=25,scaling=true --show-config
  25. # Create new config file with default values:
  26. gst-rec --ignore-config --show-config > ~/.config/gst-rec.json

Run gst-rec --help for a list of all available options.

Donation

If you like my work please support it by buying me a cup of coffee :grin:

PayPal