Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions streamrip/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(
ffmpeg_arg: Optional[str] = None,
sampling_rate: Optional[int] = None,
bit_depth: Optional[int] = None,
copy_art: bool = True,
copy_art: Optional[bool] = None,
remove_source: bool = False,
show_progress: bool = False,
):
Expand Down Expand Up @@ -59,7 +59,7 @@ def __init__(
self.remove_source = remove_source
self.sampling_rate = sampling_rate
self.bit_depth = bit_depth
self.copy_art = copy_art
self.copy_art = getattr(type(self), "copy_art", True) if copy_art is None else copy_art
self.show_progress = show_progress

if ffmpeg_arg is None:
Expand Down Expand Up @@ -230,6 +230,7 @@ class Vorbis(Converter):
codec_name = "vorbis"
codec_lib = "libvorbis"
container = "ogg"
copy_art = False # OGG muxer doesn't support -c:v copy from FLAC/MP3 sources
default_ffmpeg_arg = "-q:a 6" # 160, aka the "high" quality profile from Spotify

def get_quality_arg(self, rate: int) -> str:
Expand All @@ -254,6 +255,7 @@ class OPUS(Converter):
codec_name = "opus"
codec_lib = "libopus"
container = "opus"
copy_art = False # Opus muxer doesn't support -c:v copy from FLAC/MP3 sources
default_ffmpeg_arg = "-b:a 128k" # Transparent

def get_quality_arg(self, _: int) -> str:
Expand Down