View previous topic :: View next topic |
Author |
Message |
romano2
Joined: 25 Jun 2006 Posts: 16
|
Posted: Wed Jun 28, 2006 11:56 pm Post subject: AAC file source client |
|
|
hi
I'm trying to develop an icecast source client that could stream AAC files. I've managed to parse AAC files for determining the average bitrate. Then I try to send the file to icecast with this calculated bitrate. As I figured out, the actual "playback" bitrate of file changes constantly, so if I decrease the rate when sending to icecast - it results in buffer underruns in connected player and sound interrupts, and if I increase the sending rate - it leads to disconnect the player by icecast after an hour or so with message "INFO source/send_to_listener Client 199 (192.168.0.2) has
fallen too far behind, removing", because my sending rate is higher then the actual "playback" rate of AAC file.
My question is how do I calculate the required accurate 'playback' bitrate for AAC files? I tried to look in libshout sources, but didn't understand much. libshout seems to dynamically calculate the sending bitrate of MP3 files, so it's equal to 'playback' bitrate. I suspect the algorythm of determining this is very simple, but I still can't get it  |
|
Back to top |
|
 |
romano2
Joined: 25 Jun 2006 Posts: 16
|
Posted: Tue Jul 25, 2006 12:03 pm Post subject: |
|
|
if anyone is interested - i wrote a first working version of source client capable of streaming AAC+.
i use it to stream a bunch of AAC+ files in my LAN with my old P166 Linux box. low cpu usage + ability to stream AAC in very low bitrate (32kbit) with outstanding quality!
works smoothly so far (about 5 days non-stop).
more details here: http://aeons-back.livejournal.com/8714.html |
|
Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jul 25, 2006 2:18 pm Post subject: |
|
|
nothing I've heard of at 32k (including aac*) would be classed as outstanding quality. No matter what you think about the lack of AAC support in our source clients, xiph.org is a free media project which AAC is certainly not a part of.
karl |
|
Back to top |
|
 |
liteFun
Joined: 13 Jan 2006 Posts: 79
|
Posted: Tue Jul 25, 2006 5:14 pm Post subject: |
|
|
I'd like to get streaming software that could broadcast AAC+v2 48kbps (like 128-192kbps for MP3, saves lots of bandwidth) directly grabbed from soundcard (like SimpleCast), to be running on Windows 2000 professional. |
|
Back to top |
|
 |
romano2
Joined: 25 Jun 2006 Posts: 16
|
Posted: Tue Jul 25, 2006 5:57 pm Post subject: |
|
|
karlH:
ok, not outstanding but still very good!
liteFun:
you won't need my source client (hz) for this. hz is for streaming AAC files, not a live stream.
for your task you'll probably need some tool like OddCast (which already includes a working AAC+ v2 encoder as far as i remember). sorry i can't remember now if OddCast supports encoding from the live input.  |
|
Back to top |
|
 |
liteFun
Joined: 13 Jan 2006 Posts: 79
|
Posted: Fri Jul 28, 2006 12:22 pm Post subject: |
|
|
I don't use Oddcast, i prefer Simplecast.
I just would need one small program that just grabs what i hear from my pc and streams it in aac+v2 to server  |
|
Back to top |
|
 |
romano2
Joined: 25 Jun 2006 Posts: 16
|
Posted: Fri Jul 28, 2006 4:15 pm Post subject: |
|
|
liteFun wrote: |
I just would need one small program that just grabs what i hear from my pc and streams it in aac+v2 to server  |
have you checked Orban OptiCodec PC LE ?
looks like it is exactly what you need.
it is not free, though  |
|
Back to top |
|
 |
liteFun
Joined: 13 Jan 2006 Posts: 79
|
Posted: Mon Jul 31, 2006 10:54 am Post subject: |
|
|
What is the point then to advertise free software?
I thought that linux software could be ported to windows too, maybe i'm mistaken badly..
Of course i could use it with cygwin on windows, but it needs in many cases running from "native" cygwin, not just plain executable (some variables etc..).
I don't need any resource-hog commercial software to do one simple job, to stream AAC+v2 to some mountpoint from "what i hear on my pc".
Nobody wants to do simple free programs for windows, no. All just suggests some $$$$$ commercial programs. |
|
Back to top |
|
 |
