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

Thread: encode to m4a (aac) with correct tags & 192k bitrate

  1. #1
    Join Date
    Jan 2008
    Beans
    100

    encode to m4a (aac) with correct tags & 192k bitrate

    Hello!

    I tried all kinds of different programs to convert flac files to m4a oe aac files. I tried to get a bitrate of 192k. It won't work correctly!

    - sound-converter converts the files and tags but the resulting files show no bitrate at all!
    - using ffmpeg on hte commandline with -ab 192k results in files also not showing any bitrate in any musicplayer. (same with nautilus file information!). Using media info on any resulting file shows no bitrate at all.

    The files will play still but I need to compare some files so I need the bitrate. I used ffmpeg -i on the files and voila: they show a bitrate but with 152k instead of 192k!!!

    How to encode these files correctly transfering the metatags and getting a correct bitrate of 192k which is also shown when looking at the audio file info?

    plz help,
    thx for reading,
    piedro

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

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    Hi
    I think that the faac encoder is variable bitrate. That's why you don't see accurate readings.
    From faac --long-help it says:-
    -b <bitrate> Set average bitrate (ABR) to approximately <bitrate> kbps.
    This is the command that I'd use with ffmpeg
    Code:
    ffmpeg -i filename.flac -acodec libfaac -b 192k -map_meta_data 0:0 output.m4a
    It transfers the meta-data OK.
    But mediainfo and ffmpeg -i both show the result as 64kbps, so I think it's the VBR thing that's confusing them.

    Complete name : output.m4a
    Format : MPEG-4
    Format profile : Apple AAC audio with iTunes info
    Codec ID : M4A
    File size : 3.02 MiB
    Duration : 6mn 18s
    Overall bit rate : 66.8 Kbps
    Album : Live Rust
    Track name : Cortez the Killer
    Track name/Position : 12
    Track name/Total : 0
    Performer : Neil Young and Crazy Horse
    Genre : Rock
    Encoded date : 1979
    Writing application : Lavf52.84.0

    Audio
    ID : 1
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format version : Version 4
    Format profile : LC
    Format settings, SBR : No
    Codec ID : 40
    Duration : 6mn 18s
    Bit rate mode : Variable
    Bit rate : 64.0 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Stream size : 2.89 MiB (96%)

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

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    EDIT
    There's an error in my command above.
    It should be -ab instead of -b.

    Like this:-
    Code:
    ffmpeg -i filename.flac -acodec libfaac -ab 192k -map_meta_data 0:0 output.m4a
    mediainfo then shows 152Kbps.
    So I still think that the VBR confuses it.

    Complete name : /home/ron/output.m4a
    Format : MPEG-4
    Format profile : Apple AAC audio with iTunes info
    Codec ID : M4A
    File size : 6.99 MiB
    Duration : 6mn 18s
    Overall bit rate : 155 Kbps
    Album : Live Rust
    Track name : Cortez the Killer
    Track name/Position : 12
    Track name/Total : 0
    Performer : Neil Young and Crazy Horse
    Genre : Rock
    Encoded date : 1979
    Writing application : Lavf52.84.0

    Audio
    ID : 1
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format version : Version 4
    Format profile : LC
    Format settings, SBR : No
    Codec ID : 40
    Duration : 6mn 18s
    Bit rate mode : Variable
    Bit rate : 152 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Stream size : 6.87 MiB (98%)

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

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    well using neroAacEnc (enclosed) will give a constant bitrate

    Code:
    flac * -d &&
    for f in *.wav; do neroAacEnc -cbr 192000  -if "$f"  -of "${f%.wav}.m4a"; done

    but one had to encode from wav so no tags not sure this is better


    to install neroAacEnc


    place in home folder

    then
    Code:
    sudo cp neroAacEnc /usr/bin

    and then
    Code:
    cd /usr/bin
    then
    Code:
     sudo chmod +x neroAacEnc



    there has to be a way to do it all 192 constant +tags let us think
    Attached Files Attached Files
    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
    Sep 2006
    Beans
    3,713

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    You can verify the bitrate of the output file: bitrate = filesize / duration. For example, a 7 MB file that is 378 seconds long: (7*1024)8 / 378 = ~152 kilobits per second.

    This doesn't mean that the file was encoded at a constant bitrate of 152 Kbps.
    Last edited by FakeOutdoorsman; January 6th, 2011 at 07:47 PM.

  6. #6
    Join Date
    Jan 2008
    Beans
    100

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    Wow, that's alot of great advice.

    And yes: this is exactly the same phenomena I experienced: got the tags, but bitrate showing 152k (which I also figured probalbly to be a variable one ...).
    So by applying -ab 192k I get an average vbr of 152k - that's at least unexpected, isn't it?

    Most of my music collection was encoded by apples itunes on an old apple machine. All those files are constant bitrate 192k. So for good measure it would be nice to get some consistency by encoding my flacs ripped by my new linux box to the same format.

    I like your nero encoder solution also but retagging is a bit of a nuisance. BTW: I never realized that you can't get the tags from wav ...

    I also tried "Mobile Media Converter" but I gave up at creating a profile for that one to do the job.
    Last edited by piedro; January 7th, 2011 at 12:22 AM.

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

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    piedro 192k is really quite a "thin" pared down version of a piece of music why do you not rip to flac/alac/wavpack/ape/alac etc from now on on your linux machine the sound quality of your music files becomes much higher 192 m4a is really like fatfree slimline audio

    but of course it is your choice if you want to rip directly to aac 192k you can use rubyripper for that with tags and constant bitrate

    you will need to do with neroAacTag the same install process you have to do with neroAacEnc




    once rubyripper is installed settings are
    preferences/codecs/other
    the other command line is

    Code:
    neroAacEnc -cbr 192000 -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

    There you have aac 192 tagged and you can tick flac at the same time and compare the quality of both files

    ps rubyripper often handles better starting with the command line
    Code:
    rrip_gui
    for the settings and
    Code:
    rrip_cli
    for the rip


    Anyway thought i would add this
    Last edited by shantiq; January 7th, 2011 at 10:26 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

  8. #8
    Join Date
    Aug 2009
    Location
    Brisbane
    Beans
    3,779

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    Quote Originally Posted by shantiq View Post
    piedro 192k is really quite a "thin" pared down version of a piece of music why do you not rip to flac/alac/wavpack/ape/alac etc from now on on your linux machine the sound quality of your music files becomes much higher 192 m4a is really like fatfree slimline audio
    +1....well, +1 on flac, +0.5 on wavapck and -losts and lots on ALAC (why go to a closed source codec with crap support?) and .ape (ape is a joke.....read the licence if you dont believe me)

    In these days of super cheap 1TB+ sized drives, lossless makes great sense.

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

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    Quote Originally Posted by cascade9 View Post
    +1....well, +1 on flac, +0.5 on wavapck and -losts and lots on ALAC (why go to a closed source codec with crap support?) and .ape (ape is a joke.....read the licence if you dont believe me)

    In these days of super cheap 1TB+ sized drives, lossless makes great sense.

    well Cascade we from time to time have these chats about codecs i personally do not care for ape and agree with you there


    only mentioned as it is popular with many and people have heard about it

    you know my favourite ...

    as regards alac i love it i know it is mac's baby but i adore it and it is very well handled on linux all players play it

    Players which handle alac

    VLC plays them
    QMMP (right-click on player/settings/plugins/FFmpeg plugin/highlight/Preferences/Tick alac )
    deadbeef
    aqualung
    audacious
    xine

    and rubyripper will rip it for you in style with help from ffmpeg

    Code:
    ffmpeg  -i %i -acodec alac  "%o".m4a && neroAacTag %o.m4a -meta:artist=%a -meta:album=%b -meta:genre=%g -meta:year=%y -meta:track="%n" -meta:title="%t"
    wavpack is really cool no beef there


    again rubyripper

    Code:
    wavpack -w "Artist=%a" -w "Title=%t" -w "Album=%b" -w "Year=%y" -w "Track=%n" -w "Genre=%g" -hhm %i -o "%o.wv"
    Last edited by shantiq; January 7th, 2011 at 02:11 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

  10. #10
    Join Date
    Aug 2009
    Location
    Brisbane
    Beans
    3,779

    Re: encode to m4a (aac) with correct tags & 192k bitrate

    Quote Originally Posted by shantiq View Post
    as regards alac i love it i know it is mac's baby but i adore it and it is very well handled on linux all players play it

    wavpack is really cool no beef there
    You know what I've said before.......if its lossless, there should be no difference in output quality (depending on decoder).

    ALAC is playable under linux, but the decoders were all written from scratch (by reverse engineering of quicktime .dlls), since apple didnt release ANY specifications on the format. Sod apple.

    wavpack isnt bad, but hybrid ripping (one of the main points of wavpack) is pretty much useless, it takes more CPU time to decode compared to flac, and flac has far more support in portable media players, etc. (mainly thanks to the extra CPU time needed by wavpack). So IMO flac is better.

    IMO there are too many open source lossless codecs. Division will just make things easier for microsoft (with WMA lossless) and apple (with ALAC) to tie up the market.

Page 1 of 2 12 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
  •