Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 45

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

  1. #31
    Join Date
    Sep 2006
    Beans
    3,713

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

    Quote Originally Posted by evilsoup View Post
    From here, a guide to the average (over a number of different files) bitrates of various VBRs as set by -q:
    Hydrogen Audio Knowledgebase is a great resource. I didn't know there was a NeroAAC section. I often recommend the LAME and Vorbis guides. If only the was one for fdk-aac.

  2. #32
    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 for one more esoup


    getting mixed results with it on some of the tags


    all tags good from ogg

    artist and year absent from wv

    artist absent from wma tta flac

    not tried other formats


    how would you use for bulk?

    i tried this [and did fine][of course users can add formats to list]

    for f in nocaseglob nullglob *.{mp3,flac,ape,wv,m4a,aac,mp4,shn,tta,wma,AOB,ogg ,mpc,tak,ac3,ts,m2ts,mkv} \
    ; do convert-to-m4a "$f" ; done
    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. #33
    Join Date
    Oct 2010
    Location
    London
    Beans
    482
    Distro
    Ubuntu 12.04 Precise Pangolin

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

    That script should work fine for bulk files, just use a wildcard. To convert every ogg in a directory, for example, use
    Code:
    convert-to-m4a *.ogg
    I haven't tested it that much, it may well be imperfect (I got some weirdness with the artist on a flac I converted this way)... and in fact, using it on a directory of files doesn't seem to work. For now, you can enclose it in a for loop, but I can't see why that is necessary, since there's a for loop within the script itself.

    A little experimenting seems to show that bash is expanding the * wildcard too early - at the variable declaration stage rather than during the for loop.

    The only way I can think of to do truly universal conversion of metadata is to use avconv (or ffmpeg, if that's your preferred weapon) to copy the metadata over with -map_metadata... but unfortunately, that requires the creation of an extra file, and this will take more time. It shouldn't be a problem for a vaguely modern computer, though, and will simplify the script (and therefore any chance for mistake in writing it).

    Code:
    #!/bin/bash
    
    #### Requires: avconv, neroAacEnc, NeroAacTag
    
    #### Default VBR quality is 0.5
    quality="0.5"
    mode="q"
    adv=
    
    usage ()
    {
        echo "Usage: convert-to-m4a input.file <arguments>
    By default, this uses a VBR mode with the neroAacEnc tag of -q 0.5
    You can set a constant bit rate with -br <bitrate> OR -cbr <bitrate>
    You can use any other neroAacEnc options by using -adv \"-option1 -option2\" - be sure to enclose the options in quotation marks!
    Advanced options and details on the encoding modes can be found in the neroAacEnc readme.txt"
    }
    #### Parse command-line options
    if [ $# = 0 ]; then
        echo "No input file stated"
        usage
        exit
    fi
    
    while [ "$1" != "" ]; do
        case "$1" in
            -h   )    usage
                      exit
                      ;;
            -q   )    mode="q"
                      shift
                      quality="$1"
                      ;;
            -cbr )    mode="cbr"
                      shift
                      quality="$1"
                      ;;
            -br  )    mode="br"
                      shift
                      quality="$1"
                      ;;
            -adv )    shift
                      adv="$1"
                      ;;
            *    )    filename="$1"
                      ;;
        esac
        shift
    done
    
    for f in "$filename"; do
    
    #### The actual conversion to AAC M4A
        avconv -i "$f" -vn -f wav - | neroAacEnc -if - -"$mode" "$quality" -ignorelength "$adv" -of "${f%.*}.m4a"
    
    #### Writing the metadata to the new M4A
        avconv -i "$f" -i "${f%.*}.m4a" -map_metadata 0 -map 1 -c copy ".123-${f%.*}.m4a"
        mv ".123-${f%.*}.m4a" "${f%.*}.m4a"
    done
    exit 0
    Once I've figured out how to escape the * wildcard reliably, I'll work that into the script, but for now, to do multiple files:

    Code:
    for a in *.file; do convert-to-m4a "$a"; done

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

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

    Hi
    Examples for using libfdk_aac encoder with FFmpeg.

    CBR
    For AAC-LC, like this:-
    (Format profile : LC)
    Code:
    ffmpeg -i foo -c:a libfdk_aac -b:a 128k -afterburner 1 -ar 44100 -ac 2 foo.m4a
    For AAC-HE, like this:-
    (Format profile : HE-AAC / LC)
    Code:
    ffmpeg -i foo -c:a libfdk_aac -profile:a aac_he -b:a 64k -afterburner 1 -ar 44100 -ac 2 foo.m4a
    For AAC-HEv2, like this:-
    (Format profile : HE-AACv2 / HE-AAC / LC)
    Code:
    ffmpeg -i foo -c:a libfdk_aac -profile:a aac_he_v2 -signaling implicit -b:a 32k -afterburner 1 -ar 44100 -ac 2 foo.m4a
    VBR[1-5]
    There's some VBR/samplerate information in HA thread here ---> http://www.hydrogenaudio.org/forums/...3&#entry817833
    Code:
    ffmpeg -i foo -c:a libfdk_aac -vbr 3 -afterburner 1 -ar 44100 -ac 2 foo.m4a
    (-afterburner 1 gives improved quality, it's optional)
    Last edited by sandyd; January 7th, 2013 at 05:11 PM. Reason: Changed explicit_sbr to implicit for backwards/maximum compatibility.

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

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

    Quote Originally Posted by ron999 View Post
    imho this libfdk_aac -vbr 3 sounds better than libfaac.
    Is there any consensus on the many different types of AAC, including the HE-AAC that is the main thrust of this thread? I will admit that I am getting a little lost Although I am naturally drawn to anything with afterburner in its commandline...
    You think that's air you're breathing now?

  6. #36
    Join Date
    Sep 2006
    Beans
    3,713

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

    General recommendation is to use HE-AAC for low bitrates (64k and below or so); otherwise use LC-AAC. I can clearly hear a difference between HE and LC using fdk-aac.

    I haven't personally performed many ABX tests, so I can't say which encoders are "better", but Kamedo's tests seem thorough enough for me. For LC-AAC, fdk-aac is absent since the blog article is almost a year old, but this blog indicates:

    qaac > enc_aacPlus > NeroAACEnc > ffmpeg -c:a aac -cutoff 15000 ≒ libfaac ≒ vo-aacenc
    I'd say fdk-aac would be => NeroAacEnc, but this is just a a mostly uneducated guess and should not be considered to be a very valid statement.
    Last edited by FakeOutdoorsman; December 26th, 2012 at 08:33 PM.

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

    convert to HE-AACv2

    well had a "good play" with all these recently and have now got my ffmpeg so it has

    DEA.L. aac
    AAC (Advanced Audio Coding) (encoders: aac libfaac libfdk_aac libaacplus )


    my understanding at this point [testing with my bat ears; the only true scientific way i know

    if you want a normal aac/m4a/mp4 audio libfdk way better than libaac


    if you want a small file [has to be below 40k to get HE-AACv2 and therefore SBR enhanced stereo]


    you can get it with libaacplus or fdk [thanx Ron999 for syntax]



    This below from any audio format or video to ==== > HE-AACv2 bulk or one file ... also keeps tags

    fdk

    for f in nocaseglob *; do ffmpeg -i "$f" -c:a libfdk_aac -profile:a aac_he_v2 -signaling explicit_sbr -b:a 38k -afterburner 1 "${f%.*}.m4a"; done

    libaacplus


    for f in nocaseglob *; do ffmpeg -i "$f" -c:a libaacplus -b:a 38k "${f%.*}.m4a"; done


    PS i cannot stress enough how good this format is
    at 38k it sounds pretty much like a flac or similar and means you can therefore email an entire archived album as one Googlemail attachment
    which is amazing... if you want to share the latest exploits of your favoured HipHop hero of the moment with your great-great aunt Beryl...
    Last edited by shantiq; December 28th, 2012 at 02:28 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

  8. #38
    Join Date
    Oct 2010
    Location
    London
    Beans
    482
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: convert to HE-AACv2

    Doesn't -b:a use a fixed bitrate? Isn't it normally better to use a VBR mode targeting a quality? Unless you're doing streaming over the internet or something.

  9. #39
    Join Date
    Dec 2006
    Beans
    7,349

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

    You know that it would be absolutely crazy, and certainly would never appear in the mainstream abcde script, but now I have tinkered a little with qaac (and with abcde!) it would be only a small job to add qaac support to abcde .

    All abcde does is interrogate the cd, request information from cddb, rip to hdd as wav and then use the allocated encoder to convert +/- tag. Easy enough to slot a new encoder in, even if it is a windows encoder running through wine!!? The abcde engine itself does not need alteration...
    You think that's air you're breathing now?

  10. #40
    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

    i have ripped a few files with qaac even to 320kbps
    and i do not particularly rate the way they sound


    i still think neroAacEnc is BEST and now fdk_aac is also really good

    i hear qaac as better than libaac [but then what is not?] but nowhere near as clear or defined as 2 mentioned above


    so glad i tested it [plus it is wine exe] but a tad underwhelmed

    love the way it does alac tho
    wine qaac -A --verbose -i *wav
    one guy's ear-view for what it is worth...
    Last edited by shantiq; December 28th, 2012 at 10:09 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

Page 4 of 5 FirstFirst ... 2345 LastLast

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
  •