forked from ammen99/wf-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for configuring audio codec and video framerate (ammen99#177)
* Add rough support for changing audio codecs * Updated README.md * Changed audio codec option to -C * Added rough implementation of audio codec, sample format, sample rate, and frame rate * Rewrote help documentation to reflect new options * Added fallback onto auto fmt, miscillanious fixes, broke something to be debugged soon * Fixed thing that gave confusing syntax error? * Fixed error output when user puts in invalid format; removed colon from format messages * Fixed typo in perenthesis; fixed some wildly inconsistent whitespace * Removed some commented out code * When given an invalid format, wf-recorder errors out instead of choosing alternative. Also made log output more descriptive when this happens * Finally got meson configuration options to work correctly * Made man page congruent with --help * Removed my references to default values, because the default values can be configured * Made default sample format use configured default sample format * Renamed DEFAULT_SAMPLE_FMT to FALLBACK_SAMPLE_FMT to reflect true purpose * Also give chosen sample format when it is automatically chosen * Copied the method get_codec_auto_sample_fmt appears to use to still work if it is not defined which sample formats a codec supports * Made logging of the sample format used when user specified more similar to the logging of the sample format automatically chosen * "video pixel format" -> "output video pixel format" in documentation * Code style and rebase fixes * Make audio options clearer to understand (acodec -> audio_codec) * Add missing --sample-format (-X) from help function * Change default sample rate to 48000 * Update manpage * Move duplicate code to function Co-authored-by: happysmash27 <[email protected]>
- Loading branch information
1 parent
b09c86f
commit bf161b4
Showing
10 changed files
with
194 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#pragma once | ||
|
||
#define DEFAULT_CODEC "@default_codec@" | ||
#define DEFAULT_FRAMERATE @default_framerate@ | ||
#define DEFAULT_AUDIO_CODEC "@default_audio_codec@" | ||
#define DEFAULT_AUDIO_SAMPLE_RATE @default_audio_sample_rate@ | ||
#define FALLBACK_AUDIO_SAMPLE_FMT "@fallback_audio_sample_fmt@" | ||
#mesondefine HAVE_PULSE | ||
#mesondefine HAVE_OPENCL | ||
#mesondefine HAVE_LIBAVDEVICE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
option('default_codec', type: 'string', value: 'libx264', description: 'Codec that will be used by default') | ||
option('default_framerate', type: 'integer', value: 60, description: 'Video framerate that will be used by default') | ||
option('default_audio_codec', type: 'string', value: 'aac', description: 'Audio codec that will be used by default') | ||
option('default_audio_sample_rate', type: 'integer', value: 48000, description: 'Audio sample rate that will be used by default') | ||
option('fallback_audio_sample_fmt', type: 'string', value: 's16', description: 'Fallback audio sample format that will be used if wf-recorder cannot determine the sample formats supported by a codec') | ||
option('pulse', type: 'feature', value: 'auto', description: 'Enable Pulseaudio') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.