AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 867593
Accepted
Prototype700
Prototype700
Asked: 2017-01-04 10:41:26 +0800 CST2017-01-04 10:41:26 +0800 CST 2017-01-04 10:41:26 +0800 CST

Ubuntu 中有没有办法将 CD 翻录到 FLAC 并自动添加 ReplayGain 标签?

  • 772

我计划将我的完整 CD 收藏(可能超过 100 张 CD*)翻录到 FLAC,并添加 CDparanoia 和 ReplayGain 标签。

多年来,我为它们使用了不同的编解码器和质量选项,这意味着我有一些 MP3 CBR 320 专辑,一些是 V0-4,还有一些是 Ogg Vorbis。现在,我想无损地重新翻录它们,我可以使用一个程序,让我以最少的手动工作量完成所有这些任务。

有没有你能想到的能够准确地将 CD 翻录到 FLAC 并添加 ReplayGain 的程序?(GUI 或命令行都可以。)

  • 更新:事实上,它们大约是 260。连续案件,不包括。奖励磁盘、DVD 等;)
software-recommendation
  • 1 1 个回答
  • 3073 Views

1 个回答

  • Voted
  1. Best Answer
    andrew.46
    2017-01-04T19:28:28+08:002017-01-04T19:28:28+08:00

    全面披露:我是abcde的前维护者之一。

    命令行开膛手abcde有这个能力。要安装,只需在终端窗口中运行以下命令:

    sudo apt-get install abcde cdparanoia flac metaflac imagemagick glyrc
    

    然后将以下配置放在一个文件中~/.abcde.conf:

    # -----------------$HOME/.abcde.conf----------------- #
    # 
    # A sample configuration file to convert music cds to 
    #       FLAC using abcde version 2.7.2
    # 
    # Modified for AskUbuntu http://askubuntu.com/q/867593/57576
    #  to allow ReplayGain as well as Album Art retrieval...
    #
    # http://andrews-corner.org/linux/abcde/index.html
    # -------------------------------------------------- #
    
    # Encode tracks immediately after reading. Saves disk space, gives
    # better reading of 'scratchy' disks and better troubleshooting of
    # encoding process but slows the operation of abcde quite a bit:
    LOWDISK=y
    
    # Specify the method to use to retrieve the track information,
    # the alternative is to specify 'musicbrainz':
    CDDBMETHOD=cddb
    
    # Make a local cache of cddb entries and then volunteer to use 
    # these entries when and if they match the cd:
    CDDBCOPYLOCAL="y"
    CDDBLOCALDIR="$HOME/.cddb"
    CDDBLOCALRECURSIVE="y"
    CDDBUSELOCAL="y"
    
    # Specify the encoder to use for FLAC. In this case
    # flac is the only choice.
    FLACENCODERSYNTAX=flac
    
    # Specify the path to the selected encoder. In most cases the encoder
    # should be in your $PATH as I illustrate below, otherwise you will 
    # need to specify the full path. For example: /usr/bin/flac
    FLAC=flac
    
    # Specify your required encoding options here. Multiple options can
    # be selected as '--best --another-option' etc.
    # Overall bitrate is about 880 kbs/s with level 8.
    FLACOPTS='-s -e -V -8' 
    
    # Output type for FLAC.
    OUTPUTTYPE="flac"
    
    # Options to pass to metaflac for ReplayGain:
    FLACGAINOPTS="--add-replay-gain"
    
    # The cd ripping program to use. There are a few choices here: cdda2wav,
    # dagrab, cddafs (Mac OS X only) and flac. New to abcde 2.7 is 'libcdio'.
    CDROMREADERSYNTAX=cdparanoia            
    
    # Give the location of the ripping program and pass any extra options,
    # if using libcdio set 'CD_PARANOIA=cd-paranoia'.
    CDPARANOIA=cdparanoia  
    CDPARANOIAOPTS="--never-skip=40"
    
    # Give the location of the CD identification program:       
    CDDISCID=cd-discid            
    
    # Give the base location here for the encoded music files.
    OUTPUTDIR="$HOME/Music"               
    
    # The default actions that abcde will take.
    ACTIONS=cddb,getalbumart,playlist,read,replaygain,encode,tag,move,clean
    
    # Decide here how you want the tracks labelled for a standard 'single-artist',
    # multi-track encode and also for a multi-track, 'various-artist' encode:
    OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
    VAOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}'
    
    # Decide here how you want the tracks labelled for a standard 'single-artist',
    # single-track encode and also for a single-track 'various-artist' encode.
    # (Create a single-track encode with 'abcde -1' from the commandline.)
    ONETRACKOUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}'
    VAONETRACKOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}'
    
    # Create playlists for single and various-artist encodes. I would suggest
    # commenting these out for single-track encoding.
    PLAYLISTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}.m3u'
    VAPLAYLISTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}.m3u'
    
    # This function takes out dots preceding the album name, and removes a grab
    # bag of illegal characters. It allows spaces, if you do not wish spaces add
    # in -e 's/ /_/g' after the first sed command.
    mungefilename ()
    {
      echo "$@" | sed -e 's/^\.*//' | tr -d ":><|*/\"'?[:cntrl:]"
    }
    
    # What extra options?
    MAXPROCS=2                              # Run a few encoders simultaneously
    PADTRACKS=y                             # Makes tracks 01 02 not 1 2
    EXTRAVERBOSE=2                          # Useful for debugging
    COMMENT='abcde version 2.7.2'           # Place a comment...
    EJECTCD=y                               # Please eject cd when finished :-)
    

    这是一个基本配置,还有很多很多可用的选项,包括:

    1. 自动嵌入下载的专辑封面
    2. 专辑封面下载的许多其他选项
    3. 不同的 flac 编码选项
    4. 同时编码到多个其他编解码器的可能性
    5. 不同的文件命名、文件夹位置等

    但是这个基本配置可能足以满足您的目的。如果是这样,只需插入音频 CD 并运行命令:

    abcde
    

    一切都应该很好!

    注意:存储曲目和专辑增益的值,请参见mediainfo下面的输出。我用 <------ 突出显示了专辑和曲目值:

    General
    Complete name                            : 01.Speak To Me Breathe.flac
    Format                                   : FLAC
    Format/Info                              : Free Lossless Audio Codec
    File size                                : 20.2 MiB
    Duration                                 : 4 min 0 s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 705 kb/s
    Album replay gain                        : -3.68 dB  <-----
    Album replay gain peak                   : 0.968201  <-----
    Album                                    : Dark Side Of The Moon 1992 remaster
    Track name                               : Speak To Me Breathe
    Track name/Position                      : 01
    Track name/Total                         : 09
    Performer                                : Pink Floyd
    Genre                                    : Psychedelic Rock
    Recorded date                            : 1973
    Cover                                    : Yes
    Cover type                               : Cover (front)
    Cover MIME                               : image/jpeg
    Comment                                  : abcde version 2.7.2
    CDDB                                     : 710a1109
    
    Audio
    Format                                   : FLAC
    Format/Info                              : Free Lossless Audio Codec
    Duration                                 : 4 min 0 s
    Bit rate mode                            : Variable
    Bit rate                                 : 705 kb/s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 kHz
    Bit depth                                : 16 bits
    Replay gain                              : -0.48 dB  <-----
    Replay gain peak                         : 0.679779  <-----
    Stream size                              : 20.2 MiB (100%)
    Writing library                          : libFLAC 1.3.1 (UTC 2014-11-25)
    

    参考:

    • abcde:正在下载专辑封面...
    • abcde:使用无损编解码器翻录...
    • 5

相关问题

  • 有哪些科学绘图软件可用?

  • 最好的思维导图软件是什么?

  • 服务器的最佳rootkit删除工具?

  • 从 Ubuntu 连接到 Windows 的最佳远程桌面工具是什么?[关闭]

  • 是否有 Paint.NET 替代方案?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve