LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Intigrate Mp3 files in Website (https://www.linuxquestions.org/questions/general-10/intigrate-mp3-files-in-website-538403/)

ctkroeker 03-17-2007 10:04 PM

Intigrate Mp3 files in Website
 
I run a website for a radio station and do weekly uploads of radio programmes(mp3) and then make a .ram file (actually a text file) that links to the mp3 which when clicked, launches a player to stream the mp3. The problem with this is, that I have to update every .ram file individually and also change the date in the website. i.e.:
RadioProgramme March 17, 2007 (link to RadioProgramme.ram).

What I would want is to make a cron job that would send the programmes via ftp to the server and then they would automatically be available to the listeners via an online player and/or a clickable url to stream it via an external player.
I'm open to suggestions.

oskar 03-18-2007 04:54 AM

don't you mean .m3u?
Aren't .ram's for real media?

ctkroeker 03-18-2007 07:55 PM

Well, your player really doesn't care which one, they both are just text files (in my case) that link to the .mp3, although that is kind of irrelevant to this post. I just want a solution/alternative to the current situation described above.

benjithegreat98 03-20-2007 10:27 AM

I fail to see the point of the ram file..... I clicked on one from your site and Firefox didn't know what to do with it..... Why can't you link directly to the mp3? Or are you wanting to have your own custom streamer on the site?

Are you wanting to do something like this guy has? http://digitalmedia.oreilly.com/2005...mp3_embed.html

If you are wanting to not have to edit the page everyday, then maybe you could integrate a database in there somehow along with a cron job to automatically upload the mp3s and use a little php magic to show the latest programs.

ctkroeker 03-20-2007 10:49 AM

Quote:

Originally Posted by benjithegreat98
I fail to see the point of the ram file..... I clicked on one from your site and Firefox didn't know what to do with it..... Why can't you link directly to the mp3? Or are you wanting to have your own custom streamer on the site?

Are you wanting to do something like this guy has? http://digitalmedia.oreilly.com/2005...mp3_embed.html

If you are wanting to not have to edit the page everyday, then maybe you could integrate a database in there somehow along with a cron job to automatically upload the mp3s and use a little php magic to show the latest programs.

Now were talking. Yeah, I want something like that guy has. As to doing this automatically, I'd love to but haven't the least idea how I would do it, hence this thread. Do you know of a guide on how to do that?

benjithegreat98 03-20-2007 11:20 AM

As for a guide on how to specifically do that, I doubt one would exist. You would need to start researching things like how to build a database, how to use php. Mysql comes with about every linux distro, so you could definitely start playing with that. I would start with learning the in and outs of databases and tables and the SQL language that can query the database.

As for php, there are many tutorials to get you started on that. I think there is a good one at http://www.w3schools.com/php/

Actually, come to think of it you may not even need a database. You could use a naming convention for the files that involves the date and time. PHP would be able to sort the files in a directory or use only the files that have a certain file name in relation to that days date. You'll just have to play with it.

ctkroeker 03-20-2007 11:36 AM

Well, now that I think of it, I really don't want to learn something new. I just want to put something up quick and forget about it. At least till it breaks. I think I'll just link it straight to the MP3 and see wha tpeople say about it. Thanks for the help and if there are any more specific suggestions, I'm still all ears.


All times are GMT -5. The time now is 04:31 PM.