Add support for FLAC audio codec
PR #4410 <#https://github.com/Genymobile/scrcpy/pull/4410> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
12
doc/audio.md
12
doc/audio.md
@@ -62,12 +62,13 @@ scrcpy --audio-source=mic --no-video --no-playback --record=file.opus
|
||||
|
||||
## Codec
|
||||
|
||||
The audio codec can be selected. The possible values are `opus` (default), `aac`
|
||||
and `raw` (uncompressed PCM 16-bit LE):
|
||||
The audio codec can be selected. The possible values are `opus` (default),
|
||||
`aac`, `flac` and `raw` (uncompressed PCM 16-bit LE):
|
||||
|
||||
```bash
|
||||
scrcpy --audio-codec=opus # default
|
||||
scrcpy --audio-codec=aac
|
||||
scrcpy --audio-codec=flac
|
||||
scrcpy --audio-codec=raw
|
||||
```
|
||||
|
||||
@@ -80,7 +81,14 @@ then your device has no Opus encoder: try `scrcpy --audio-codec=aac`.
|
||||
For advanced usage, to pass arbitrary parameters to the [`MediaFormat`],
|
||||
check `--audio-codec-options` in the manpage or in `scrcpy --help`.
|
||||
|
||||
For example, to change the [FLAC compression level]:
|
||||
|
||||
```bash
|
||||
scrcpy --audio-codec=flac --audio-codec-options=flac-compression-level=8
|
||||
```
|
||||
|
||||
[`MediaFormat`]: https://developer.android.com/reference/android/media/MediaFormat
|
||||
[FLAC compression level]: https://developer.android.com/reference/android/media/MediaFormat#KEY_FLAC_COMPRESSION_LEVEL
|
||||
|
||||
|
||||
## Encoder
|
||||
|
||||
@@ -18,7 +18,8 @@ To record only the audio:
|
||||
```bash
|
||||
scrcpy --no-video --record=file.opus
|
||||
scrcpy --no-video --audio-codec=aac --record=file.aac
|
||||
# .m4a/.mp4 and .mka/.mkv are also supported for both opus and aac
|
||||
scrcpy --no-video --audio-codec=flac --record=file.flac
|
||||
# .m4a/.mp4 and .mka/.mkv are also supported for opus, aac and flac
|
||||
```
|
||||
|
||||
Timestamps are captured on the device, so [packet delay variation] does not
|
||||
@@ -35,6 +36,7 @@ client side. Several formats (containers) are supported:
|
||||
- MP4 (`.mp4`, `.m4a`, `.aac`)
|
||||
- Matroska (`.mkv`, `.mka`)
|
||||
- OPUS (`.opus`)
|
||||
- FLAC (`.flac`)
|
||||
|
||||
The container is automatically selected based on the filename.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user