mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Add recording to opus file
Use the FFmpeg opus muxer to record an opus file. PR #3978 <https://github.com/Genymobile/scrcpy/pull/3978>
This commit is contained in:
parent
d6bcde565f
commit
7321db6f28
3 changed files with 15 additions and 1 deletions
|
|
@ -1493,6 +1493,9 @@ get_record_format(const char *name) {
|
|||
if (!strcmp(name, "mka")) {
|
||||
return SC_RECORD_FORMAT_MKA;
|
||||
}
|
||||
if (!strcmp(name, "opus")) {
|
||||
return SC_RECORD_FORMAT_OPUS;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1986,6 +1989,13 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
|||
LOGE("Audio container does not support video stream");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (opts->record_format == SC_RECORD_FORMAT_OPUS
|
||||
&& opts->audio_codec != SC_CODEC_OPUS) {
|
||||
LOGE("Recording to OPUS file requires an OPUS audio stream "
|
||||
"(try with --audio-codec=opus)");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (opts->audio_codec == SC_CODEC_RAW) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue