2005年12月07日

faad2 stdout problem

以下の投稿をしたんだけれど wav の RIFF 形式(?) に触れるのを忘れていたよ!
fseek するのはどうやら RIFF 形式に wrap-up するためらしくて、-f 2 というのはそれをやらないようにする、という switch です。



To: trickster20-dev


hi eyeryone,

today i msn'ed with miyagawa-san and he said that AAC decoder faad2
doesnot work well when it runs with output-to-stdout switch (-w). so
i just tried.

in short, current faad2 is totally broken when it's given -w.

> ./faad.exe -w a.m4a > a-stdout.wav
> ./faad.exe -o a-file.wav a.m4a
> diff a-stdout.wav a-file.wav
Files a-stdout.wav and a-file.wav differ
> ./faad.exe -o a-file-2.wav a.m4a
> diff a-file.wav a-file-2.wav
(no output)
>

i got and used a precompiled binary for win32 at here.
http://www.rarewares.org/aac.html

this is a bug of faad2 commandline frontend. it tries to fseek(3) on
stdout at close_audio_file in faad2/frontend/audio.c, when there is
not -f 2 switch.

> ./faad.exe -f 2 -o a-file-f2.wav a.m4a
> ./faad.exe -f 2 -w a.m4a > a-stdout-f2.wav
> diff a-file-f2.wav a-stdout-f2.wav
(no output)
>

to say worse i cannot figure out how to play the file made with -f 2.
i've just tried latest Windows Media Player, Real Player, QuickTime,
and foobar2000. they just gave me error dialogs. so i cannot say
giving -f 2 for faad2 with -w is a right way or not.

i'm sorry this is just a report and not a solution. maybe i would
write some patches for faad2 frontend.
posted by knagano at 22:02| Comment(0) | TrackBack(0) | はじさらし | このブログの読者になる | 更新情報をチェックする
この記事へのコメント
コメントを書く
お名前: [必須入力]

メールアドレス:

ホームページアドレス:

コメント: [必須入力]

この記事へのトラックバックURL
http://blog.seesaa.jp/tb/10355982
※言及リンクのないトラックバックは受信されません。

この記事へのトラックバック