Help - Search - Members - Calendar
Full Version: transcoding to mp3 (streaming)
Hydrogenaudio Forums > Lossy Audio Compression > AAC > AAC - Tech
seaeye
hi all;

a rookie question regarding pipes and streams. no answer found so far.

the issue: trying to transcode on-the-fly m4a tp mp3 using faad2 (v2.1 beta) and lame (v3.97). im'm using the following command and it works. well.. kind of...

CODE
c:\\extras\\faad 01.m4a -w | c:\\extras\\lame -S -x -f -m j -b 128 -'


it's used for streaming. run on win xp.

the results: so it works. but it sends approx. 30 sec of a track and then it stops. looks like faad is too fast decoding (?), some kind of a buffer is overloaded or lame looses the stream somewhere in the middle. just wild guesses. there are no problems decoding m4a too wav using faad only. nothing like this happens with ogg, mpc or flac.

any help welcome.
thx.

a
WaldoMonster
This is approximately how I transcode for streaming:
CODE
faad -d -o - %source | lame -V5 --vbr-new --quiet --id3v2-only –noreplaygain - -


Do you use php?
php script time out after 30 seconds by default.
But normally system calls like readfile and passthru are not counted by the script execution time.
seaeye
first of all thx for a prompt reply.

yes - it's a php command. however faad "hangs" after a few seconds. certainly less than 30 (and in my php.ini it's set to 60). it just produces <1min of a stream.
if that was php, i'd expect any decoder to hang. now it's only faad. i'll check your cmd tomorrow and let you know.

cheers.
a
seaeye
so same thing happens while using your parameters. so i'm clueless. huh.gif
any other decoder I could try?
WaldoMonster
The decoder shouldn't be the problem.
I have yesterday retried streaming a few aac and m4a tracks without any problem.
The faad decoder I used comes from Rare Wares (FAAD 2 for Win32, 2004-07-09):
http://www.rarewares.org/aac-decoders.php

Do you have enough processor power (not continuous 100%)?
What php command do you call to start the stream?
What media player do you use?

Some media players don't stream but try to download the whole track first.
For these media player I have set the process priority to idle with:
CODE
start /b /low faad … | start /b /low lame …


seaeye
ok... i got it working. it was a pipe managament in proc_open php function.
thx!

---
BTW - i had a look at your webpage. looks like i was trying to tweak one of alternatives to netjukebox. maybe i should've tried yours first wink.gif
WaldoMonster
Thanks,

If you have more php related questions I can recommend you this forum:
http://forums.devnetwork.net/
seaeye
I didn't know it was php-related issue, when I started the thread wink.gif
thx for the link.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.