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 

Need guidance

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Video Streaming
View previous topic :: View next topic  
Author Message
woogieman



Joined: 11 Apr 2009
Posts: 32
Location: Eugene, OR. USA

PostPosted: Mon Nov 01, 2010 2:42 pm    Post subject: Need guidance Reply with quote

I am currently working on a WebCam/Camera app using C#. I tried using libVLC wrappers but VLC and the wrappers were way too slow for any serious camera action.
I have ported most of the libshout, libogg and libtheora libraries into .NET managed code. What I need help with is the order of operations in sending a stream to the icecast server.
I have the following order of operation. Any corrections would be greatly appreciated.

    1. Open connection to icecast server.
    2. Grab WebCam data.
    3. Encode data buffer to Ogg Theora.
    4. Send to icecast server.
    5. Loop back and do it again.

This sounds simple but I feel like I am missing something. Any feedback is greatly appreciated. Any C# programmers out there?
Back to top
View user's profile Send private message Visit poster's website
woogieman



Joined: 11 Apr 2009
Posts: 32
Location: Eugene, OR. USA

PostPosted: Thu Nov 04, 2010 7:13 pm    Post subject: Hey out there Reply with quote

Hey KarlH are you out there? I need to at least find a diagram or code example that can show me the dependencies and order of operations for writing an app that will stream a webcam. I can't seem to find any examples that send Video??
Any help on the dependencies especially. Do I use libTheora? libOgg? libVorbis?
1. Capturing a stream
2. Encoding the stream
3. Sending the stream
You've always been a great help and I thank you in advance.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Nov 04, 2010 8:07 pm    Post subject: Reply with quote

C# is not something I've used so I didn't comment. Essentially the 3 steps to simulate are dvgrab, ffmpeg2theora and oggfwd. search for examples of that usage. vlc is another self contained way but I don't know how it compares performance wise. The latter libtheora releases are faster so you may of been using an older library release for encoding.

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



Joined: 11 Apr 2009
Posts: 32
Location: Eugene, OR. USA

PostPosted: Fri Nov 05, 2010 1:37 pm    Post subject: Reply with quote

Sorry to throw you off with the C#. I mainly needed the order of operations like you were so kind to point out.
I looked at your suggestion and that is fine for Linux but I am using Windows for the broadcaster and need to control the source code.
Also I am using the libOgg, libTheora, libVorbis and libShout as the backend. If I am on the right track with my list then cool! Any suggestions on my list is greatly appreciated.
I am trying to avoid as much work as possible. I hate to code something and then find I didn't need to do it. In other words if I don't need one of the libs listed above then it will save a lot of work.
Once again thanks.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Nov 05, 2010 2:08 pm    Post subject: Reply with quote

you don't require libshout really, you won't be sending this to shoutcast. If you can handle sending the http, SOURCE ... http/1.0 and basic auth then that will get you connected. You will need the libs for encoding the stream, obviously video will be more processor intensive than audio so than could be an initial testing point for assessing the usage.

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



Joined: 11 Apr 2009
Posts: 32
Location: Eugene, OR. USA

PostPosted: Fri Nov 05, 2010 5:08 pm    Post subject: Reply with quote

Once again thanks karlH. I have been tearing apart source examples and noticed the headers starting with "SOURCE" and having different content-types. That is what I am missing when I send the data to the server after encoding. Do you know where to find a list of content-types for the header? Once I have that info I think I have it by the knards.

I know you don't know C# and .NET but the flexibility of the system is why I want to port it. Most 3rd party libraries now have a .NET version of their .dll. Example: You want MySQL libraries (which icecast sorely needs) you just plug them in. I am sure you could see the need for a login system that is browser independent using MySQL. We can also use it to create songlists for ASCAP, BMI, and SESAC. We are working on offering that service to our Internet Radio Stations to help pay their royalties. Yea we do it the legal correct way here. Check us out: http://www.inwoon.net

Plus the fact that .NET is actually becoming a cross-platform programming system with a version for Mac and Linux. It is a pain to update all of my code but well worth it in the future especially for client application programming.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Nov 05, 2010 7:09 pm    Post subject: Reply with quote

the content type is application/ogg for an ogg stream, the theora part is just an element of it that is detected.

SOURCE /mountpoint http/1.0
content-type: application/ogg
Auth.....

most of this is basic http spec, the SOURCE line is different because http does not cover it. The libshout wrapper is there it allow for using shoutcast as an alternative source (2 ports) but as ogg is being used then that option does not need considering.

As for the mysql login option, that has been around for a while, url auth allows you to plugin to any setup you want including asp. You may not even way straight forward username/password but maybe query args eg

http://host:8000/stream?session=12345678

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Video Streaming 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