Tag: MP3

  • Converting Audio Formats on Linux

    I had an audio in Apple .ape format, that I wanted to convert to MP3 format for easier listening on all my devices.

    Linux has free audio and video converters. I’ll be using ffmpeg.

    cd to the folder with the original file. For this example, cd /media/george/Seagate700GB/Nathan Milstein – The Last Recital/ and in that folder the music file is CDImage.ape

    MP3 320kbps Constant Bit Rate

    ffmpeg -i ‘CDImage.ape’ -acodec libmp3lame -id3v2_version 3 -b 320 -metadata Year=’1995′ -metadata Comment=” -metadata Title=’Nathan Milstein – The Last Recital’ ‘Nathan Milstein – The Last Recital.mp3’

    -b is setting the output to 320kbps

    -metadata Year sets the Year field

    -metadata Comment (note: repeat -metadata for each field) I wanted to removed the comment the “extract from CD” software left

    -metadata Title always enclose in quotes

    Then the output file must be at the end.

    MP3 Variable Bit Rate, best quality 0

    ffmpeg -i ‘CDImage.ape’ -acodec libmp3lame -id3v2_version 3 -qscale:a 0 -metadata Genre=’Classical’ -metadata Artist=’Nathan Milstein violin, Georges Pludermacher piano’ -metadata Year=’1995′ -metadata Comment=” -metadata Title=’Nathan Milstein – The Last Recital’ ‘Nathan Milstein – The Last Recital.mp3’

    “-qscale:a 0” is setting the output to variable bit rate with the highest quality
    I added the Artist and Genre fields
    Then the output file is at the end.

    For more details about the settings, see: ffmpeg.org Encode MP3 but
    -b 320 gives CBR (constant bit rate 320kbps, better quality than most people can distinguish, and the best this library will output)
    -qscale:a 0 means VBR (variable bit rate) usually between 220-260 kbps

    Output

    In VLC Media Player, says in the Codec tab of the Info, that it is “32 kb/s” but ignore that for VBR. Look in Statistics tab of VLC, see the “Input bitrate” varying.

    $ ffmpeg -i ‘CDImage.ape’ -acodec libmp3lame -id3v2_version 3 -qscale:a 0 -metadata Genre=’Classical’ -metadata Artist=’Nathan Milstein violin, Georges Pludermacher piano’ -metadata Year=’1995′ -metadata Comment=” -metadata Title=’Nathan Milstein – The Last Recital’ ‘Nathan Milstein – The Last Recital.mp3’

    Then after a long list of what is enabled in ffmpeg:

    Input #0, ape, from ‘CDImage.ape’:
    Metadata:
    Artist : –
    Album : –
    Title : –
    Genre : Undefined
    etc.

    << Track : – Duration: 01:09:00.47, start: 0.000000, bitrate: 613 kb/s Stream #0:0: Audio: ape (APE / 0x20455041), 44100 Hz, stereo, s16p

    Stream mapping: Stream #0:0 -> #0:0 (ape (native) -> mp3 (libmp3lame))

    Output #0, mp3, to ‘Nathan Milstein – The Last Recital.mp3’:
    Metadata:
    TCON : Classical
    TALB : –
    Year : 1995
    TRCK : –
    TPE1 : Nathan Milstein violin, Georges Pludermacher piano
    TIT2 : Nathan Milstein – The Last Recital
    TSSE : Lavf58.76.100

    Those will show up in your audio player, e.g. VLC Media Player, as the genre, album, year, track, artist, title and encoder.

    For a full list of the media tags available, see https://wiki.multimedia.cx/index.php/FFmpeg_Metadata

  • WooCommerce Selling CD and MP3s

    WooCommerce Selling CD and MP3s

    I did video tutorials on setting up WooCommerce Grouped Products, so you can sell a CD and the tracks of the CD as MP3s. Grouping them displays better in the store, and lets customers see their options.

    This first video I cover how the grouped product looks in the theme, and what features will be setting up when we’re finished. Then I’ll walk you through setting up the first step, creating the Grouped Product with CD cover and playlist with all the track samples.

    In the second video, I cover adding your music samples to the WordPress Media Library and your audio files for sale to a hidden “sales folder” for WooCommerce. This includes file naming (so you know which file has what music, in lists of files) and how to have the sample music files display well in the audio player.

    The final piece is adding products for your music CD and each Track, to the WooCommerce Grouped Product you created.