Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th April 2010, 20:19   #1  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
qaac - a new command line AAC/ALAC encoder using QuickTime API

for who is interested...

http://sites.google.com/site/qaacpage/home

change log

download


Quote:
qaac is a command line AAC/ALAC encoder using QuickTime API, strongly influenced by http://tmkk.hp.infoseek.co.jp/qtaacenc/.

* Can read WAV, AIFF, AU, RawPCM, FLAC, Wavpack, ALAC. W64. (see libsndfile [every PCM format supported by libsndfile is also supported by qaac]). Cuesheet(*.cue) is also supported from version 0.05. Support for +4gb .WAV form file/pipe added from version 0.12!
* Encodes as AAC-LC / AAC-HE / ALAC into standard ISO MP4 container.
* As for AAC, ADTS output is also supported from version 0.06.
* As for WAV, AIFF, AU, RawPCM: pipe input is supported.
* As for AIFF, FLAC, Wavpack, ALAC: embedded tags can be automatically pulled (not all).
* Can process multiple input files, wild card can be used.

Download latest version from here. You only have to download qaac-x.xx.zip, if you don't want to compile/browse source codes at all. Of course, you must install the latest Apple QuickTime to run the app.

qaac uses following libraries.

* Apple QuickTime SDK
* libmp4v2 (modified)
* libsndfile
* FLAC
* wavpack
* libid3tag
* GNU getopt (modified)
* boost
Code:
qaac 0.17
Usage: qaac [options] infiles....

"-" as infile means stdin.
In ADTS output mode, "-" as outfile means stdout.

Main options:
-d <dirname>           Output directory, default is cwd
-a, --abr <bitrate>    AAC ABR mode / bitrate
-V, --tvbr <n>         AAC True VBR mode / quality [0-127]
-v, --cvbr <bitrate>   AAC Constrained VBR mode / bitrate
-c, --cbr <bitrate>    AAC CBR mode / bitrate
--he                   HE AAC mode (Can't use TVBR)
-A, --alac             ALAC encoding mode
-q, --quality <n>      AAC encoding Quality [0-2]
-r, --rate <option>    Sample rate option (AAC only)
                       Specify one of the followings:
                       keep: Try to preserve the original rate
                       auto: Let QuickTime choose the optimal one
                       <number>: Literal rate in Hz
-s, --silent           Don't be verbose
-n, --nice             Give lower process priority
--downmix <mono|stereo>    Downmix to mono/stereo
--no-optimize          Don't optimize MP4 container file after encoding
--adts                 ADTS(raw AAC)output, instead of m4a(AAC only)
--ignorelength         Assume WAV input and ignore the data chunk length
-R, --raw              Raw PCM input
-S, --stat             Save bitrate statistics into file
Code:
Options for single input mode only:
-o <filename>          Output filename

Options for Raw PCM input only:
--raw-channels <n>     Number of channels, default 2
--raw-rate     <n>     Sample rate, default 44100
--raw-format   <str>   Sample format, default S16L
                       Sample format spec:
                       1st char: S(igned) | U(nsigned) | F(loat)
                       2nd part: Bitwidth
                       Last part: L(ittle Endian) | B(ig Endian)
                       Cases are ignored. u8b is OK.
Code:
Tagging options(single input only):
--title <string>
--artist <string>
--band <string>
--album <string>
--grouping <string>
--composer <string>
--comment <string>
--genre <string>
--date <string>
--track <number[/total]>
--disk <number[/total]>
--compilation
_

N.B. I am not the developer of this tool!
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!

Last edited by b66pak; 8th October 2010 at 17:59.
b66pak is offline   Reply With Quote
Old 27th April 2010, 22:16   #2  |  Link
dansrfe
Registered User
 
Join Date: Jan 2009
Posts: 1,212
What are the benefits v.s. Nero AAC Encoder?
dansrfe is offline   Reply With Quote
Old 28th April 2010, 17:30   #3  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
apple aac encoding engine...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 28th April 2010, 17:44   #4  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,391
Quote:
apple aac encoding engine...
Is it really better than NeroAACEnc ?

Quote:
Of course, you must install the latest Apple QuickTime to run the app.
Is the quality-level worth the bloat?
Midzuki is offline   Reply With Quote
Old 10th May 2010, 18:40   #5  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
new version...

Quote:
release 0.05
posted May 9, 2010 3:06 PM by n u

Added cue sheet(*.cue) input support(experimental).

qaac foo.cue

will encode each track into separate m4a files.
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 11th May 2010, 20:09   #6  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
new version...

Quote:
release 0.06
posted 3 hours ago by n u

Added ADTS output mode(AAC only). This can be used for streaming output to stdout, but tagging is not supported here.
this is very interesting...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 12th May 2010, 19:19   #7  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
fix bug...

Quote:
release 0.07
posted 12 hours ago by n u

Fixed a bug: -d option didn't work for cuesheet input.
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 21st May 2010, 19:42   #8  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
bug fix...

Quote:
release 0.08
posted 16 hours ago by n u

Bugfix: Enabled "--rate" option on TVBR mode.

By this fix, on QuickTime 7.6.5, you might get lower quality output than you specified by "--tvbr" option. On 7.6.6, it should work OK. Therefore, I strongly recommend upgrading QuickTime if you are using 7.6.5.

(I've already upgraded to 7.6.6 and I have no working environment with 7.6.5, so I can't reproduce the problem on 7.6.5, sorry. This is why I used the wording... "might".)
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 22nd May 2010, 19:15   #9  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
new bug fix...

Quote:
release 0.09
posted 15 hours ago by n u

Now I fixed the problematic "--rate" code.

In release 0.08 post, I've written of QT 7.6.5 specific problem, but it was not. Therefore, I think this version will work in QT 7.6.5 (although I can't test it).
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 23rd May 2010, 20:55   #10  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,292
IIRC, QuickTime's CBR mode is very good when compared to Nero's.
Blue_MiSfit is offline   Reply With Quote
Old 23rd May 2010, 21:29   #11  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,567
So this is basically qtaacenc with wider support of input formats? Thats the only difference?
Keiyakusha is offline   Reply With Quote
Old 24th May 2010, 17:35   #12  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
and the aac (mpeg4 adts) output to stdout...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 29th May 2010, 12:09   #13  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,292
... and it's an awesomely automatable CLI app
Blue_MiSfit is offline   Reply With Quote
Old 29th May 2010, 13:59   #14  |  Link
SeeMoreDigital
Life looks better in HD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,195
What... Nobody has made a GUI yet!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 30th May 2010, 00:04   #15  |  Link
mackworth
Registered User
 
