FLAC conversion fails
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
### Problem
Any album I run this with:
```sh
$ beet -vv import /Users/redacted/Downloads/flac/La\ Belle\ Affaire
```
(verbose is too long to show here, but it displays nothing new)
Leads to this problem:
```
Correcting tags from:
Coralie Clement - La Belle Affaire
To:
Coralie Clément - La Belle Affaire
URL:
https://musicbrainz.org/release/24c83771-a5e1-48e3-ad30-80cfd87ae48d
(Similarity: 100.0%) (Digital Media, 2014, FR, naïve)
* La Belle Affaire -> La belle affaire
* Un Jour -> Un jour
* A La Longue -> A la longue
* Où Tu M'as Laissé -> Où tu m'as laissé
* Trois Fois Rien -> Trois fois rien
* Elephant Noir -> Elephant noir
* Rien Ne Reste -> Rien ne reste
* Mon Amie La Rose -> Mon amie la rose
* Un Dimanche En Hiver -> Un dimanche en hiver
* A Demi Mot -> A demi mot
* Sur Mes Yeux -> Sur mes yeux
* De Paris À St Petersbourg -> De paris à st petersbourg
* Tes Nuits Pâles -> Tes nuits pâles
* Enjoy The Silence -> Enjoy the silence
This album is already in the library!
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpes_0g922.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpqar75w58.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmp7ipg7353.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmp88grm6md.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpibrjv2ug.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpkt65xkdc.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmp1fvlv4f7.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpop9k44_r.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpk03oevit.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpzek5te1j.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmp62o3nqwv.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpd_nneqei.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmpr7zx09xh.m4a'
could not get filesize: [Errno 2] No such file or directory: b'/Users/redacted/Downloads/tmp4wsdghk9.m4a'
Old: 14 items, AAC, 100kbps, 46:01, 0.0 B
New: 14 items, FLAC, 892kbps, 44.1kHz/16 bit, 46:00, 294.6 MiB
[S]kip new, Keep all, Remove old, Merge all? r
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/02 Un Jour.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/04 Où Tu M'as Laissé.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/01 La Belle Affaire.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/03 A La Longue.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/03 A La Longue.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/05 Trois Fois Rien.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/04 Où Tu M'as Laissé.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/06 Elephant Noir.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/02 Un Jour.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/07 Rien Ne Reste.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/01 La Belle Affaire.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/08 Mon Amie La Rose.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/08 Mon Amie La Rose.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/09 Un Dimanche En Hiver.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/06 Elephant Noir.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/10 A Demi Mot.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/05 Trois Fois Rien.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/11 Sur Mes Yeux.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/07 Rien Ne Reste.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/12 De Paris À St Petersbourg.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/09 Un Dimanche En Hiver.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/13 Tes Nuits Pâles.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/11 Sur Mes Yeux.flac
convert: Encoding /Users/redacted/Downloads/flac/La Belle Affaire/14 Enjoy The Silence.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/12 De Paris À St Petersbourg.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/10 A Demi Mot.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/13 Tes Nuits Pâles.flac
convert: Finished encoding /Users/redacted/Downloads/flac/La Belle Affaire/14 Enjoy The Silence.flac
```
### Setup
* OS: macOS 10.13.6 (17G14042)
* Python version: 3.9.5
* beets version: 1.6.1
* Turning off plugins made problem go away (yes/no):
My configuration (output of `beet config`) is:
```yaml
lyrics:
bing_lang_from: []
auto: yes
force: yes
sources: genius musixmatch
fallback: ''
import.write: yes
bing_client_secret: REDACTED
bing_lang_to:
google_API_key: REDACTED
google_engine_ID: REDACTED
genius_api_key: REDACTED
local: no
dist_thresh: 0.1
plugins: embedart fetchart lyrics convert discogs missing zero spotify
autotag: yes
ignore_hidden: yes
original_date: yes
languages: en
va_name: Compilation
import:
copy: no
write: yes
move: no
convert:
tmpdir: /Users/redacted/Downloads/
auto: yes
delete_originals: no
no_convert: path::\.(m4a)$
command: ffmpeg -y -i $source -vsync 0 -q:a 0 -map_metadata 0 $dest
extension: m4a
dest:
pretend: no
link: no
hardlink: no
threads: 4
format: mp3
id3v23: inherit
formats:
aac:
command: ffmpeg -i $source -y -vn -acodec aac -aq 1 $dest
extension: m4a
alac:
command: ffmpeg -i $source -y -vn -acodec alac $dest
extension: m4a
flac: ffmpeg -i $source -y -vn -acodec flac $dest
mp3: ffmpeg -i $source -y -vn -aq 2 $dest
opus: ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest
ogg: ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest
wma: ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest
max_bitrate:
auto_keep: no
quiet: no
embed: yes
paths: {}
never_convert_lossy_files: no
copy_album_art: no
album_art_maxwidth: 0
discogs:
user_token: REDACTED
apikey: REDACTED
apisecret: REDACTED
tokenfile: discogs_token.json
source_weight: 0.5
separator: ', '
index_tracks: no
append_style_genre: no
fetchart:
auto: yes
sources: fanarttv itunes amazon lastfm coverart albumart
fanarttv_key: REDACTED
lastfm_key: REDACTED
minwidth: 0
maxwidth: 0
quality: 0
max_filesize: 0
enforce_ratio: no
cautious: no
cover_names:
- cover
- front
- art
- album
- folder
google_key: REDACTED
google_engine: 001442825323518660753:hrh5ch1gjzm
store_source: no
high_resolution: no
deinterlace: no
cover_format:
embedart:
auto: yes
maxwidth: 1000
remove_art_file: yes
compare_threshold: 0
ifempty: no
quality: 0
zero:
auto: yes
update_database: yes
keep_fields:
- artist
- title
- album
- year
- albumartist
- track
- tracktotal
- disc
- disctotal
- label
- unsyncedlyrics
- images
- rating
- first played
- last played
- play count
fields: []
spotify:
source_weight: 0.5
mode: list
tiebreak: popularity
show_failures: no
artist_field: albumartist
album_field: album
track_field: title
region_filter:
regex: []
client_id: 4e414367a1d14c75a5c5129a627fcab8
client_secret: REDACTED
tokenfile: spotify_token.json
missing:
count: no
total: no
album: no
```
Contributor guide
Research direction
Start by reproducing the shown `beet -vv import` command with the `convert` plugin and its configured ffmpeg command and temporary directory. Trace the conversion path around the reported temporary `.m4a` files; done means the import completes without missing-file errors and the converted files are available as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100