Results 1 to 10 of 45

Thread: HE-AAC : how to turn an album into 22 MB of data

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    HE-AAC : how to turn an album into 22 MB of data

    What if there were an audio format which made very small files and yet had great sound quality; with which you could send an album zipped to a friend as one email of an average size of 22 MB ..


    Well there is and it is named HE-AAC and made by Fraunhofer [the files play in all players i have tried so far with no extras needed]




    Over the last couple of years, HE-AAC became one of the most important enabling technologies for state-of-the-art multimedia systems. The codec combines high audio quality with very low bit-rates, allowing for an impressive audio experience even over channels with limited capacity, such as those in broadcasting or mobile multimedia streaming.

    Fraunhofer IIS offers fast access to high-quality, product-ready HE-AAC implementations. Optimized encoder and decoder real- time implementations on embedded processors or DSPs are available, as well as software implementations on PC platforms.

    HE-AAC is…

    - ... the most efficient high-quality multi-channel and stereo audio codec.
    - ... is used in TV, radio, and streaming worldwide.
    - ... the perfect codec for adaptive streaming, for example Apple HLS or MPEG DASH.
    - ... in more than 5 billion devices already today.
    - ... fully compatible with all relevant broadcast metadata.
    - ... is supported and maintained by Fraunhofer IIS.Quality excellent, according to EBU test (for complete results see whitepaper below)
    Bitrate HE-AAC: 48 to 64 kbit/s Stereo, 160 kbit/s for 5.1 Surround (HE-AAC: AAC-LC + SBR)
    HE-AAC v2: 24 to 32 kbit/s Stereo (HE-AACv2: AAC-LC + SBR +PS)
    for good quality audio
    Sampling rates 24 to 96 kHz
    Channels mono, stereo, multi-channel (e.g. 5.1, 7.1, ...)
    Used in DVB, ISDB , SBTVD, DAB+, DRM+, DRM, ATSC-M/H, ISDB-Tmm, DVB-H, DMB, 3GPP, XM Radio, mobile phones, audio and video streaming services
    examples: converting in ffmpeg and mediainfo

    ffmpeg -i Age.wav -acodec libaacplus -ab 72k Age.aac
    ffmpeg version N-35917-ge4fe4d0 Copyright (c) 2000-2012 the FFmpeg developers
    built on Sep 10 2012 11:04:03 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
    configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3 --enable-libaacplus
    libavutil 51. 72.100 / 51. 72.100
    libavcodec 54. 55.100 / 54. 55.100
    libavformat 54. 25.105 / 54. 25.105
    libavdevice 54. 2.100 / 54. 2.100
    libavfilter 3. 16.101 / 3. 16.101
    libswscale 2. 1.101 / 2. 1.101
    libswresample 0. 15.100 / 0. 15.100
    libpostproc 52. 0.100 / 52. 0.100
    [wav @ 0x1c28260] max_analyze_duration 5000000 reached at 5015510
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, wav, from 'Age.wav':
    Duration: 00:02:42.66, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    File 'Age.aac' already exists. Overwrite ? [y/N] y
    Output #0, adts, to 'Age.aac':
    Metadata:
    encoder : Lavf54.25.105
    Stream #0:0: Audio: aac, 44100 Hz, stereo, s16, 72 kb/s
    Stream mapping:
    Stream #0:0 -> #0:0 (pcm_s16le -> libaacplus)
    Press [q] to stop, [?] for help
    size= 1454kB time=00:02:42.67 bitrate= 73.2kbits/s
    video:0kB audio:1454kB subtitle:0 global headers:0kB muxing overhead 0.000000%



    000000000000000000:~/Desktop/Taller$ mediainfo Age.aac
    General
    Complete name : Age.aac
    Format : ADTS
    Format/Info : Audio Data Transport Stream
    File size : 1.42 MiB

    Audio
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format version : Version 2
    Format profile : HE-AAC / LC
    Bit rate mode : Constant / Variable
    Bit rate : 71.6 Kbps
    Minimum bit rate : 140 Kbps
    Maximum bit rate : 228 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz / 22.05 KHz
    Compression mode : Lossy
    Stream size : 1.42 MiB (100%)

    TO INSTALL


    2 ROUTES I am aware of... there might be others



    Through aacplusenc

    http://www.ubuntuupdates.org/package...ase/aacplusenc

    download the deb on the page then install and run aacplusenc -h in terminal you will see this

    Usage: aacplusenc <wav_file> <bitstream_file> <bitrate> <(m)ono/(s)tereo>

    Example: aacplusenc input.wav out.aac 24000 s
    it goes up to 72000 ; 64000 the most likely setting


    Through libaacplus [ffmpeg] all info for this one is credited to Ron999 who passed it to me.


    And to compile FFmpeg with it ...
    Just add --enable-libaacplus to the ./configure line.


    This can be done through FakeOutDoorsman's guide here


    But first it is necessary to compile and install libaacplus.

    This is the method that I used...
    (Paste the one single command)

    Code:
    cd ~/ && \
    wget http://217.20.164.161/~tipok/aacplus/libaacplus-2.0.2.tar.gz && \
    tar -xf libaacplus-2.0.2.tar.gz && \
    cd libaacplus-2.0.2 && \
    ./autogen.sh --enable-shared && \
    make && \
    sudo checkinstall --pakdir "$HOME/Desktop" --pkgname libaacplus \
    --pkgversion 2.0.2 \
    --backup=no --default --deldoc=yes --fstrans=no && sudo ldconfig

    ====================================

    RIPPING TO HE-AAC


    Rubbyripper is perfectly happy to handle this format with this line in the "other" . The line below also works in Deadbeef with the converter [right-click on a song/convert/click on pencil/add/enter libaacplus and code]


    Code:
    ffmpeg -i %i -c:a libaacplus -b:a 64k %o.m4a && AtomicParsley %o.m4a -a %a -b %b -g %g -y %y -k %n --title %t -W
    You will need AtomicParsley installed for tagging
    Code:
    sudo apt-get install atomicparsley

    you can also rip with aacplusenc but so far I have failed to tag that way.


    RR code is

    Code:
    aacplusenc "%i"  "%o" .aac 64000 s
    Code:
    aacplusenc "%i"  "%o" .aac 72000 s


    There you go ; most of the info I am aware of as of now.... It really gives a good sound album at around 22MB............
    Last edited by shantiq; September 13th, 2012 at 03:31 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  2. #2
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: HE-AAC : how to turn an album into 22 MB of data

    you can also rip with Rubyripper with neroAacEnc [WILL NEED neroAacEnc and neroAacTag]


    neroAacEnc -br 36000 -if %i -of %o.m4a && neroAacTag %o.m4a -meta:artist=%a -meta:album=%b -meta:genre=%g -meta:year=%y -meta:track=%n -meta:title=%t
    will give you

    Format profile : HE-AACv2 / HE-AAC / LC
    if you push over -br 40000 Format profile :HE-AAC / LC

    if you push higher than 72000 you will get AAC / LC

    High-Efficiency Advanced Audio Coding (HE-AAC) is a lossy data compression scheme for digital audio defined as a MPEG-4 Audio profile in ISO/IEC 14496-3. It is an extension of Low Complexity AAC (AAC LC) optimized for low-bitrate applications such as streaming audio. HE-AAC version 1 profile (HE-AAC v1) uses spectral band replication (SBR) to enhance the compression efficiency in the frequency domain. HE-AAC version 2 profile (HE-AAC v2) couples SBR with Parametric Stereo (PS) to enhance the compression efficiency of stereo signals. It is a standardized and improved version of the AACplus codec.

    ================================================

    if you want a simple solution and you can handle basic german [it is only in German]

    Plattenkiste is the software for you under Wine

    it will rip very well to HE-AAC


    see image for guidance


    AAC-HE-V2 [SBR +PS].png


    i cannot stress enough the great sound quality for the small size -- using 36k the sound is still excellent
    Audacious with the crystallizer effect is a good way to get excellent rendition
    Last edited by shantiq; October 6th, 2012 at 10:00 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  3. #3
    Join Date
    Dec 2006
    Beans
    7,349

    Re: HE-AAC : how to turn an album into 22 MB of data

    You can add abcde to the list now, neroAacEnc has entered the development version:

    http://code.google.com/p/abcde/source/list

    I am not terribly familiar with the syntax to produce HE-AAC files but a little experimentation produced the following:

    Code:
    $ mediainfo 01.Breathe.m4a 
    General
    Complete name                            : 01.Breathe.m4a
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42
    File size                                : 923 KiB
    Duration                                 : 4mn 0s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 31.4 Kbps
    Album                                    : The Dark Side Of The Moon- 20th Anniversary Edition
    Track name                               : Breathe
    Track name/Position                      : 1
    Performer                                : Pink Floyd
    Genre                                    : Psychedelic Rock
    Recorded date                            : 1992
    Encoded date                             : UTC 2012-12-09 07:13:55
    Tagged date                              : UTC 2012-12-09 07:14:01
    
    Audio
    ID                                       : 1
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : HE-AAC / LC
    Codec ID                                 : 40
    Duration                                 : 4mn 0s
    Source duration                          : 4mn 0s
    Bit rate mode                            : Variable
    Bit rate                                 : 30.6 Kbps
    Maximum bit rate                         : 35.4 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 KHz / 22.05 KHz
    Compression mode                         : Lossy
    Stream size                              : 899 KiB (97%)
    Source stream size                       : 899 KiB (97%)
    Writing library                          : Nero AAC codec 1.5.4.0
    Encoding settings                        : -2pass -br 32000 -he
    Encoded date                             : UTC 2012-12-09 07:13:55
    Tagged date                              : UTC 2012-12-09 07:14:01
    
    Menu
    But I have no idea what settings I should really be using for this . I have a dim memory of it being considered a 'bad thing' to specify -he on the commandline....
    You think that's air you're breathing now?

  4. #4
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: HE-AAC : how to turn an album into 22 MB of data

    thanx Andrew to my mind the best audio codec ever; happy to see one more piece of kit[this time Linux] handling it


    as regards the option this is what you get from
    Code:
    neroAacEnc -help




    Advanced features / troubleshooting:
    -lc : Forces use of LC AAC profile (HE features disabled).
    -he : Forces use of HE AAC profile (HEv2 features disabled).
    -hev2 : Forces use of HEv2 AAC profile
    Note that the above switches (-lc, -he, -hev2) should not be
    used
    ; optimal AAC profile is automatically determined from
    quality/bitrate settings when no override is specified.

    So no use specifying
    Kbps will take it where it needs be


    i found 38k gives you excellent quality due to
    HE-AAC version 2 profile (HE-AAC v2) couples SBR with Parametric Stereo (PS) to enhance the compression efficiency of stereo signals. It is a standardized and improved version of the AACplus codec
    HEv2 kicks in below 40k



    so with neroAacTag

    neroAacEnc -br 38000 -if %i -of %o.m4a && neroAacTag %o.m4a -meta:artist=%a -meta:album=%b -meta:genre=%g -meta:year=%y -meta:track=%n -meta:title=%t

    the sound is so good i have tested myself against flac and found it winning
    This must be the reason
    Parametric Stereo (PS) to enhance the compression efficiency of stereo signals

    Plattenkiste under Wine is wonderful too with full tagging out of the box... easy to use although always in German [but most people can work it out no doubt]
    Thanx to you now we have a Linux option simpler than RR [Rubyripper]




    PS ok tried to use it but not finding my way yet used guide

    tried this for .abcde.conf first 4 lines

    # Specify the encoder to use for m4a/aac. In this case
    # faac is the only choice.
    AACENCODERSYNTAX=neroAacEnc

    # 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/faac
    AACENC=/usr/bin/neroAacEnc

    # Specify your required encoding options here. Multiple options can
    AACENCOPTS='-br 38000 -if %i -of %o.m4a && neroAacTag %o.m4a -meta:artist=%a -meta:album=%b -meta:genre=%g -meta:year=%y -meta:track=%n -meta:title=%t'

    # Output type for m4a/aac.
    OUTPUTTYPE="m4a"

    maybe it is not ready yet ? not sure.... will await instructions ::]]
    Last edited by shantiq; December 9th, 2012 at 08:07 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  5. #5
    Join Date
    Dec 2006
    Beans
    7,349

    Re: HE-AAC : how to turn an album into 22 MB of data

    Quote Originally Posted by shantiq View Post
    maybe it is not ready yet ? not sure.... will await instructions ::]]
    The changes are in the svn version at the moment, not the release version . I am using the following ~/.abcde.conf with the svn abcde:


    Code:
    # -----------------$HOME/.abcde.conf----------------- #
    # 
    # A sample configuration file to convert music cds to 
    #   m4a/aac using abcde version v2.5.5-UNRELEASED
    # 
    # -------------------------------------------------- #
    
    
    # Specify the encoder to use for m4a/aac. In this case
    # we are using the closed source neroAacEnc.
    AACENCODERSYNTAX=neroAacEnc
    
    # 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/faac
    AACENC=neroAacEnc
    
    # Specify your required encoding options here. Multiple options can
    # be selected as '--best --another-option' etc.
    AACENCOPTS='-q 0.65'
    
    # Output type for m4a/aac.
    OUTPUTTYPE="m4a"
    
    # Use AtomicParsley for tagging.
    ATOMICPARSLEY='AtomicParsley'
    
    # The cd ripping program to use. There are a few choices here: cdda2wav,
    # dagrab, cddafs (Mac OS X only) and flac.
    CDROMREADERSYNTAX=cdparanoia            
                                         
    # Give the location of the ripping program and pass any extra options:
    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,playlist,read,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'
    
    # Put spaces in the filenames instead of the more correct underscores:
    mungefilename ()
    {
      echo "$@" | sed s,:,-,g | tr / _ | tr -d \'\"\?\[:cntrl:\]
    }
    
    # What extra options?
    MAXPROCS=2                              # Run a few encoders simultaneously
    PADTRACKS=y                             # Makes tracks 01 02 not 1 2
    EXTRAVERBOSE=y                          # Useful for debugging
    EJECTCD=y                               # Please eject cd when finished :-)
    You don't add all the tagging information in, AtomicParsley will do all of that for you.
    You think that's air you're breathing now?

  6. #6
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: HE-AAC : how to turn an album into 22 MB of data

    thanx so please is it available and how to install/start it

    slightly confused about the svn how to download install:]
    Last edited by shantiq; December 10th, 2012 at 10:01 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

Tags for this Thread

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
  •