# Import and transcode automatically?

**URL:** <https://discourse.beets.io/t/import-and-transcode-automatically/296>\
**Category:** Help\
**Created:** [February 12, 2018, 9:06am UTC](https://discourse.beets.io/t/import-and-transcode-automatically/296 "2018-02-12T09:06:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mouldysammich](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/mouldysammich/32/120_2.png) [@mouldysammich](https://discourse.beets.io/u/mouldysammich)\
**Post date:** [February 12, 2018, 9:06am UTC](https://discourse.beets.io/t/import-and-transcode-automatically/296/1 "2018-02-12T09:06:15Z")

</div>

Hi,

I’m trying to get beets to automatically convert my music if it isnt mp3 to mp3 while it imports. Is it possible to do this and how?

here is my import & convert settings:

```
import:
    copy: yes
    write: yes
    resume: ask
    detail: yes

convert:
    auto: yes
    copy_album_art: yes
    embed: no
    never_convert_lossy_files: yes
    dest: /mnt/storage/Music
    format: phone
    formats:
        phone:
              command: ffmpeg -i $source -codec:a libmp3lame -qscale:a 0 $dest
              extension: mp3
```

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [February 12, 2018, 1:22pm UTC](https://discourse.beets.io/t/import-and-transcode-automatically/296/2 "2018-02-12T13:22:16Z")

</div>

Yep! Something like that should do it. 👍 What’s happening currently?

---

<div class="post-metadata">

**Author:** ![mouldysammich](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/mouldysammich/32/120_2.png) [@mouldysammich](https://discourse.beets.io/u/mouldysammich)\
**Post date:** [February 12, 2018, 11:23pm UTC](https://discourse.beets.io/t/import-and-transcode-automatically/296/3 "2018-02-12T23:23:48Z")

</div>

When it imports all it does is copy over the (in this case) flac files without converting them ☹

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [February 13, 2018, 3:32am UTC](https://discourse.beets.io/t/import-and-transcode-automatically/296/4 "2018-02-13T03:32:07Z")

</div>

Strange! The configuration looks fine from here. If you find more evidence that would help understand the problem, such as messages in your verbose log, we may be able to help.

---

<div class="post-metadata">

**Author:** ![mouldysammich](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/mouldysammich/32/120_2.png) [@mouldysammich](https://discourse.beets.io/u/mouldysammich)\
**Post date:** [February 13, 2018, 8:22am UTC](https://discourse.beets.io/t/import-and-transcode-automatically/296/5 "2018-02-13T08:22:11Z")

</div>

I checked the log for the import with --verbose the convert portion of the log just says this for each file in the album. The ffmpeg command definitely works as i tested on a single file to see if it worked, so I’m not sure why its saying it failed

```
convert: Encoding /mnt/storage/Downloads/The Fall - Extricate (2002) CD FLAC/01 - Sing! Harpy.flac
convert: Encoding /mnt/storage/Downloads/The Fall - Extricate (2002) CD FLAC/01 - Sing! Harpy.flac failed.

```

EDIT:  
I didnt realize verbose had different levels, here is the output with -vvv

```
ffmpeg version 3.2.10-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil 55. 34.101 / 55. 34.101
  libavcodec 57. 64.101 / 57. 64.101
  libavformat 57. 56.101 / 57. 56.101
  libavdevice 57. 1.100 / 57. 1.100
  libavfilter 6. 65.100 / 6. 65.100
  libavresample 3. 1. 0 / 3. 1. 0
  libswscale 4. 2.100 / 4. 2.100
  libswresample 2. 3.100 / 2. 3.100
  libpostproc 54. 1.100 / 54. 1.100
Input #0, flac, from '/mnt/storage/Downloads/The Fall - Extricate (2002) CD FLAC/03 - Bill Is Dead.flac':
  Metadata:
    ARTIST : The Fall
    TITLE : Bill Is Dead
    ALBUM : Extricate
    DATE : 2002
    track : 03
    album_artist : The Fall
    disc : 1
    TOTALDISCS : 1
    TOTALTRACKS : 14
  Duration: 00:04:32.93, start: 0.000000, bitrate: 898 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
File '/tmp/tmplvnracjx.mp3' already exists. Overwrite ? [y/N] Not overwriting - exiting
```

---

<div class="post-metadata">

**Author:** ![mouldysammich](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/mouldysammich/32/120_2.png) [@mouldysammich](https://discourse.beets.io/u/mouldysammich)\
**Post date:** [February 13, 2018, 9:46am UTC](https://discourse.beets.io/t/import-and-transcode-automatically/296/6 "2018-02-13T09:46:44Z")

</div>

# Hurray

Its fixed, i need to add a `-y` to the ffmpeg command. Thanks for your help!
