beets icon indicating copy to clipboard operation
beets copied to clipboard

Auto import & convert at the same time

Open DavidHenryThoreau opened this issue 1 year ago • 9 comments

I'd like to convert and import at the same time i'm using this config file

directory: ~/Musique
                                                                                 
import :                                                                         
  move: yes                                                                      
  write: yes                                                                     
  resume: yes                                                                    
  default_action: apply                                                          
  autotag: yes                                                                   
  delete: no
  detail: yes                                                                    
  quiet: yes
  timid: no
                                                                                 
art_filename: pochette                                                           
                                                                                 
threaded: yes                                                                    
                                                                                 
original_date: no                                                                

match:                                                                           
  strong_rec_thresh: 0.91
  medium_rec_thresh: 0.91                                                        
  preferred:
    original_year: yes
                                                                                 
paths:
  default: $albumartist/$album/$track %title{$title}
  comp: $albumartist/$album/$track %title{$title}
  albumtype:compilation: $albumartist/$album/$track %title{$title}
                                                                                 
replace:                                                                         
  ' ': _                                                                         
                                                                                 
plugins: acousticbrainz chroma fetchart embedart zero lastgenre ftintitle convert
                                                                                 
acousticbrainz:                                                                  
  auto: yes                                                                      
                                                                                 
chroma:                                                                          
  auto: yes                                                                      
                                                                                 
fetchart:                                                                        
  auto: yes                                                                      
  cover_names: cover front album art folder                                      
                                                                                 
embedart:                                                                        
  auto: yes                                                                      
  remove_art_file: no
  ifempty: yes
                                                                                 
zero:                                                                            
  fields: month day                                                              
                                                                                 
lastgenre:                                                                       
  auto: yes                                                                      

ftintitle:
  auto: yes

convert:
  auto: yes
  max-bitrate: 128
  embed: yes
  delete_originals: yes
  dest: ~/Musique
  format: mp3
  formats:
    all:
      command: ffmpeg -i $source -ab 128k -map_metadata 0 $dest
      extension: mp3

During import

beet convert Album
convert: Empty query result.

DavidHenryThoreau avatar Oct 21 '23 12:10 DavidHenryThoreau

You are getting the sequence wrong. Beets can convert during import beet import should automatically convert based on your config during initial import. You use beet convert to convert after the album is already imported.

arsaboo avatar Oct 21 '23 13:10 arsaboo

If my mp3 are > 128k bitrate and I want to convert them to 128k bitrate

convert:
  auto: yes
  max-bitrate: 128
  embed: yes
  delete_originals: yes
  paths: .
  dest: ~/Musique
  format: mp3
  formats:
    all:
      command: ffmpeg -i $source -ab 128k -map_metadata 0 $dest
      extension: mp3

With that config the convertion is skipped

convert:
    auto: yes
    max-bitrate: 128
    embed: yes
    delete_originals: yes
    paths: .
    dest: ~/Musique
    command: ffmpeg -i $source -ab 128k -map_metadata 0 $dest
    extension: mp3
mediainfo zero-project\ and\ Athanasios\ Lafazanidis\ feat.\ Konstantina\ Tsirimona\ -\ Pass\ me\ by.mp3|grep -i "Bit rate"
Overall bit rate                         : 224 kb/s
Bit rate mode                            : Constant
Bit rate                                 : 224 kb/s
beet import zero-project\ and\ Athanasios\ Lafazanidis\ feat.\ Konstantina\ Tsirimona\ -\ Pass\ me\ by.mp3

zero-project and Athanasios Lafazanidis feat. Konstantina Tsirimona - Pass me by.mp3 (1 items)
Skipping.

DavidHenryThoreau avatar Oct 22 '23 08:10 DavidHenryThoreau

Can you please provide verbose logs, beet -v...

arsaboo avatar Oct 22 '23 10:10 arsaboo

beet --verbose import zero-project_and_Athanasios_Lafazanidis_feat._Konstantina_Tsirimona_-_Pass_me_by.mp3
user configuration: /home/HD/.config/beets/config.yaml
data directory: /home/HD/.config/beets
plugin paths:
Sending event: pluginload
library database: /home/HD/.config/beets/library.db
library directory: /home/HD/Musique
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /home/HD/d/zero-project_and_Athanasios_Lafazanidis_feat._Konstantina_Tsirimona_-_Pass_me_by.mp3
Tagging zero-project -
No album ID found.
Search terms: zero-project -
Album might be VA: False
chroma: acoustid album candidates: 0
Evaluating 0 candidates.

/home/HD/d/zero-project_and_Athanasios_Lafazanidis_feat._Konstantina_Tsirimona_-_Pass_me_by.mp3 (1 items)
Sending event: import_task_before_choice
Skipping.
Sending event: import_task_choice
Sending event: import
Sending event: cli_exit

DavidHenryThoreau avatar Oct 22 '23 11:10 DavidHenryThoreau

It doesn't look like anything is imported there. You need to point it to a folder for it to work. See here.

arsaboo avatar Oct 23 '23 17:10 arsaboo

directory: ~/Musique
                                                                                 
import :                                                                         
  move: yes                                                                      
  write: yes                                                                     
  resume: yes                                                                    
  default_action: apply                                                          
  autotag: yes                                                                   
  delete: yes
  detail: yes                                                                    
  quiet: yes
  timid: no
                                                                                 
art_filename: pochette                                                           
                                                                                 
threaded: yes                                                                    
                                                                                 
original_date: no                                                                

match:                                                                           
  strong_rec_thresh: 0.91
  medium_rec_thresh: 0.91                                                        
  preferred:
    original_year: yes
                                                                                 
paths:
  default: $albumartist/$album/$track %title{$title}
  comp: $albumartist/$album/$track %title{$title}
  albumtype:compilation: $albumartist/$album/$track %title{$title}
                                                                                 
replace:                                                                         
  ' ': _                                                                         
                                                                                 
plugins: acousticbrainz chroma fetchart embedart zero lastgenre ftintitle convert
                                                                                 
acousticbrainz:                                                                  
  auto: yes                                                                      
                                                                                 
chroma:                                                                          
  auto: yes                                                                      
                                                                                 
fetchart:                                                                        
  auto: yes                                                                      
  cover_names: cover front album art folder                                      
                                                                                 
embedart:                                                                        
  auto: yes                                                                      
  remove_art_file: no
  ifempty: yes
                                                                                 
zero:                                                                            
  fields: month day                                                              
                                                                                 
lastgenre:                                                                       
  auto: yes                                                                      

ftintitle:
  auto: yes

convert:
    auto: yes
    max-bitrate: 128
    embed: yes
    delete_originals: yes
    paths: .
    dest: ~/Musique
    command: ffmpeg -i $source -ab 128k -map_metadata 0 $dest
    extension: mp3

I've set dest directory and path

DavidHenryThoreau avatar Oct 23 '23 18:10 DavidHenryThoreau

Please follow the docs carefully. As I mentioned, you need to point to a folder and not a music file (like you are currently doing).

arsaboo avatar Oct 23 '23 21:10 arsaboo

Please follow the docs carefully. As I mentioned, you need to point to a folder and not a music file (like you are currently doing).

Actually pointing to mediafiles directly is supported as well.

We see a skipping in the logs. Next step would be why it is skipping that file.

JOJ0 avatar Dec 01 '23 23:12 JOJ0

quiet: yes

Try disabling that!

JOJ0 avatar Dec 01 '23 23:12 JOJ0