Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Attach a picture to an MP3 file

  1. #1
    Join Date
    May 2012
    Beans
    320

    Attach a picture to an MP3 file

    Hello everybody,

    I would like to edit tags of an MP3 file, attaching a picture to it (cover album),a I found this command from the official documentation:

    Code:
    ffmpeg -i input.mp3 -i cover.png -c copy -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3
    It doesn't work, if anyone has an idea, please assist me to solve it out.

    Thank you in advance

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,162
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Attach a picture to an MP3 file

    Hi alfirdaous.

    There are GUI tools more easier to use than that. Take a look at this thread for one that works simply dragging and dropping pictures.

    Hope that helps, and tell us how it goes.
    Regards.

  3. #3
    Join Date
    Jul 2009
    Beans
    8

    Re: Attach a picture to an MP3 file

    Hi,

    Maybe you need to "format" the file to ID3 tags before attaching the picture ; the following line is specified just above the one you use :
    Code:
    ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3

  4. #4
    Join Date
    May 2012
    Beans
    320

    Re: Attach a picture to an MP3 file

    thanks antou, this is the output:

    Code:
    Duration: 00:00:38.07, start: 0.000000, bitrate: 128 kb/s
        Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
    File 'out.mp3' already exists. Overwrite ? [y/N] y
    Output #0, mp3, to 'out.mp3':
        Stream #0.0: Audio: [0][0][0][0] / 0x0000, 44100 Hz, stereo, s16, 200 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
    Encoder (codec id 86017) not found for output stream #0.0

  5. #5
    Join Date
    May 2012
    Beans
    320

    Re: Attach a picture to an MP3 file

    Quote Originally Posted by papibe View Post
    Hi alfirdaous.

    There are GUI tools more easier to use than that. Take a look at this thread for one that works simply dragging and dropping pictures.

    Hope that helps, and tell us how it goes.
    Regards.
    I used EasyTag, but in command line it's better and faster

  6. #6
    Join Date
    May 2012
    Beans
    320

    Re: Attach a picture to an MP3 file

    For kid3 software:

    + How can we add a cover to it?
    + How can we copy tags from other MP3 file to the one I want to edit (or if possible to copy tags from playlist to another one)

  7. #7
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,162
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Attach a picture to an MP3 file

    Quote Originally Posted by alfirdaous View Post
    How can we add a cover to it?
    You just drag a picture from a folder or the browser, and drop it on the album art field (bottom right).

    Regards.

  8. #8
    Join Date
    May 2012
    Beans
    320

    Re: Attach a picture to an MP3 file

    Thanks papibe, how about the second question, any idea?

  9. #9
    Join Date
    May 2012
    Beans
    320

    Edit MP3 file album art

    Hello there,

    I am trying to add an image to an MP3 file, using this:

    Code:
    sudo ffmpeg -i 001.mp3 -loop_input -i logo.png -vcodec libx264 -preset slow -crf 20 -threads 0 -acodec copy -shortest output.mp3
    but the output file size is loss and no sound:
    001.mp3:
    Code:
    Complete name                            : 001.mp3 Format                                   : MPEG Audio File size                                : 762 KiB
    output.mp3:
    Code:
    Complete name                            : output.mp3 Format                                   : AVC Format/Info                              : Advanced Video Codec File size                                : 5.13 KiB
    Thx for your help in advance

  10. #10
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Edit MP3 file album art

    Quote Originally Posted by alfirdaous View Post
    ... I am trying to add an image to an MP3 file, using this:
    Code:
    sudo ffmpeg ...
    Thx for your help in advance
    FFmpeg is the wrong tool for this job.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •