Insert mp3 & m4a Files

This forum is for general questions about extensions for Joomla! 2.5.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
danlee58
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Mon Mar 05, 2007 2:07 am

Insert mp3 & m4a Files

Post by danlee58 » Sun Jan 30, 2011 12:42 pm

I am trying to get mp3 & m4a files to run when a page opens. I can play AVI videos on Windows Media Player by clicking on a link, but I cannot play a mp3 or m4a files by clicking on a link. I want them to play when the page opens with no user interface, and no visible effects.

What Plug-in, Module, or Extension do I need to play these files.

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Insert mp3 & m4a Files

Post by kenmcd » Mon Jan 31, 2011 6:24 pm

.
What are you trying to do?
Are you trying to have these files auto-play as background music?
Or do you want the files to play by the user clicking a link?
These are entirely different things.

You can cause the MP3 or M4A file to be loaded in Windows Media Player (WMP) by using a reference file as the link.
The user's system recognizes that reference file type as a WMP filetype and opens it with WMP.
The actual MP3 or M4A link inside the reference file is then played by WMP.

This is how it is done on pages where you see media links for WMP, Winamp, etc.

.
██ LibreTraining

danlee58
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Mon Mar 05, 2007 2:07 am

Re: Insert mp3 & m4a Files

Post by danlee58 » Tue Feb 01, 2011 1:10 am

I am the Administrator of a Website done with Joomla. It's a News Blog for an Automobile Club. There are many pages of Photos(.jpg), Documents(.pdf), Slide Shows(.jpg), and Videos.(.mpg). These are initiated by clicking a link.

When, I use the same process to play a .mp3 or .m4a, I get a blank page with a little red x in the corner. I don't understand why Windows Media Player doesn't play these files.

My aim is to have these files Autoplay in the background when the page is opened. I don't want any player visible.

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Insert mp3 & m4a Files

Post by kenmcd » Tue Feb 01, 2011 2:14 am

.
How different file types are handled depends on the user's system, and the browser.
These days virtually every browser automatically handles a JPG and will display it.
But a PDF is only displayed in the browser if the user was an application installed which can display a PDF,
and the browser settings are to display the file and not download it instead.

The fact you see a red X when following a link to an MP3 file tells me you do not have QuickTime installed.
QuickTime will install a browser plug-in and settings which will play an MP3 link in the browser.
Windows Media Player does not do this by default.
User's could configure their browsers to send MP3s to Windows Media Player, but this is not a default.
Windows Media Player does set itself as the browser default for certain file types.
Follow a link to a WMV or a WMA file and it will play it in the browser with the Windows Media Player plug-in.
But that will not happen if the user does not have the Windows Media Player browser plug-in.

Depending on user file type handling defaults is not reliable for these reasons.

The most reliable way is to embed a player which will play the file.
Currently the most ubiquitous player is any player based on the Flash Player browser plug-in.
Flash Player will play both MP3 and M4A (with the right codecs) in 99% of all users' browsers.
Windows Media Player will play both MP3 and M4A (with the right codecs), but many users do not have WMP.

Background music is a bad idea.
Background music with no controls is an even more bad-er-er idea.

.
██ LibreTraining

danlee58
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Mon Mar 05, 2007 2:07 am

Re: Insert mp3 & m4a Files

Post by danlee58 » Tue Feb 01, 2011 2:57 am

I do have Quick Time. I play music on iTunes on a regular basis. The music that I want to play is from my iTunes Library.

I would be willing to have simple controls, like Mute/Volume and Play/Pause. I have been on many sites where you can click on a music title and it will play, usually on a new page with the words in text, and no direct controls.

I don't understand why Autoplay in the Background on certain pages is a problem.

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Insert mp3 & m4a Files

Post by kenmcd » Tue Feb 01, 2011 3:23 am

.
iTunes is another application which is adding its own set of (intrusive) file handling defaults.
You cannot reliably expect what happens on your system to be the same on other's systems.
See above regarding relying on file extension handling defaults.

