Connecting Tech Pros Worldwide Forums | Help | Site Map

Real Audio http streaming without .ram file

Daniel
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi all,

I wanted a way to (http) stream Real Audio files without the need to use
..ram files. In case there are others interested in this, the following is
the solution that worked for me:

<?php
Header("Content-Type: audio/x-pn-realaudio");
echo "http://www.domain.com/audiofolder/track1.rm";
?>

Please let me know if you see any problems with this solution.

/Daniel



MeerKat
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Real Audio http streaming without .ram file


Daniel wrote:
[color=blue]
> Hi all,
>
> I wanted a way to (http) stream Real Audio files without the need to use
> .ram files. In case there are others interested in this, the following is
> the solution that worked for me:
>
> <?php
> Header("Content-Type: audio/x-pn-realaudio");
> echo "http://www.domain.com/audiofolder/track1.rm";
> ?>
>
> Please let me know if you see any problems with this solution.[/color]

Presumably this will fail on larger files as PHP will quit after a
certain number of seconds (15 by default isnt it?).
[color=blue]
> /Daniel
>
>[/color]

--
MeerKat

vKp
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Real Audio http streaming without .ram file


MeerKat wrote:[color=blue]
> Daniel wrote:
>[color=green]
>> Hi all,
>>
>> I wanted a way to (http) stream Real Audio files without the need to use
>> .ram files. In case there are others interested in this, the following is
>> the solution that worked for me:
>>
>> <?php
>> Header("Content-Type: audio/x-pn-realaudio");
>> echo "http://www.domain.com/audiofolder/track1.rm";
>> ?>
>>
>> Please let me know if you see any problems with this solution.[/color]
>
>
> Presumably this will fail on larger files as PHP will quit after a
> certain number of seconds (15 by default isnt it?).
>[/color]

It shouldn't do. As far as I can see, PHP isn't doing the streaming. The
browser hands off the track location to whatever is set up to handle
that MIME type, usually RealPlayer. So PHP would only execute for a
fraction of a second.

Daniel
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Real Audio http streaming without .ram file



"MeerKat" wrote:[color=blue]
> Daniel wrote:
>[color=green]
> > Hi all,
> >
> > I wanted a way to (http) stream Real Audio files without the need to use
> > .ram files. In case there are others interested in this, the following[/color][/color]
is[color=blue][color=green]
> > the solution that worked for me:
> >
> > <?php
> > Header("Content-Type: audio/x-pn-realaudio");
> > echo "http://www.domain.com/audiofolder/track1.rm";
> > ?>
> >
> > Please let me know if you see any problems with this solution.[/color]
>
> Presumably this will fail on larger files as PHP will quit after a
> certain number of seconds (15 by default isnt it?).
>[color=green]
> > /Daniel
> >
> >[/color]
>
> --
> MeerKat
>[/color]


Thanks for your reply MeerKat. What I wanted was to get rid of the need for
..ram files and a PHP script to replace a .ram file. I'm really no expert how
this all work but I assume the PHP script has nothing to do with the actual
streaming, only telling the Real Player where to find the .rm file and
leaves the rest all up to the player. The following is from my phpinfo:

Apache
Connection: 300 - Keep-Alive: 15

HTTP Response Headers
Keep-Alive timeout=15, max=100

I played a 4 minute long track this way and it worked with these settings.

Regards,

Daniel


MeerKat
Guest
 
Posts: n/a
#5: Jul 17 '05

re: Real Audio http streaming without .ram file


Daniel wrote:[color=blue]
> "MeerKat" wrote:
>[color=green]
>>Daniel wrote:
>>
>>[color=darkred]
>>>Hi all,
>>>
>>>I wanted a way to (http) stream Real Audio files without the need to use
>>>.ram files. In case there are others interested in this, the following[/color][/color]
>
> is
>[color=green][color=darkred]
>>>the solution that worked for me:
>>>
>>><?php
>>>Header("Content-Type: audio/x-pn-realaudio");
>>>echo "http://www.domain.com/audiofolder/track1.rm";
>>>?>
>>>
>>>Please let me know if you see any problems with this solution.[/color]
>>
>>Presumably this will fail on larger files as PHP will quit after a
>>certain number of seconds (15 by default isnt it?).
>>
>>[color=darkred]
>>>/Daniel
>>>
>>>[/color]
>>
>>--
>>MeerKat
>>[/color]
>
>
>
> Thanks for your reply MeerKat. What I wanted was to get rid of the need for
> .ram files and a PHP script to replace a .ram file. I'm really no expert how
> this all work but I assume the PHP script has nothing to do with the actual
> streaming, only telling the Real Player where to find the .rm file and
> leaves the rest all up to the player. The following is from my phpinfo:
>
> Apache
> Connection: 300 - Keep-Alive: 15
>
> HTTP Response Headers
> Keep-Alive timeout=15, max=100
>
> I played a 4 minute long track this way and it worked with these settings.[/color]

This is interesting and I'll have a play myself. Not entirely sure my
webspace provider will be too impressed though hehe...

MK.
[color=blue]
> Regards,
>
> Daniel
>
>[/color]

--
MeerKat

Closed Thread