Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with Ogg Vorbis streams

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches
View previous topic :: View next topic  
Author Message
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sun Jul 06, 2008 10:05 am    Post subject: Problems with Ogg Vorbis streams Reply with quote

Hello.

I'm developing a plugin for Audacious media player (http://audacious-media-player.org) which acts as a source for icecast2 server using libshout.

When I use mp3 encoder, it works ok, but fails when I try to use Ogg Vorbis.
Here are the logs:
Code:
[andrew@pc-linux:~]: http_proxy= mplayer -loop 0 http://127.0.0.1:8000/test
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 2.66GHz (Family: 15, Model: 3, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick

Playing http://127.0.0.1:8000/test.
Invalid proxy setting... Trying without proxy.
Resolving 127.0.0.1 for AF_INET6...
Couldn't resolve name for AF_INET6: 127.0.0.1
Connecting to server 127.0.0.1[127.0.0.1]: 8000...
Cache size set to 320 KBytes
Cache fill:  0.00% (0 bytes)   nop_streaming_read error : Resource temporarily unavailable
Cache fill:  0.00% (0 bytes)
(repeated multiple times)
Icecast server's log:
Code:
[2008-07-06  12:37:14] DBUG slave/_slave_thread checking master stream list
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node clients (1)
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node connections (3381)
[2008-07-06  12:38:44] INFO connection/_handle_source_request Source logging in at mountpoint "/test"
[2008-07-06  12:38:44] DBUG connection/connection_complete_source sources count is 0
[2008-07-06  12:38:44] DBUG source/source_apply_mount Applying mount information for "/test"
[2008-07-06  12:38:44] DBUG source/source_update_settings public set to 0
[2008-07-06  12:38:44] DBUG source/source_update_settings max listeners to -1
[2008-07-06  12:38:44] DBUG source/source_update_settings queue size to 524288
[2008-07-06  12:38:44] DBUG source/source_update_settings burst size to 65535
[2008-07-06  12:38:44] DBUG source/source_update_settings source timeout to 10
[2008-07-06  12:38:44] DBUG source/source_update_settings fallback_when_full to 0
[2008-07-06  12:38:44] DBUG connection/connection_complete_source source is ready to start
[2008-07-06  12:38:44] DBUG fserve/fserve_add_client_callback Adding client to file serving engine
[2008-07-06  12:38:44] DBUG source/source_init Source creation complete
[2008-07-06  12:38:44] DBUG admin/admin_handle_request Admin request (/admin/metadata)
[2008-07-06  12:38:44] DBUG admin/admin_handle_request Got command (metadata)
[2008-07-06  12:38:44] INFO admin/admin_handle_request Received admin command metadata on mount "/test"
[2008-07-06  12:38:44] DBUG admin/command_metadata Got metadata update request
[2008-07-06  12:38:44] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node sources (1)
[2008-07-06  12:38:44] DBUG stats/process_source_event new source stat /test
[2008-07-06  12:38:44] DBUG stats/process_source_event new node public (0)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node server_name (no name)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node server_description (Unspecified description)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node genre (various)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node server_type (application/ogg)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node max_listeners (unlimited)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node source_ip (127.0.0.1)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node user_agent (libshout/2.2.2)
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node clients (2)
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node connections (3382)
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node source_client_connections (10)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node listeners (0)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node listenurl (http://localhost:8000/test)
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node source_total_connections (10)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node slow_listeners (0)
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node listeners (0)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node listener_peak (0)
[2008-07-06  12:38:44] DBUG stats/process_source_event new node stream_start (Sun, 06 Jul 2008 12:38:44 +0300)
[2008-07-06  12:38:44] DBUG stats/modify_node_event update node client_connections (3372)
[2008-07-06  12:38:45] DBUG stats/modify_node_event update node clients (1)
[2008-07-06  12:38:45] DBUG stats/process_source_event new node total_bytes_read (0)
[2008-07-06  12:38:45] DBUG stats/process_source_event new node total_bytes_sent (0)
[2008-07-06  12:38:49] DBUG stats/modify_node_event update node total_bytes_read (310326)
[2008-07-06  12:38:49] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:38:54] DBUG stats/modify_node_event update node total_bytes_read (905047)
[2008-07-06  12:38:54] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:38:59] DBUG stats/modify_node_event update node total_bytes_read (1529204)
[2008-07-06  12:38:59] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:39:04] DBUG stats/modify_node_event update node total_bytes_read (2141164)
[2008-07-06  12:39:04] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:39:09] DBUG stats/modify_node_event update node total_bytes_read (2664038)
[2008-07-06  12:39:09] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:39:14] DBUG stats/modify_node_event update node total_bytes_read (3225189)
[2008-07-06  12:39:14] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:39:15] DBUG slave/_slave_thread checking master stream list
[2008-07-06  12:39:19] DBUG stats/modify_node_event update node total_bytes_read (3811309)
[2008-07-06  12:39:19] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:39:20] DBUG auth/add_client_to_source max on /test is -1 (cur 0)
[2008-07-06  12:39:20] DBUG auth/add_client_to_source Added client to /test
[2008-07-06  12:39:20] DBUG auth/add_authenticated_client client authenticated, passed to source
[2008-07-06  12:39:20] DBUG stats/modify_node_event update node clients (2)
[2008-07-06  12:39:20] DBUG stats/modify_node_event update node connections (3383)
[2008-07-06  12:39:20] DBUG stats/modify_node_event update node client_connections (3373)
[2008-07-06  12:39:20] DBUG stats/modify_node_event update node listener_connections (14)
[2008-07-06  12:39:23] DBUG source/source_main Client added
[2008-07-06  12:39:23] INFO source/source_main listener count on /test now 1
[2008-07-06  12:39:23] DBUG stats/modify_node_event update node listener_peak (1)
[2008-07-06  12:39:23] DBUG stats/modify_node_event update node listeners (1)
[2008-07-06  12:39:24] DBUG stats/modify_node_event update node total_bytes_read (4306472)
[2008-07-06  12:39:24] DBUG stats/modify_node_event update node total_bytes_sent (0)
[2008-07-06  12:39:28] DBUG format/format_check_http_buffer processing pending client headers
[2008-07-06  12:39:29] DBUG stats/modify_node_event update node total_bytes_read (4791272)
[2008-07-06  12:39:29] DBUG stats/modify_node_event update node total_bytes_sent (102)
[2008-07-06  12:39:34] DBUG stats/modify_node_event update node total_bytes_read (5390864)
[2008-07-06  12:39:34] DBUG stats/modify_node_event update node total_bytes_sent (102)
[2008-07-06  12:39:39] DBUG stats/modify_node_event update node total_bytes_read (5989480)
[2008-07-06  12:39:39] DBUG stats/modify_node_event update node total_bytes_sent (102)
[2008-07-06  12:39:39] DBUG auth/add_client_to_source max on /test is -1 (cur 1)
[2008-07-06  12:39:39] DBUG auth/add_client_to_source Added client to /test
[2008-07-06  12:39:39] DBUG auth/add_authenticated_client client authenticated, passed to source
[2008-07-06  12:39:39] DBUG stats/modify_node_event update node clients (3)
[2008-07-06  12:39:39] DBUG stats/modify_node_event update node connections (3384)
[2008-07-06  12:39:39] DBUG stats/modify_node_event update node client_connections (3374)
[2008-07-06  12:39:39] DBUG stats/modify_node_event update node listener_connections (15)
[2008-07-06  12:39:43] DBUG source/source_main Client added
[2008-07-06  12:39:43] INFO source/source_main listener count on /test now 2
[2008-07-06  12:39:43] DBUG stats/modify_node_event update node listener_peak (2)
[2008-07-06  12:39:43] DBUG stats/modify_node_event update node listeners (2)
[2008-07-06  12:39:44] DBUG stats/modify_node_event update node total_bytes_read (6537659)
[2008-07-06  12:39:44] DBUG stats/modify_node_event update node total_bytes_sent (102)
[2008-07-06  12:39:44] DBUG format/format_check_http_buffer processing pending client headers
[2008-07-06  12:39:49] DBUG stats/modify_node_event update node total_bytes_read (7059870)
[2008-07-06  12:39:49] DBUG stats/modify_node_event update node total_bytes_sent (204)
[2008-07-06  12:39:54] DBUG stats/modify_node_event update node total_bytes_read (7607899)
[2008-07-06  12:39:54] DBUG stats/modify_node_event update node total_bytes_sent (204)
[2008-07-06  12:39:56] DBUG auth/add_client_to_source max on /test is -1 (cur 2)
[2008-07-06  12:39:56] DBUG auth/add_client_to_source Added client to /test
[2008-07-06  12:39:56] DBUG auth/add_authenticated_client client authenticated, passed to source
[2008-07-06  12:39:56] DBUG stats/modify_node_event update node clients (4)
[2008-07-06  12:39:56] DBUG stats/modify_node_event update node connections (3385)
[2008-07-06  12:39:56] DBUG stats/modify_node_event update node client_connections (3375)
[2008-07-06  12:39:56] DBUG stats/modify_node_event update node listener_connections (16)
[2008-07-06  12:39:57] DBUG source/source_main Client added
[2008-07-06  12:39:57] INFO source/source_main listener count on /test now 3
[2008-07-06  12:39:58] DBUG stats/modify_node_event update node listener_peak (3)
[2008-07-06  12:39:58] DBUG stats/modify_node_event update node listeners (3)
[2008-07-06  12:39:58] DBUG format/format_check_http_buffer processing pending client headers
[2008-07-06  12:39:59] DBUG stats/modify_node_event update node total_bytes_read (8105218)
[2008-07-06  12:39:59] DBUG stats/modify_node_event update node total_bytes_sent (306)
[2008-07-06  12:40:04] DBUG stats/modify_node_event update node total_bytes_read (8527308)
[2008-07-06  12:40:04] DBUG stats/modify_node_event update node total_bytes_sent (306)
[2008-07-06  12:40:09] DBUG stats/modify_node_event update node total_bytes_read (9048709)
[2008-07-06  12:40:09] DBUG stats/modify_node_event update node total_bytes_sent (306)
[2008-07-06  12:40:10] DBUG auth/add_client_to_source max on /test is -1 (cur 3)
[2008-07-06  12:40:10] DBUG auth/add_client_to_source Added client to /test
[2008-07-06  12:40:10] DBUG auth/add_authenticated_client client authenticated, passed to source
[2008-07-06  12:40:10] DBUG stats/modify_node_event update node clients (5)
[2008-07-06  12:40:10] DBUG stats/modify_node_event update node connections (3386)
[2008-07-06  12:40:10] DBUG stats/modify_node_event update node client_connections (3376)
[2008-07-06  12:40:10] DBUG stats/modify_node_event update node listener_connections (17)
[2008-07-06  12:40:12] DBUG source/source_main Client added
[2008-07-06  12:40:12] INFO source/source_main listener count on /test now 4
[2008-07-06  12:40:12] DBUG stats/modify_node_event update node listener_peak (4)
[2008-07-06  12:40:12] DBUG stats/modify_node_event update node listeners (4)
[2008-07-06  12:40:12] DBUG format/format_check_http_buffer processing pending client headers
[2008-07-06  12:40:12] DBUG stats/modify_node_event update node clients (6)
[2008-07-06  12:40:12] DBUG stats/modify_node_event update node connections (3387)
[2008-07-06  12:40:12] DBUG admin/admin_handle_request Admin request (/admin/metadata)
[2008-07-06  12:40:12] DBUG admin/admin_handle_request Got command (metadata)
[2008-07-06  12:40:12] INFO admin/admin_handle_request Received admin command metadata on mount "/test"
[2008-07-06  12:40:12] DBUG admin/command_metadata Got metadata update request
[2008-07-06  12:40:12] DBUG fserve/fserve_add_client Adding client to file serving engine
[2008-07-06  12:40:12] DBUG stats/modify_node_event update node client_connections (3377)
[2008-07-06  12:40:12] DBUG stats/modify_node_event update node clients (5)
[2008-07-06  12:40:14] DBUG stats/modify_node_event update node total_bytes_read (9557988)
[2008-07-06  12:40:14] DBUG stats/modify_node_event update node total_bytes_sent (408)
[2008-07-06  12:40:19] DBUG stats/modify_node_event update node total_bytes_read (10169131)
[2008-07-06  12:40:19] DBUG stats/modify_node_event update node total_bytes_sent (408)
[2008-07-06  12:40:24] DBUG stats/modify_node_event update node total_bytes_read (10729709)
[2008-07-06  12:40:24] DBUG stats/modify_node_event update node total_bytes_sent (408)
[2008-07-06  12:40:24] DBUG auth/add_client_to_source max on /test is -1 (cur 4)
[2008-07-06  12:40:24] DBUG auth/add_client_to_source Added client to /test
[2008-07-06  12:40:24] DBUG auth/add_authenticated_client client authenticated, passed to source
[2008-07-06  12:40:24] DBUG stats/modify_node_event update node clients (6)
[2008-07-06  12:40:24] DBUG stats/modify_node_event update node connections (3388)
[2008-07-06  12:40:24] DBUG stats/modify_node_event update node client_connections (3378)
[2008-07-06  12:40:24] DBUG stats/modify_node_event update node listener_connections (18)
[2008-07-06  12:40:28] DBUG source/source_main Client added
[2008-07-06  12:40:28] INFO source/source_main listener count on /test now 5
[2008-07-06  12:40:28] DBUG stats/modify_node_event update node listener_peak (5)
[2008-07-06  12:40:28] DBUG stats/modify_node_event update node listeners (5)
[2008-07-06  12:40:29] DBUG stats/modify_node_event update node total_bytes_read (11240076)
[2008-07-06  12:40:29] DBUG stats/modify_node_event update node total_bytes_sent (408)
[2008-07-06  12:40:30] DBUG stats/modify_node_event update node clients (7)
[2008-07-06  12:40:30] DBUG stats/modify_node_event update node connections (3389)
...

