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 

File Streaming
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Thu Jul 06, 2006 2:36 am    Post subject: File Streaming Reply with quote

Hello Karl
Thanks for your help earlier, but I have a few more questions regarding Icecast and streaming.
I wanted to stream some files - on-demand or just repeat them (doesn't matter). They are about 2 hours in length. I had earlier tried with NSV GUI but it buffers a lot for some reason - despite all the settings I tried. So I was wondering is there a way in Icecast you can do file streaming directly? Without using nsvgui or something?

Thanks,
vbwrong
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Jul 06, 2006 2:23 pm    Post subject: Reply with quote

icecast does allow the downloading of files from webroot but there is no special processing of those as that requires codec knowledge, but some use that for on-demand streaming.

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



Joined: 28 Jun 2006
Posts: 20

PostPosted: Thu Jul 06, 2006 3:08 pm    Post subject: Reply with quote

Oh I see. Could someone (or you Karl when you have time) guide me step by step on that and how I would do that? Do I place the nsv files in /web folder? And how would I configure Icecast so it knows I'm doing file/on-demand streaming
Thanks, vbwrong
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Jul 06, 2006 7:59 pm    Post subject: Reply with quote

if the file is myfile.nsv, then place myfile.nsv in webroot and the link is http://host:port/myfile.nsv[.m3u]

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



Joined: 28 Jun 2006
Posts: 20

PostPosted: Thu Jul 06, 2006 8:39 pm    Post subject: Reply with quote

Okay I'm totally confused. Sorry I know this is frustrating but I'm a complete noob at this. What do you mean by webroot in the first place? And can I add authentication to this link somehow? Also, what will my config file in Icecast have for this? Thanks
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Jul 06, 2006 8:41 pm    Post subject: Reply with quote

webroot is a setting in your icecast xml config. You can add authentication to webroot files, just add a <mount> with the mount name of the file in question eg /myfile.nsv

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





PostPosted: Thu Jul 06, 2006 10:00 pm    Post subject: Reply with quote

I wrote some scripts in ASP.Net to do on demand streaming. This fills for void for me; when it comes to the on demand stuff.

Take a look at:

http://www.wmph.org/OnDemand/SinglesEvents.aspx

for a working example. This page enumerates a directory on the webserver (reads the ID3's out of the files), and streams them as requested by the user.

If you want the code, look at the projects section of my site:

http://www.barnyardbbs.com

Hope this helps.

-Ben
Back to top
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Fri Jul 07, 2006 5:23 am    Post subject: Reply with quote

Hey
Thanks a lot for your help beervamint and Karl. I placed the file in webroot and it is working fine now. The only thing I need (and I promise, it's the last question!) to know is this:
I basically have the users in my site input their username and password, and when they click "Watch" , it opens winamp with the stream. But with this webroot method, when they click "Watch", it says "Source does not exist". Now I believe it is because since this is on-demand, it doesn't find the stream online at the moment and says that?
This is the HTML code I use (for users to input user/pass and click watch to open winamp):

Code:
</form>
<table border="0"><form action="http://72.232.213.202:8020/admin/buildm3u" method="get"><tbody><tr><td>[B]Username:[/B] <input name="username">
</td><td>[B]Password:[/B] <input name="password" type="password">
</td><td><input value="Watch!" type="submit">
</td></tr></tbody></table></center><input value="/stream.nsv" name="mount" type="hidden"></form>


The port of the icecast running this is 8020 and the file name is stream.nsv
I tried playing it directly on winamp and it works fine - I just need a way to put it on my site so when users enter user/pass and click watch, it opens winamp with this link:
http://user:pass@72.232.213.202:8020/stream.nsv (it does this for all my other streams that I stream using NSV CAPTURE, but since this is a file streaming it's not working.)

Could someone help as to what HTML I should edit to make it open the link in winamp with their user/pass they input.

Thanks
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Fri Jul 07, 2006 1:45 pm    Post subject: Reply with quote

I'm not an expert on buildm3u; but I think that's your problem. I don't think it works with http-served files.

You could always throw together a quick script for it. On my sites, I don't use m3u's; but I've got dynamic scripts for asx's and pls's. (ASP.Net).
Back to top
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Fri Jul 07, 2006 2:56 pm    Post subject: Reply with quote

Oh I see. Thing is I'm not an expert with scripts Sad I try to keep it simple and just use HTML mostly lol. So it is because when they click watch, there is no stream there (as of yet) and so it says "Source Not found". I'll see and try to make it so it allows them to input user/pass and just opens winamp with that link - and not try to connect to the source first. Lets see how it goes...I'm a little confused with this.

Thanks for your help though Smile
vbwrong
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Fri Jul 07, 2006 4:14 pm    Post subject: Reply with quote

It shouldn't be hard to make a short script that will give you an m3u (or other playlist type).

The script just takes some parameters (such as user and pass), and returns a special text file (m3u, pls, and asx are just text really).

What type of host are you using? What scripting language is supported? PHP? Perl? Asp? Asp.Net?

I'm no PHP guy; but I'm pretty certain I could make what you need in short order.
Back to top
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Fri Jul 07, 2006 9:07 pm    Post subject: Reply with quote

Hello
I'm using Trancehosting and I believe all scripts are supported - php , perl asp, asp.net, java, javascript, html. The thing is that this will be a 'post' in my vbulletin, so it will allow scripts right? I would really appreciate it if you could help me with this script as I have no knowledge of scripts really.

Thanks
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Sat Jul 08, 2006 2:31 am    Post subject: Reply with quote

If your host supports scripting, then you're in business. Here's how it will work:

Your existing form will "Post" (or pass information, such as the name and password) to the script. The script will return a playlist to the client. I usually do ASX for Windows Media Player, and PLS for Winamp / Other. No reason you couldn't do M3U.

I'll throw together a sample.
Back to top
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Sat Jul 08, 2006 3:36 am    Post subject: Reply with quote

Oo nice Very Happy Yup my hosting supports scripting Smile

I am eagerly waiting for your sample as I don't have much knowledge in scripting.

Thanks a bunch

I hope I can get this to work.

vbwrong
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Sun Jul 09, 2006 9:05 pm    Post subject: Reply with quote

Here's a little script that will create a PLS for you. It can easily be adapted for M3U or ASX, if you want them.

Sorry for the delay. I'm not a PHP guy. I had to install it before I could test-compile the script. I looked at your hosting company, and PHP was the only language supported.

Here's the script. You should have your name/password entry target this script. It will provide the playlist for the user's media player.

<?php
/* Set the content type, and make it force a download */
header("Content-type: audio/x-scpls");
header("Content-Disposition: attachment; filename=dynamic.pls");

/* Change this to the location of your stream. */
$StreamLocation = "www.wmph.org/OnDemand/OnDemand.aspx?Target=Club91764k";

$ResultString .= "[playlist]\n" . "File1=http://" . $_POST["username"] . ":" . $_POST["password"] . "@" . $StreamLocation . "\nLength=-1\nNumberOfEntries=1\nVersion=2";

print $ResultString;
?>

I put a sample URL in place, just to get it going. It's ready to work with the username/password; but it will also work without them.

Hope this helps.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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