Every other internet user does not have the same system and applications, and file handling defaults.
Either provide a player, or a reference file link which is more reliable.

.
██ LibreTraining

danlee58
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Mon Mar 05, 2007 2:07 am

Re: Insert mp3 & m4a Files

Post by danlee58 » Tue Feb 01, 2011 11:08 am

kenmcd wrote:.
Every other internet user does not have the same system and applications, and file handling defaults.
Either provide a player, or a reference file link which is more reliable.

.
That's fine with me. Please suggest a minimal player, that I can use.

noussibeau
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jan 08, 2012 8:30 pm

Re: Insert mp3 & m4a Files

Post by noussibeau » Sun Jan 08, 2012 8:42 pm

Kenmcd wrote : You can cause the MP3 or M4A file to be loaded in Windows Media Player (WMP) by using a reference file as the link.

What do you exactly mean by that ?
Each time I tried to do that (Joomla 1.5), it does not work : what do you name "reference file as a link" ? Which link ? Which reference ?

Thanks for help.
Best regards
Eric

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Using Media Reference Files - Re: Insert mp3 & m4a Files

Post by kenmcd » Sun Jan 08, 2012 9:25 pm

noussibeau wrote:Kenmcd wrote : You can cause the MP3 or M4A file to be loaded in Windows Media Player (WMP) by using a reference file as the link.

What do you exactly mean by that ?
Each time I tried to do that (Joomla 1.5), it does not work : what do you name "reference file as a link" ? Which link ? Which reference ?
Don't know what it is, but "it does not work."
That's amusing.

Media reference files reference or refer-to another media file.
These reference files typically are unique to some particular player and/or OS.
Because of this uniqueness you have a better chance of knowing exactly how the users' system will handle the file.

Click on a link to a .WAX file and you are fairly sure it will open in Windows Media Player if the user has that player.
Click on a link to a .QTL file and you are fairly sure it will open in QuickTime Player if the user has that player.

The actual media file link is inside the reference file.
So if I put the MP3 or M4A file link in a .WAX file, it will open in Windows Media Player.
And if I put the MP3 or M4A file link in a .QTL file, it will open in QuickTime Player.

PLS, QTL, WAX, ASX, M3U, WPL, F4M, etc., etc.
All can link to media files, or to streaming servers for Icecast/Shoutcast, RTMP, RTSP, MMS, etc.

This technique is often used to open media in stand-alone players (Windows Media Player, QuickTime, Winamp, etc.),
but reference files can also be played with players embedded in the website pages.

Even MOV files can be used as reference files.
Apple uses this to help hide the actual movie file locations on their movie trailers website.

Put an RTSP stream link in an MOV file and you can play it with QuickTime on the web page.


So what are you trying to do?
.
██ LibreTraining

noussibeau
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jan 08, 2012 8:30 pm

Re: Insert mp3 & m4a Files

Post by noussibeau » Sun Jan 08, 2012 9:35 pm

Hi,
thanks for trying to help me.
I clearly understand the link between the postfix (.XXX) of a file and a tool .. that's not my problem.
My problem is that :
I've a mp3 file mysong.mp3 in a directory let's say d:/www/mywebsite/music
So the complete name of that file is d:/www/mywebsite/music/mysong.mp3
how to use that name and in which joomla menu objet to place it so that when clicking that menu item, the tools managing mp3 let me to hear it.
I know, it seems simple but ..
I hope that's clear ..
Thanks

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Insert mp3 & m4a Files

Post by kenmcd » Sun Jan 08, 2012 9:40 pm

.
I have not tried linking to an MP3 from a menu item, but I imagine it could work.

Above you show file system locations for the MP3 files.
Menu items should be a URL.

Perhaps that is your issue.

.
██ LibreTraining

noussibeau
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jan 08, 2012 8:30 pm

Re: Insert mp3 & m4a Files

Post by noussibeau » Sun Jan 08, 2012 9:51 pm