Join Date: Mar 2009
Posts: 46
Have a question, hoping someone can help.

I am trying to use this for my subsonic server so I can stream via aac instead of mp3 to my mobile device.

[5/29/10 6:51:18 PM EDT] DEBUG TranscodeInputStream Starting transcoder: [c:\subsonic\transcode\ffmpeg] [-i] [G:\Music\iTunes\Arctic Monkeys\Arctic Monkeys EP\03 Fake Tales Of San Francisco.mp3] [-f] [wav] [-]
[5/29/10 6:51:18 PM EDT] DEBUG TranscodeInputStream Starting transcoder: [c:\subsonic\transcode\qaac] [-a] [128] [--adts] [-] [-]
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) initializing QTML...done
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac)
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) QuickTime 7.6.6
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac)
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac)
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) Method: Average Bit Rate
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) Bitrate: 128
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) Quality: Best
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac)
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) 0/0 samples processed
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) 0/0 samples processed
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) Overall bitrate: 2.06719kbps
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac)
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac)
[5/29/10 6:51:19 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\qaac) File contains data in an unknown format.

So as shown above, I decoding the mp3 with this command ffmpeg -i %s -f wav - where %s is the file name, and decoding to stdin. And then trying to encode to stout with qaac -a %b --adts - - where %b is the bitrate. %s and %b get filled in automatically by subsonic as shown above. Even if I try:

C:\subsonic\transcode>ffmpeg -i "G:\Music\iTunes\Arctic Monkeys\Arctic Monkeys EP\03 Fake Tales Of San Francisco.mp3" -f wav - | qaac -a 128 -o out.mp4 -

FFmpeg veinritsiailiozinng QSTMVL.N..-r21231-Sherpya, Copyright (c) 2000-2010 F
abrice Bellard, et al.
built on Jan 16 2010 05:42:31 with gcc 4.2.5 20080919 (prerelease) [Sherpya]
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.47. 0 / 52.47. 0
libavformat 52.47. 0 / 52.47. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.15. 0 / 1.15. 0
libswscale 0. 8. 0 / 0. 8. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mp3 @ 015ebec0]max_analyze_duration reached
[mp3 @ 015ebec0]Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'G:\Music\iTunes\Arctic Monkeys\Arctic Monkeys EP\03 Fake Ta
les Of San Francisco.mp3':
Metadata:
TPE1 : Arctic Monkeys
TALB : Arctic Monkeys EP
TPE2 : Arctic Monkeys
TIT2 : 03 Fake Tales Of San Francisco
TPUB : Domino/Ada
TYER : 2005
TDRC : 2005
Duration: 00:02:58.17, start: 0.000000, bitrate: 128 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s
Output #0, wav, to 'pipe:':
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[mp3 @ 02b88260]overread, skip -6 enddists: -4 -4
done