http://127.0.0.1:8000/admin/stats.xsl:
Quote:
Mount Point : (/test)
List Clients | Move MountPoints | Update Metadata | Kill Source

genre various
listener_peak 5
listeners 5
listenurl http://localhost:8000/test
max_listeners unlimited
public 0
server_description Unspecified description
server_name no name
server_type application/ogg
slow_listeners 0
source_ip 127.0.0.1
stream_start Sun, 06 Jul 2008 12:38:44 +0300
total_bytes_read 12234340
total_bytes_sent 510
user_agent libshout/2.2.2


Source can be retrieved from http://hg.atheme.org/users/chrome/audacious-plugins-icecast
Plugin itself is src/icecast/icecast.c. It uses encoding backends from src/filewriter/mp3.c and src/filewriter/vorbis.c
What can be wrong?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jul 06, 2008 1:25 pm    Post subject: Reply with quote

The error log reports that data is being read, so there is some content and you have the correct mime-type. You will have issues with some players with that mountpoint as they rely on extensions for codec selection. The key thing that stands out though is that there is no report of vorbis being detected in the incoming data.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sun Jul 06, 2008 1:54 pm    Post subject: Reply with quote

can you try to compile this and reproduce on your system?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jul 06, 2008 3:26 pm    Post subject: Reply with quote

