I'm trying to live stream an AAC+ (HE-AAC) stream from audio-in, through a compression program, up to a server, and out to the world. To do this, I'm stringing together the following applications on a single Ubuntu system (when it's deployed, icecast will probably be on a different machine):
- arecord (grabs WAV stream from audio in)
- neroAacEnc (encodes said WAV stream to AAC+)
- ezstream (sends it to streaming server)
- icecast (sends it to the world)
Here's how it works on the command line:
CODE
arecord -d 0 -f cd -t wav |\
/home/ubuntu/Desktop/nero/linux/neroAacEnc -cbr 48 -ignorelength -if - -of /dev/stdout | \
ezstream -c ~/Documents/ezstream/ezstream_stdin_aacplus.xml
/home/ubuntu/Desktop/nero/linux/neroAacEnc -cbr 48 -ignorelength -if - -of /dev/stdout | \
ezstream -c ~/Documents/ezstream/ezstream_stdin_aacplus.xml
I'm not married to any of these programs, so right off the bat, if I'm doing something insane here, and this would all be solved with program X, I'm quite open to suggestions. Has anyone done something like this before?
What's happening is that whenever I connect to it with VLC, I get a 404 not found error on the stream. Icecast's built-in web server shows nothing under the mount points either. Looking at Icecast's log file, it seems to assume that it's an OGG stream, and that there's something wrong with it. It sets up the mountpoint, then immediately takes it down again:
CODE
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node clients (1)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node connections (2)
[2008-04-04 13:05:05] INFO connection/_handle_source_request Source logging in at mountpoint "/stream.aacp"
[2008-04-04 13:05:05] DBUG connection/connection_complete_source sources count is 0
[2008-04-04 13:05:05] DBUG source/source_apply_mount Applying mount information for "/stream.aacp"
[2008-04-04 13:05:05] DBUG source/source_update_settings public set to 0
[2008-04-04 13:05:05] DBUG source/source_update_settings max listeners to -1
[2008-04-04 13:05:05] DBUG source/source_update_settings queue size to 524288
[2008-04-04 13:05:05] DBUG source/source_update_settings burst size to 65535
[2008-04-04 13:05:05] DBUG source/source_update_settings source timeout to 10
[2008-04-04 13:05:05] DBUG source/source_update_settings fallback_when_full to 0
[2008-04-04 13:05:05] DBUG connection/connection_complete_source source is ready to start
[2008-04-04 13:05:05] DBUG fserve/fserve_add_client_callback Adding client to file serving engine
[2008-04-04 13:05:05] DBUG source/source_init Source creation complete
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node sources (1)
[2008-04-04 13:05:05] DBUG stats/process_source_event new source stat /stream.aacp
[2008-04-04 13:05:05] DBUG stats/process_source_event new node public (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_name (My Stream)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_description (This is a stream description)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_url (http://jurgen.ca/)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node genre (RockNRoll)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_type (application/ogg)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node max_listeners (unlimited)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node source_ip (127.0.0.1)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node user_agent (libshout/2.2.2)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node source_client_connections (2)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node listeners (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node bitrate (96)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node channels (2)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node samplerate (44100)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node quality (2.0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node audio_info (bitrate=96;channels=2;samplerate=44100;quality=2%2e0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node listenurl (http://localhost:8000/stream.aacp)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node source_total_connections (2)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node slow_listeners (0)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node listeners (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node listener_peak (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node stream_start (Fri, 04 Apr 2008 13:05:05 +1100)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node total_bytes_read (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node total_bytes_sent (0)
[2008-04-04 13:05:07] DBUG auth/add_client_to_source max on /stream.aacp is -1 (cur 0)
[2008-04-04 13:05:07] DBUG auth/add_client_to_source Added client to /stream.aacp
[2008-04-04 13:05:07] DBUG auth/add_authenticated_client client authenticated, passed to source
[2008-04-04 13:05:07] DBUG source/source_main Client added
[2008-04-04 13:05:07] INFO source/source_main listener count on /stream.aacp now 1
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node clients (2)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node connections (3)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node client_connections (1)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node listener_connections (1)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node listener_peak (1)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node listeners (1)
[2008-04-04 13:05:07] DBUG format/format_check_http_buffer processing pending client headers
[2008-04-04 13:05:10] DBUG stats/modify_node_event update node total_bytes_read (0)
[2008-04-04 13:05:10] DBUG stats/modify_node_event update node total_bytes_sent (279)
[2008-04-04 13:05:15] DBUG stats/modify_node_event update node total_bytes_read (0)
[2008-04-04 13:05:15] DBUG stats/modify_node_event update node total_bytes_sent (279)
[2008-04-04 13:05:16] DBUG source/get_next_buffer last 1207274705, timeout 10, now 1207274716
[2008-04-04 13:05:16] WARN source/get_next_buffer Disconnecting source due to socket timeout
[2008-04-04 13:05:16] INFO source/source_shutdown Source "/stream.aacp" exiting
[2008-04-04 13:05:16] DBUG source/source_clear_source clearing source "/stream.aacp"
[2008-04-04 13:05:16] DBUG format-ogg/format_ogg_free_headers releasing header pages
[2008-04-04 13:05:16] DBUG format-ogg/free_ogg_codecs freeing codecs
[2008-04-04 13:05:16] DBUG source/source_free_source freeing source "/stream.aacp"
[2008-04-04 13:05:16] INFO fserve/fserve_client_create checking for file /stream.aacp (/usr/share/icecast2/web/stream.aacp)
[2008-04-04 13:05:16] WARN fserve/fserve_client_create req for file "/usr/share/icecast2/web/stream.aacp" No such file or directory
[2008-04-04 13:05:16] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-04-04 13:05:16] DBUG stats/process_source_event delete source node /stream.aacp
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (1)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (0)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node sources (0)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (1)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node connections (4)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node client_connections (2)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (0)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node connections (2)
[2008-04-04 13:05:05] INFO connection/_handle_source_request Source logging in at mountpoint "/stream.aacp"
[2008-04-04 13:05:05] DBUG connection/connection_complete_source sources count is 0
[2008-04-04 13:05:05] DBUG source/source_apply_mount Applying mount information for "/stream.aacp"
[2008-04-04 13:05:05] DBUG source/source_update_settings public set to 0
[2008-04-04 13:05:05] DBUG source/source_update_settings max listeners to -1
[2008-04-04 13:05:05] DBUG source/source_update_settings queue size to 524288
[2008-04-04 13:05:05] DBUG source/source_update_settings burst size to 65535
[2008-04-04 13:05:05] DBUG source/source_update_settings source timeout to 10
[2008-04-04 13:05:05] DBUG source/source_update_settings fallback_when_full to 0
[2008-04-04 13:05:05] DBUG connection/connection_complete_source source is ready to start
[2008-04-04 13:05:05] DBUG fserve/fserve_add_client_callback Adding client to file serving engine
[2008-04-04 13:05:05] DBUG source/source_init Source creation complete
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node sources (1)
[2008-04-04 13:05:05] DBUG stats/process_source_event new source stat /stream.aacp
[2008-04-04 13:05:05] DBUG stats/process_source_event new node public (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_name (My Stream)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_description (This is a stream description)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_url (http://jurgen.ca/)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node genre (RockNRoll)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node server_type (application/ogg)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node max_listeners (unlimited)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node source_ip (127.0.0.1)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node user_agent (libshout/2.2.2)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node source_client_connections (2)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node listeners (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node bitrate (96)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node channels (2)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node samplerate (44100)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node quality (2.0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node audio_info (bitrate=96;channels=2;samplerate=44100;quality=2%2e0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node listenurl (http://localhost:8000/stream.aacp)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node source_total_connections (2)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node slow_listeners (0)
[2008-04-04 13:05:05] DBUG stats/modify_node_event update node listeners (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node listener_peak (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node stream_start (Fri, 04 Apr 2008 13:05:05 +1100)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node total_bytes_read (0)
[2008-04-04 13:05:05] DBUG stats/process_source_event new node total_bytes_sent (0)
[2008-04-04 13:05:07] DBUG auth/add_client_to_source max on /stream.aacp is -1 (cur 0)
[2008-04-04 13:05:07] DBUG auth/add_client_to_source Added client to /stream.aacp
[2008-04-04 13:05:07] DBUG auth/add_authenticated_client client authenticated, passed to source
[2008-04-04 13:05:07] DBUG source/source_main Client added
[2008-04-04 13:05:07] INFO source/source_main listener count on /stream.aacp now 1
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node clients (2)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node connections (3)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node client_connections (1)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node listener_connections (1)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node listener_peak (1)
[2008-04-04 13:05:07] DBUG stats/modify_node_event update node listeners (1)
[2008-04-04 13:05:07] DBUG format/format_check_http_buffer processing pending client headers
[2008-04-04 13:05:10] DBUG stats/modify_node_event update node total_bytes_read (0)
[2008-04-04 13:05:10] DBUG stats/modify_node_event update node total_bytes_sent (279)
[2008-04-04 13:05:15] DBUG stats/modify_node_event update node total_bytes_read (0)
[2008-04-04 13:05:15] DBUG stats/modify_node_event update node total_bytes_sent (279)
[2008-04-04 13:05:16] DBUG source/get_next_buffer last 1207274705, timeout 10, now 1207274716
[2008-04-04 13:05:16] WARN source/get_next_buffer Disconnecting source due to socket timeout
[2008-04-04 13:05:16] INFO source/source_shutdown Source "/stream.aacp" exiting
[2008-04-04 13:05:16] DBUG source/source_clear_source clearing source "/stream.aacp"
[2008-04-04 13:05:16] DBUG format-ogg/format_ogg_free_headers releasing header pages
[2008-04-04 13:05:16] DBUG format-ogg/free_ogg_codecs freeing codecs
[2008-04-04 13:05:16] DBUG source/source_free_source freeing source "/stream.aacp"
[2008-04-04 13:05:16] INFO fserve/fserve_client_create checking for file /stream.aacp (/usr/share/icecast2/web/stream.aacp)
[2008-04-04 13:05:16] WARN fserve/fserve_client_create req for file "/usr/share/icecast2/web/stream.aacp" No such file or directory
[2008-04-04 13:05:16] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-04-04 13:05:16] DBUG stats/process_source_event delete source node /stream.aacp
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (1)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (0)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node sources (0)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (1)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node connections (4)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node client_connections (2)
[2008-04-04 13:05:16] DBUG stats/modify_node_event update node clients (0)
Is this toolchain even compatible with HE-AAC streams? I know Nero is, which is why I'm using it, but I have my doubts about ezstream and icecast.
Can anyone help me shed some light on this please? I can post config files galore, but I don't want to make this post too big.
Many thanks.