I tried linking MP3 from a menu item .. with no success ..
Why ? I don't no! Each time Itried to use a URL I received insults saying that "there is no function for D: (a message like that). If I had HTTP// in front, it does not work, if I try relative path .. no more success ... !
That' a mess!
Could you either find a solution (probably the correct way to use the URL) or suggest an alternative way.
I just want that someone, supposed to have the correct tool to read mp3, can read the file by simply clicking a menu item ..
Thanks for your kindness and excuses for my approximative english
Eric

Michelle Page
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Feb 01, 2012 8:42 pm

Re: Insert mp3 & m4a Files

Post by Michelle Page » Fri Feb 10, 2012 9:51 pm

Hi, Ken.

I have been reading your advice to DanLee on inserting sound. I certainly laughed at your comment about (unbridled) music on any website. I immediately leave any site that tries that trick.

I, too, am very new at Joomla.

I have an .m4a file that I would like to attach to a link in an article.

What I have tried to do is insert the following html into an article (Hear my interview with Marco Werman on PRI's the World: {audio}01 Disc 1.m4a{/audio}). I think this may work, but I need to figure out how to actually load the physical sound file into my project.

I will take your advice and would like to use Flash Player.

I need details as I have been doing this less than a week, still need to upgrade my Tiger to a Leopard, thus I have no TextWrangler or Notepad.

Thanks in advance for your help.

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Insert mp3 & m4a Files

Post by kenmcd » Sat Feb 11, 2012 1:08 am

.
The curly brackets tags like {audio}01 Disc 1.m4a{/audio} are used by plug-ins.
The plug-in finds this in the article and replaces it with something else.
So a plug-in is usually required which looks for this particular tag.

For example if you install the AllVideos Plugin it will look for {m4a} tags, and replace them with a player.
The {m4a} tag is by default played with the JW Player for Flash.

And it knows where to find the file so you just use the file name (no ext. for local files).
In J1.7/J2.5 that default location is /images/audio/.
Upload the file there using Media Manager or FTP.

Then enter the tag in the article: {m4a}01 Disc 1{/m4a}
The plug-in will replace the tag with a player for that file.

Note: not a good idea to use file names with spaces, I would fix those first.
And a more descriptive file name would help in the future.
.
██ LibreTraining

Michelle Page
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Feb 01, 2012 8:42 pm

Re: Insert mp3 & m4a Files

Post by Michelle Page » Sat Feb 11, 2012 11:11 pm

Hi, Ken.

Thanks for your prompt and detailed response. I did indeed change the name to {audio}NPR.m4a{/audio} . That should make things clearer.

I'm not sure if the trouble that I am having is due to my lowly Tiger status, limiting my text writing.

I went to plug ins and enabled allvideos.

Then I went over to the media manager and tried to upload my audio file. I was not able to create a new folder with the images/audio at the end (/home/nepaldog/public_html/images/audio). And my file did not upload. The file is 8.1 Mb, is that too big?

Thanks for your help. I really appreciate it.

WebRoadrunner
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Jul 02, 2012 6:08 pm

Re: Insert mp3 & m4a Files

Post by WebRoadrunner » Mon Jul 02, 2012 7:03 pm

I am new to Joomla and Website Development as a whole. I am trying to upload music files that are in a MIDI Sequence to my media folder within Joomla. I am getting an error message, "This File Type is not Supported." How do I get around this? I am using Joomla 2.5. I was planning on using the AllVideos extension. Would this be the correct thing to do?

Thank you in advance for your assistance.

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Insert MIDI Files

Post by kenmcd » Mon Jul 02, 2012 7:47 pm

.
To upload the MIDI files you will need to add the file extension to the Legal Extensions list.
Content > Media Manager > Options > Legal Extensions (File Types)

But the AllVideos Plugin is not going to play a MIDI file.
It is simply not designed or configured to do this.

You can play a MIDI file with either Windows Media Player or QuickTime.
So you could embed one of those.

.
██ LibreTraining


Locked

Return to “Extensions for Joomla! 2.5”