473,395 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Real Audio http streaming without .ram file

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
Jul 16 '05 #1
4 3571
Daniel wrote:
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.
Presumably this will fail on larger files as PHP will quit after a
certain number of seconds (15 by default isnt it?).
/Daniel


--
MeerKat

Jul 16 '05 #2
vKp
MeerKat wrote:
Daniel wrote:
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.

Presumably this will fail on larger files as PHP will quit after a
certain number of seconds (15 by default isnt it?).


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.

Jul 16 '05 #3

"MeerKat" wrote:
Daniel wrote:
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.


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


--
MeerKat

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
Jul 16 '05 #4
Daniel wrote:
"MeerKat" wrote:
Daniel wrote:

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.
Presumably this will fail on larger files as PHP will quit after a
certain number of seconds (15 by default isnt it?).

/Daniel


--
MeerKat


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.


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

MK.
Regards,

Daniel


--
MeerKat

Jul 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Sugapablo | last post by:
I had an idea for something that I can't find any evidence if it exists, or if it can be done. I assume it can be done. What I'd like to be able to do, is to allow people who come to my website,...
4
by: Robert Oschler | last post by:
Hello, I have a web site that has an audio file on it that I make available for download. Right now I'm using the "right-click/save-as" approach. This is because left-clicking the link to the...
6
by: Quentin | last post by:
Hi, I want to save an audio stream into a circular file so that I only keep say the last hour's audio. Can anybody help? Cheers, Quentin
8
by: Tony K | last post by:
Is streaming audio capable in asp.net 2.0 / AJAX? What I mean by streaming audio is: ability to play one or more songs back to back...or maybe even let the user select several songs to play and it...
1
by: Chris | last post by:
Hi, Can anyone point me to info on how to stream audio from a web server in more or less real time (i.e. exact synchronization is not an issue but it would be nice if the stream was no more than...
2
by: cityrocker2005 | last post by:
Hi! Programmers, I have code for streaming audio file from remote server, if anybody know about it please send it to me.
1
by: DILA | last post by:
Hi, I have included an embedded Real Player and an embedded Quick Time Player for streaming videos, in my web pages. I'm interested in searching for a method or a script to disable the...
3
by: homec | last post by:
Hi, I have included an embedded Real Player and an embedded Quick Time Player for streaming videos, in my web pages. I'm interested in searching for a method or a script to disable the ...
14
by: dE|_ | last post by:
For months I have been happily using a downloaded JS file and inline script to embed and control the parameters of SWF files which I use as mp3 players with actionscript. The last so.addParam...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.