QuickTime 7.6.6

<stdin>
Method: Average Bit Rate
Bitrate: 128
Quality: Best
0/0 samples processed
Overall bitrate: 2.06719kbps
av_interleaved_write_frame(): Error while opening file
mackworth is offline   Reply With Quote
Old 30th May 2010, 16:58   #16  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
this is working for me:

Code:
ffmpeg -i input.mp3 -acodec pcm_f32le -f wav - | sox -t wav --ignore-length - -t wav - | qaac -s -a 128 -o output.mp4 -
i am using sox v14.3.0...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 30th May 2010, 17:59   #17  |  Link
mackworth
Registered User
 
Join Date: Mar 2009
Posts: 46
Interesting, because this fails for me:

c:\subsonic\transcode\ffmpeg -i "G:\Music\iTunes\Ace Of Base\The Bridge\01 Beautiful Life.mp3" -acodec pcm_f32le -f wav - | c:\subsonic\transcode\sox -t wav --ignore-length - -t wav - | qaac -s -a 128 --adts E:\tempACC.aac -

Duration: 00:03:39.27, start: 0.000000, bitrate: 217 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, 2 channels, s16, 32 kb/s
c:\subsonic\transcode\sox WARN wav: wave header missing FmtExt chunk
c:\subsonic\transcode\sox WARN wav: Length in output .wav header will be wrong s
ince can't seek to fix it
Output #0, wav, to 'pipe:':
Stream #0.0: Audio: pcm_f32le, 44100 Hz, 2 channels, flt, 2822 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[mp3 @ 02c48260]Header missing
Error while decoding stream #0.0
E:\tempACC.aac: The system cannot find the file specified.
c:\subsonic\transcode\sox FAIL sox: `-' error writing output file: Broken pipe
av_interleaved_write_frame(): Error while opening file


but this works:

C:\subsonic\transcode>c:\subsonic\transcode\ffmpeg -i "G:\Music\iTunes\Ace Of Ba
se\The Bridge\01 Beautiful Life.mp3" -acodec pcm_f32le -f wav - | c:\subsonic\tr
anscode\sox -t wav --ignore-length - -t wav - | qaac -s -a 128 -o E:\tempAAC.m4a -

Duration: 00:03:39.27, start: 0.000000, bitrate: 217 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, 2 channels, s16, 32 kb/s
Output #0, wav, to 'pipe:':
c:\subsonic\transcode\sox WARN Stream #0.0wav: : Audio: pcm_f32le, 44100 Hz,
2 channels, flt, 2822 kb/swave header missing FmtExt chunk

Sc:\subsonic\transcode\sox WARN twav: rLength in output .wav header will be wron
g since can't seek to fix ite
am mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[mp3 @ 01478260]Header missing
Error while decoding stream #0.0
Error while decoding stream #0.0ate=2822.4kbits/s
size= 75474kB time=219.06 bitrate=2822.4kbits/s
video:0kB audio:75474kB global headers:0kB muxing overhead 0.000088%

So maybe its the --adts mode thats not working for me?
mackworth is offline   Reply With Quote
Old 30th May 2010, 18:18   #18  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
you forgot "-o"...line should be:

Code:
c:\subsonic\transcode\ffmpeg -i "G:\Music\iTunes\Ace Of Base\The Bridge\01 Beautiful Life.mp3" -acodec pcm_f32le -f wav - | c:\subsonic\transcode\sox -t wav --ignore-length - -t wav - | qaac -s -a 128 --adts -o E:\tempACC.aac -
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 30th May 2010, 20:04   #19  |  Link
mackworth
Registered User
 
Join Date: Mar 2009
Posts: 46
You are right, this seems to work:

c:\subsonic\transcode\ffmpeg -i "G:\Music\iTunes\Ace Of Base\
The Bridge\01 Beautiful Life.mp3" -acodec pcm_f32le -f wav - | c:\subsonic\trans
code\sox -t wav --ignore-length - -t wav - | c:\subsonic\transcode\qaac -s -a 12
8 --adts -o - -

It works on the command line, but no subsonic, but atleast I know qaac is working. Thanks a lot
mackworth is offline   Reply With Quote
Old 4th June 2010, 18:39   #20  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
new version...

Quote:
release 0.10
posted 6 hours ago by n u

Removed junk MP4 box(trak.udta.name) from the MP4 output, which was produced by libmp4v2.

By this fix, now aacgain can open qaac's MP4 output (Programs like foobar2000, QuickTime and mp4box could open MP4 files produced by qaac with no problem, but I found aacgain couldn't open it).
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.