From c7133060a0e72df7c3e5d1a96129a9418069553e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 12 Feb 2023 17:11:25 -0500 Subject: [PATCH] Added an option to preserve album art from input files --- lib/flac2pod.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/flac2pod.py b/lib/flac2pod.py index 4ca091d..3998ba1 100755 --- a/lib/flac2pod.py +++ b/lib/flac2pod.py @@ -102,9 +102,13 @@ def scan_destination_convert(): _bake_args, _flac2pod_rg_tags = '', f"-metadata comment='FLAC2PODRG#{_rggain}#{_rgpeak}#'" else: _bake_args, _flac2pod_rg_tags = '', '' + if args.preserve: + _art_args = '-c:v copy -map_metadata 0:g' + else: + _art_args = '-vn' # generate the appropriate ffmpeg command - _cmd = f"screen -DmS flac2pod{_i} ffmpeg -i {_file_s} -c:a aac -ab 256k {_bake_args} -map_metadata 0 " \ - f"{_flac2pod_rg_tags} -aac_pns 0 -movflags +faststart -vn {_file_d}