Make --audio-codec=raw the default
Encoding and decoding the audio stream adds latency, which is not ideal for real-time mirroring. PR #3757 <https://github.com/Genymobile/scrcpy/pull/3757>
This commit is contained in:
@@ -35,7 +35,7 @@ Default is 0 (no buffering).
|
|||||||
.BI "\-\-audio\-codec " name
|
.BI "\-\-audio\-codec " name
|
||||||
Select an audio codec (raw, opus or aac).
|
Select an audio codec (raw, opus or aac).
|
||||||
|
|
||||||
Default is opus.
|
Default is raw.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI "\-\-audio\-encoder " name
|
.BI "\-\-audio\-encoder " name
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ static const struct sc_option options[] = {
|
|||||||
.longopt = "audio-codec",
|
.longopt = "audio-codec",
|
||||||
.argdesc = "name",
|
.argdesc = "name",
|
||||||
.text = "Select an audio codec (raw, opus or aac).\n"
|
.text = "Select an audio codec (raw, opus or aac).\n"
|
||||||
"Default is opus.",
|
"Default is raw.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.longopt_id = OPT_AUDIO_CODEC_OPTIONS,
|
.longopt_id = OPT_AUDIO_CODEC_OPTIONS,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const struct scrcpy_options scrcpy_options_default = {
|
|||||||
#endif
|
#endif
|
||||||
.log_level = SC_LOG_LEVEL_INFO,
|
.log_level = SC_LOG_LEVEL_INFO,
|
||||||
.video_codec = SC_CODEC_H264,
|
.video_codec = SC_CODEC_H264,
|
||||||
.audio_codec = SC_CODEC_OPUS,
|
.audio_codec = SC_CODEC_RAW,
|
||||||
.record_format = SC_RECORD_FORMAT_AUTO,
|
.record_format = SC_RECORD_FORMAT_AUTO,
|
||||||
.keyboard_input_mode = SC_KEYBOARD_INPUT_MODE_INJECT,
|
.keyboard_input_mode = SC_KEYBOARD_INPUT_MODE_INJECT,
|
||||||
.mouse_input_mode = SC_MOUSE_INPUT_MODE_INJECT,
|
.mouse_input_mode = SC_MOUSE_INPUT_MODE_INJECT,
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ execute_server(struct sc_server *server,
|
|||||||
ADD_PARAM("video_codec=%s",
|
ADD_PARAM("video_codec=%s",
|
||||||
sc_server_get_codec_name(params->video_codec));
|
sc_server_get_codec_name(params->video_codec));
|
||||||
}
|
}
|
||||||
if (params->audio_codec != SC_CODEC_OPUS) {
|
if (params->audio_codec != SC_CODEC_RAW) {
|
||||||
ADD_PARAM("audio_codec=%s",
|
ADD_PARAM("audio_codec=%s",
|
||||||
sc_server_get_codec_name(params->audio_codec));
|
sc_server_get_codec_name(params->audio_codec));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class Options {
|
|||||||
private boolean audio = true;
|
private boolean audio = true;
|
||||||
private int maxSize;
|
private int maxSize;
|
||||||
private VideoCodec videoCodec = VideoCodec.H264;
|
private VideoCodec videoCodec = VideoCodec.H264;
|
||||||
private AudioCodec audioCodec = AudioCodec.OPUS;
|
private AudioCodec audioCodec = AudioCodec.RAW;
|
||||||
private int videoBitRate = 8000000;
|
private int videoBitRate = 8000000;
|
||||||
private int audioBitRate = 196000;
|
private int audioBitRate = 196000;
|
||||||
private int maxFps;
|
private int maxFps;
|
||||||
|
|||||||
Reference in New Issue
Block a user