have you verified whether the content being sent is ogg vorbis?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sun Jul 06, 2008 3:39 pm    Post subject: Reply with quote

At least it looks like Ogg Vorbis (you can see "OggS" signature appearing in dumps), and if I write it to file, and don't send to libshout, I can play it using any Ogg Vorbis player.
Back to top
View user's profile Send private message
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sun Jul 06, 2008 3:51 pm    Post subject: Reply with quote

Andrew O. Shadoura wrote:
At least it looks like Ogg Vorbis

Code:
outputlength=0, length=59...adding
outputlength=59, length=4155...flushing
ice_write[0:59](OggS..@.........)
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jul 06, 2008 6:25 pm    Post subject: Reply with quote

Capture the content received by icecast (eg tcpdump), that is what it has to work with. If icecast identifies ogg then it will report it but it doesn't even look like that is occurring. Best thing to do is check what is actually sent, not what the app thinks it's sending.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sat Jul 12, 2008 11:36 pm    Post subject: Reply with quote

Hello again. (There were some problems with internet connection last week.)

I tried to capture packets to icecast server:
Code:
[root#pc-linux:~]: tcpdump -w capture.bin -s 0 -l -X -i any dst port 8000
tcpdump: WARNING: Promiscuous mode not supported on the "any" device
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
^C
176 packets captured
352 packets received by filter
0 packets dropped by kernel


As forum doesn't allow attaching files, here's a link to this capture file: http://belamp.host.sk/dl/capture.bin
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Jul 13, 2008 12:53 am    Post subject: Reply with quote

The ogg data in the capture is not valid. I don't see any headers to check the content. It doesn't play here at all, what have you used to verify this?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sun Jul 13, 2008 5:24 pm    Post subject: Reply with quote

Can you look at the code?
Back to top
View user's profile Send private message
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sun Jul 13, 2008 9:45 pm    Post subject: Reply with quote

Hello.

I've added outgoing packets dumping right before shout_send(). Resulting file is not playable. First 8192 bytes are here: http://belamp.host.sk/dl/debugoutput

--
WBR, Andrew
Back to top
View user's profile Send private message
Andrew O. Shadoura



Joined: 06 Jul 2008
Posts: 8

PostPosted: Sun Jul 13, 2008 10:12 pm    Post subject: Reply with quote

Problem resolved.

The very first packet was not written because of my mistake: connection was established _after_ first packet being sent.

Anyway, thanks for your help.

--
WBR, Andrew
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber