Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

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

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

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

    Here's an interesting article from a FFmpeg developer: Why Lossless Audio Codecs generally suck.

  2. #12
    Join Date
    Jun 2007
    Beans
    17,337

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

    One way w/ neroAacEnc and tags (at least some
    Code:
    #!/bin/bash
    for f in *.flac
    do
    OUTF=`echo "$f" | sed s/\.flac$/.m4a/g`
    
    ARTIST=`metaflac "$f" --show-tag=ARTIST | sed s/.*=//g`
    TITLE=`metaflac "$f" --show-tag=TITLE | sed s/.*=//g`
    ALBUM=`metaflac "$f" --show-tag=ALBUM | sed s/.*=//g`
    GENRE=`metaflac "$f" --show-tag=GENRE | sed s/.*=//g`
    TRACKTOTAL=`metaflac "$f" --show-tag=TRACKTOTAL | sed s/.*=//g`
    DATE=`metaflac "$f" --show-tag=DATE | sed s/.*=//g`
    TRACKNUMBER=`metaflac "$f" --show-tag=TRACKNUMBER | sed s/.*=//g`
    
    flac -c -d "$f" - | neroAacEnc -if -  -q 0.65 -of  "$OUTF"
    neroAacTag "$OUTF"  -meta:artist="$ARTIST" -meta:title="$TITLE" -meta:album="$ALBUM" -meta:genre="$GENRE" -meta:year="$DATE" -meta:track="$TRACKNUMBER" -meta:totaltracks="$TRACKTOTAL"
    done
    mkdir "$ALBUM" && mv *.m4a "$ALBUM"
    Blue is adjustable, for a br then adjust as such

    Code:
    neroAacEnc -if -  -br 192000
    see neroAacEnc -help

    Assumes neroAacEnc and neroAacTag in path and executable

  3. #13
    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 FakeOutdoorsman View Post
    Here's an interesting article from a FFmpeg developer: Why Lossless Audio Codecs generally suck.

    thanx for that bloody hilarious

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

    mc4man that is astounding
    Last edited by shantiq; January 7th, 2011 at 11:35 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

  4. #14
    Join Date
    Jun 2007
    Beans
    17,337

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

    shantiq -
    because i know you like such things, a couple of varitions of above for alac
    The ffmpeg tagging one won't do tracktotal correct, ffmpeg seems to have an issue, varied the save location method in both so you can see ...

    Also am attaching an interesting one I came across, forget if it workedright or needed some adjustment.

    (have a couple of mp3hd ones lying about (wmal2mp3hd and flac2mp3hd..

    Code:
    #!/bin/bash
    for f in *.flac
    do
    OUTF=`echo "$f" | sed s/\.flac$/.m4a/g`
    
    ARTIST=`metaflac "$f" --show-tag=ARTIST | sed s/.*=//g`
    TITLE=`metaflac "$f" --show-tag=TITLE | sed s/.*=//g`
    ALBUM=`metaflac "$f" --show-tag=ALBUM | sed s/.*=//g`
    GENRE=`metaflac "$f" --show-tag=GENRE | sed s/.*=//g`
    TRACKTOTAL=`metaflac "$f" --show-tag=TRACKTOTAL | sed s/.*=//g`
    DATE=`metaflac "$f" --show-tag=DATE | sed s/.*=//g`
    TRACKNUMBER=`metaflac "$f" --show-tag=TRACKNUMBER | sed s/.*=//g`
    
    mkdir "$ALBUM" 
    
    flac -c -d "$f" - | ffmpeg -i -  -acodec alac  ./"$ALBUM/$OUTF"
    neroAacTag ./"$ALBUM/$OUTF"  -meta:artist="$ARTIST" -meta:title="$TITLE" -meta:album="$ALBUM" -meta:genre="$GENRE" -meta:year="$DATE" -meta:track="$TRACKNUMBER" -meta:totaltracks="$TRACKTOTAL"
    done
    Code:
    #!/bin/bash
    for f in *.flac
    do
       ARTIST=`metaflac "$f" --show-tag=ARTIST | sed s/.*=//g`
       ALBUM=`metaflac "$f" --show-tag=ALBUM | sed s/.*=//g`
    mkdir "$ARTIST-$ALBUM"
    
     ffmpeg  -i "$f" -acodec alac \
    	-metadata title="$(metaflac --show-tag=TITLE "$f" | sed 's/TITLE=//g')" \
    	-metadata artist="$(metaflac --show-tag=ARTIST "$f" | sed 's/ARTIST=//g')" \
    	-metadata album="$(metaflac --show-tag=ALBUM "$f" | sed 's/ALBUM=//g')" \
    	-metadata date="$(metaflac --show-tag=DATE "$f" | sed 's/DATE=//g')" \
    	-metadata genre="$(metaflac --show-tag=GENRE "$f" | sed 's/GENRE=//g')" \
    	-metadata track="$(metaflac --show-tag=TRACKNUMBER "$f" | sed 's/TRACKNUMBER=//g')" \
    	"./$ARTIST-$ALBUM/${f%.flac}.m4a"
    done
    Attached Files Attached Files

  5. #15
    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

    thank you
    Last edited by shantiq; January 8th, 2011 at 08:47 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

  6. #16
    Join Date
    Jan 2008
    Beans
    100

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

    Wow! Ok ...

    Shantiq@
    First of all about fatfree slimline audio:
    What's wrong about that. Please trust me in asking question with some thought on it beforehand. I see your point in lossless formats,
    I prefer wavpack & FLAC btw, but I have about 45 000 tracks on a server fed by 7 persons in a living association. While everyone should have access (without necessarily owning the lossless original) using linux, MAC & Windows boxes (plus three laptops) and a variety of mobile devices, 4 of them being iPods, I had to find a compromise in a format and in choosing a bitrate. Filesize does matter in our scenario and bandwidth of the WLAN does also! (Forgot to mention 2 wireless PS3s ...)

    So fatfree slimline is a good thing. Most of the music ripped by itunes does enter the server in 192k m4a, a lot of music seems to be in 128k mp3 which doesn't make too much sense to me. But: I can't re-rip all the albums neither can I use wavpack on some files (everyone has to recode for mobiles by him/herself) while leaving the majority in other formats. I have my music in FLAC but I re-rip the tracks with an apple laptop via itunes to 192k m4a which seems to be a good way to go for most of our uses ...

    I like to avoid this because my ubuntu desktop box is much faster in encoding. But I want to assure I get it right. Correct bitrate, correct tags. I won't accept files messing up the server due to formating and tagging by the other guys, so I have to get it right myself.

    BTW: 192k quality seems to be alright to listen to. I can't hear any significant difference in quality to FLACs. Maybe it's my sound hardware is too bad ...

    Long answer? Yes. But it's a bit like posing a problem as "How to walk from here to the university?" to get answers like "Don't walk - take a cab!" or "Why would you want to study?" ...

    But still: Thanks a lot for your efforts and discussing.

    @mc4man: Thanks so much for your solutions! I will thoroughly test the Neroenc script alternatives asap. They sound like a good solution. Though I probably still have to use musicbrainz afterwards to fill the missing tags. I really appreciate.

    thx for reading and discussing the topic everyone,
    piedro
    Last edited by piedro; January 17th, 2011 at 02:57 AM.

  7. #17
    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 if you have to share so many tracks and load ipods then aac might be cool for your needs here

    but it is very little info 192kbps and PERSONALLY i feel i am listening to the skeleton of a track with all the flesh and muscle removed


    wav/cda is 1411kbps lossless typically in the 500-1000 range so we can see what is left with 192 a fraction of the original



    by the way fine for mp3players i have tried 320mp3 and wav on a player and no difference i could hear

    on a laptop speakers some difference is heard but not huge



    or if you plug your computer into a stereo system ( my most likely setup ) then it really matters i then favour 24-bit flac or wavpack or any of the lossless formats



    so it depends what you want your music for not everybody needs audiophile quality and in your case you have so many trax your choice might be right for you

    matter of of taste in the end
    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 2 of 2 FirstFirst 12

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
  •