View Full Version : flash, music, mp3 problems
Esk247
20th April 2009, 21:51
got a few flash problems.
1. I upload 3 mp3 tracks to a website. Track one works perfectly, track two and three play like your under water, you cannot hear anything but muffled singing. These are converted to .swf format to work within a flash webpage. they work fine in mp3 in my normal player but when converted to flash 1 will work and the other 2 die...any ideas?
2. have another website with videos on. they are in .swf format aswell. all videos work and stream perfectly apart from one! it just will not work..blank screen appears. its on the server in .fla and .swf file, it works from my local folder e.g. when i test the website on my own computer but as soon as i upload to the internet it disappears. any ideas?
DotNetWebs
20th April 2009, 22:08
Hi
I have found out the hard way that there are several bugs or 'gotchas' with Flash MP3 encoding.
I have to crash out now as up very early buy here is one link that I has recently helped me:
http://www.blackcj.com/blog/2009/01/30/flash-player-10-48khz-sound-playback-bug/
If you are still struggling I will try and post more next time I am on the forum.
Regards
Dotty
FireFleur
20th April 2009, 23:36
You can convert from ogg vorbis to fla that tends to sound better than mp3 to fla.
cmcp
20th April 2009, 23:48
Would you not set up a flash player with XML file that lists the location of the actual MP3 to stream?
And with videos do they not work best when streamed as .flv files?
FireFleur
20th April 2009, 23:53
Yes it is flv I meant, you had me check :)
It can be done with MP3 embedded into the SWF but looks like more trouble to change the track.
cmcp
21st April 2009, 00:16
Had a bit of a flash media playing nightmare myself recently - embedding in myspace. Any other site would be fine as you can use javascript tags to point to external files but this jazz needed to be lumped into the swf which was rubbish.
Got there in the end, but I'll leave flash to the nutters!
EastCoastInteractive
21st April 2009, 16:53
1. I upload 3 mp3 tracks to a website. Track one works perfectly, track two and three play like your under water, you cannot hear anything but muffled singing. These are converted to .swf format to work within a flash webpage. they work fine in mp3 in my normal player but when converted to flash 1 will work and the other 2 die...any ideas?
Make sure the mp3's are either 11/22/44khz for the sampling rate and are constant (not variable) bitrate.
You can convert from ogg vorbis to fla that tends to sound better than mp3 to fla.
In this case you'd be introducing an extra generation of lossy compression (mp3->ogg->mp3 in swf) which will degrade sound quality further. If you had to use an interim format, then use a lossless one such as .aif or a PCM wav. It is possible now to directly play ogg vorbis audio in a swf using actionscript 3, but it requires good programming chops to do so as it's not part of the in-built audio API.
2. have another website with videos on. they are in .swf format aswell. all videos work and stream perfectly apart from one! it just will not work..blank screen appears. its on the server in .fla and .swf file, it works from my local folder e.g. when i test the website on my own computer but as soon as i upload to the internet it disappears. any ideas?
Monitor the page/swf/flv interaction and load sequence via an http monitor (e.g charles web debugging proxy/firefox + httpfox etc ) to ensure the external file /player swf are actually being loaded. Chances are it's a simple path or url issue. The .fla file isn't relevant in any way to being on the web server (it's a source file for the flash design program, not a web playable file. If the video is a .flv file and is being served from an IIS server, ensure that .flv is added to the mimetypes as it isn't by default.
Esk247
21st April 2009, 19:40
thanks everyone. i'll look in to that when i'm working on those sites tomorrw. also..i would use .xml for the MP3 to create a playlist but the current MP3 player is actually embedded as part of the animation and uses ActionScript to call a maximum of 3 tracks!
FireFleur
21st April 2009, 20:49
You convert from a loseless format first not go from mp3 to ogg :)
So AIFF, WAV. CDR first then move it to ogg, then to flv.
EastCoastInteractive
21st April 2009, 21:34
In the case here, it would seem the user has their files in mp3 format already and presumeably they don't have a lossless file available, if they do then I agree they should operate from those.
If they did have a lossless master however, it would be inadvisable to decrease final output quality by converting to an ogg (first generation of data reduction and quality loss), then get a second helping of audio degradation by doing another lossy compression operation when converting to swf or mp3.
Wherever possible, it's best to convert from the highest quality format available, directly to the end format with no interim stages that introduce uneccessary quality loss. It's worth a read of the transcoding section on en.wikipedia[dot]org/wiki/Generation_loss for more info.
FireFleur
21st April 2009, 22:01
You convert to ogg then to flv :) The fla was a mistake on my behalf, which I corrected, I don't work in flash movie files for base, I use libming with C, Perl or Python.
Yes you should have the master, if you don't it is crazy and there is probably a copyright violation going on, you cannot convert music you don't own or have licence for, certainly not in a commercial setting.
You can encode ogg into an SWF, you use libming and the SWF::SoundStream Perl module. But it is better to use the SWF::VideoStream and many flvs nowadays, to easily change track, if you use the soundstream you have to match the frames.
Another way is just to do it all in actionscript, you will need to use actionscript anyway to control the NetStream.
Esk247
22nd April 2009, 11:13
it's ok with regards to copyright. the client purchased a template for me to edit. We're writing over the original mp3 files to make it work. The template has 4 pages but they are within an animation thus making it more difficult for me to add a new player. I would normally just create a couple of buttons or an XML playlist and add a few frames to the animation and hey presto. But i can't. If i do that then the animation stops at the end of the first track and you can't get anywhere. It's a bit of a pest. The template looks great but is limited in way of editing. You can overwrite the mp3 files but you cannot add more tracks, the actionscript thats pre-installed won't let you without dragging it all out and starting again. It's also not clear how they've built it...i have the source files for the whole website but it has several parts to the player and it doesn't show where its dragging the source from..it just says Play One Play Two Play Three etc and when i add Play Four nothing works and the animation hangs on the pre-loader.
May aswell just edit the 3 mp3 files as the client is quite happy with that anyway and they want to change tracks quite often so i don't want to re-do the ActionScript everytime they have a new album out.
Esk247
28th April 2009, 15:36
ggrrr nope..still the video is not working! I've re-edited it from a .avi file to .fla and then into .swf. it plays in Dreamweaver and in Flash perfectly. It plays when i open it in explorer from my hard drive but when i try to play it through the website..nothing..just a white box! the other videos are working.
the .fla is on the server...the .swf is on the server! the location is correct, it works in everything apart from the internet.
Any ideas?
EastCoastInteractive
28th April 2009, 15:41
If you PM the url I'll have a look if you want.
Esk247
28th April 2009, 15:50
i have pm'd you.
komandin
28th April 2009, 19:37
1) Is path to swf-file true? Are you sure?
2) What size of swf-file? Try to cut swf-file - load just small part of it.
Esk247
29th April 2009, 16:31
its working now.
path to .swf was correct..it's only a tiny .swf file! no load time, it starts instantly because its so small and only lasts a minute...it was missing a source file that i've never needed to transfer before...bleh!..random!