cytopia / cytopia/ffscreencast
ffscreencast 2.0 rewrite and brainstorm proposal/discussion.
- Dominant language
- Shell
- Stars
- 1.8k
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
# ffscreencast 2.0 rewrite and brainstorm
I have noticed that there are quite some limitations on the existing `ffscreencast` implementation,
some bugs that are hard to fix, options that are not as self-explanatory as I have hoped and
the code is currently hard to maintain.
That is the reason I will do a complete rewrite from scratch.
## What must be done?
1. Separate linux and osx versions for better maintainability
2. Restructure command line arguments for easier usage
3. Address current bugs
4. Add more features (streaming, camera positions/resolutions, etc)
I will first work on the linux version `ffscreencast-linux` and once done start with osx `ffscreencast-osx`.
Furthermore I hope I can finally also get the `BSD` version done afterwards.
## Get involved and give feedback
I will address features and commandline arguments below as far as I have thought them through.
Nothing is fix yet, so I rely on your feedback to suggest improvements.
The goal is to have a really easy-to-use command line version of a screen-recorder with many options
that are compatible with other GUI implementations.
So if you like this idea, do comment and let me know.
I want the rewrite to be completely thought through and planned, before I am going to start working
on it.
## ffscreencast-linux proposal
### Features
This is the current feature list that I have thought about. Let me know about anything else
you want to be added to the list.
* record whole desktop, specific monitor, specific window or a selected area
* specify to record cursor or not
* have different audio input source (e.g.: pulse)
* be able to align camera overlay to any desired position
* be able to scale camera resolution overlay
* scale output video during recording
* output video to file or directly to a network stream
### Command line options
This is a first draft showing the possible command line arguments:
#### 1. Input arguments
##### 1.1 Video
```
--ivideo source Either 'desktop', 'monitor', 'window', or 'area'
Defaults to 'desktop'
--ivideo monitor When using 'source monitor', specify the monitor
number to record.
Defaults to first found monitor
--ivideo frame Input video framerate.
Defaults to 30
--ivideo cursor Capture mouse cursor? 'yes' or 'no'.
Defaults to 'no'
```
##### 1.2 Audio
```
--iaudio dev Will record audio with the given device number.
Defaults to first audio device found.
If this option is omitted, no audio will be recorded.
--iaudio format Audio input format (e.g.: alsa)
--iaudio source Audio input source (e.g.: pulse)
--iaudio channel Audio channels to record (e.g.: 1 or 2)
Defaults to 2
```
##### 1.3 Camera
```
--icam dev Will enable camera overlay with the given camera device number.
Defaults to first camera device found.
If this option is omitted, no camera will be recorded.
--icam pos Sets the camera position.
Supported values:
Defaults to 'right' 'bottom'
--icam pad Sets the camera padding from the nearest edge.
In case of 'center' it will pad from the right or bottom.
Format: --icam pad 10x10
Defaults to '0x0'
--icam res Scales the camera resultion to the supplied value.
Format: --icam res "640x480"
Format keep height: --icam res "320x-1"
Format keep width : --icam res "-1x480"
Defaults to the highest supported camera resolution.
```
#### 2. Output encoding
##### 2.1 Video
```
--ovideo codec Video output format.
Defaults to 'libx264'
--ovideo res Scale down the output resolution.
Defaults to video input resolution.
Format: --ovideo res 960x540
Format keep height: --ovideo res 960x-1
Format keep width: --ovideo res -1x540
--ovideo args Additional output encoding arguments to pass to ffmpeg.
Defaults to: '-crf 20 -preset veryfast -minrate 150l -maxrate 500k'
```
##### 2.2 Audio
```
--oaudio acodec Audio output format.
Defaults to 'libfaac'
--oaudio freq Audio frequency.
Defaults to 44100
--oaudio bitrate Audio bitrate.
Defaults to 96000
```
#### 3. Output
```
--output type Output to file or to network stream.
Values: 'file' or 'stream'
Defaults to 'file'
--output container Output container format to use.
Defaults to 'mkv'
--output file Output file.
Defaults to ~/Desktop/ScreenCast-YY-mm-dd__HH-mm-ss.ext
Only applicable when output type == file
--output stream-proto Stream output protocol to stream to.
Values: 'tcp' or 'udp'.
Only applicable when output type == stream
--output stream-addr Stream output IP address or hostname to stream to.
Format: --output stream-addr 192.168.0.1
Format: --output stream-addr host1.example.tld
Only applicable when output type == stream
--output stream-port Stream output port to stream to.
Format: --output stream-port 5891
--output stream-meta Stream metadata to include in stream.
Example: 'streamName=my-twich-channel'
```
#### 4. Config arguments
```
--config Specify to load configuration from config file instead of
having to specify them via command line arguments.
Default config with default argument values will be in
~/.config/ffscreencast/default.conf
Let's you easily create multiple configs for different occasions:
ffscreencast --config ~/.config/ffscreencast/twitch-stream.conf
ffscreencast --config ~/.config/ffscreencast/grab-desktop.conf
```
#### 5. Misc arguments
I will also include the current arguments for:
```
--dry Show ffmpeg command from specified options
--list List all monitor, audio and camera devices
--slist List monitor devices
--alist List audio devices
--clist List camera devices
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing ffscreencast implementation and the proposed ffscreencast-linux entry point, then compare the current command-line arguments with the listed Linux requirements. The work is done only when the rewrite scope and design are settled and the Linux version covers the stated recording, camera, audio, output, configuration, and device-listing features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- audio-video-rtc, cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100