Anonymous Guest
|
Posted: Mon Aug 14, 2006 7:29 am Post subject: |
|
|
this client appears to be no longer available on the site posted ... anyone got a copy of it ...
Andrew. |
|
Back to top |
|
 |
liteFun
Joined: 13 Jan 2006 Posts: 79
|
Posted: Fri Sep 01, 2006 10:45 pm Post subject: |
|
|
Uhm? It is there..
I just tried, but it won't worki fine with my AAC+v2 files that are 48kbps.
I can listen to maximum of 15sec, then Winamp gets buffering, also seems that icecast2 won't get stream as fast as supposed?
Icecast2 error.log says client has fallen too far behind, removing.
But that is not true, client is getting data fine at 48kbps.
Also hz didn't read tag from aac-file for metadata. |
|
Back to top |
|
 |
romano2
Joined: 25 Jun 2006 Posts: 16
|
Posted: Fri Sep 08, 2006 11:45 pm Post subject: |
|
|
liteFun wrote: |
Icecast2 error.log says client has fallen too far behind, removing.
But that is not true, client is getting data fine at 48kbps.
|
Well, as I already said in that my livejournal comment, my hz installation works rock solid for weeks and it never gets buffering neither for me nor for my listeners that are on 256k link. Try the latest version available, I added an option for buffer size, may be it'll help. And if possible, I still would like to check your AAC files, in case if hz parses them incorrectly.
liteFun wrote: |
Also hz didn't read tag from aac-file for metadata. |
That's true, I haven't implemented metadata updating yet. May be in next versions  |
|
Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Sep 17, 2006 10:53 am Post subject: |
|
|
you might find you need some more work when attempting to stream itunes created aac files ( slightly different header formats ) as the header you are checking through is too short and could be compromised by larger ID3 tags as well.
Andrew. |
|
Back to top |
|
 |
romano2
Joined: 25 Jun 2006 Posts: 16
|
Posted: Sun Sep 17, 2006 12:41 pm Post subject: |
|
|
Could you point me to a sample of such itunes created aac file? I don't have itunes on my machine. This fix will appear in 0.3 version, which, amongst other things, already includes metadata updating from ID3v1 and partially ID3v2 tags. |
|
Back to top |
|
 |
liteFun
Joined: 13 Jan 2006 Posts: 79
|
Posted: Fri Sep 22, 2006 4:19 pm Post subject: |
|
|
Btw i'm trying to stream AAC+v2 files, 48kbps.
Saved from my earlier shows i have sent to server with streamtranscoder. |
|
Back to top |
|
 |
romano2
Joined: 25 Jun 2006 Posts: 16
|
Posted: Sat Sep 23, 2006 4:05 pm Post subject: |
|
|
v0.3
Changes
- Metadata updating added. Supported tags are ID3v1 and ID3v2. If a file contains both ID3v1 and ID3v2, then ID3v1 has the priority. Unicode tags in ID3v2 are not supported yet. In fact, my entire ID3v2 implementation is a quick and dirty hack, so watch out, there may be problems. Yes, I'm evil. Bugoga.
- Send-ahead buffer is now configurable. Default is 3 seconds.
- If AAC file check fails, it causes hz to skip the erroneous file instead of bailing out.
- Playlist is now checked for non-existing files.
- Even more precise timing. Tested on a wide range of AAC files, appears to work with all tested CBR and VBR files, with bitrates from 24 to 320kbps.
- Handling of broken AAC files improved. Now hz tries to resync accurately to the next valid AAC frame if an error in AAC file is encountered.
- No more pause between tracks, as this parameter didn't make much sense but could break the timing.
- Some other bugfixes.
download from http://aeons-back.livejournal.com/8714.html |
|
Back to top |
|
 |
|