Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Flash Media Player with AAC Encoded Stream
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Listener Clients
View previous topic :: View next topic  
Author Message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jul 09, 2010 1:26 pm    Post subject: Reply with quote

the type setting needs to be in the url for the stream (it's to tell icecast that flv wrapping is required. the soAddVariable does not do that which explains why you are getting a normal memory consuming playback.

The example I've used is to specify

<param name="flashvars" value="file=/stream%3Ftype%3D.flv&provider=video&duration=9999999&autostart=true" />

here we see the type set on file itself, whereas provider, duration and autostart are set for flash/player, so type is not a variable. For longtail, the duration is required for v5 and above, there have been some other quirks I've heard reported regarding the autostart not working on 5.1/5.2 with flash 10.1 (ok with 10.0).

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Brutish



Joined: 18 Mar 2010
Posts: 62

PostPosted: Fri Jul 09, 2010 10:50 pm    Post subject: Reply with quote

Yep. Mozilla Firefox seems to not support 5.2.

That seems to destroy the whole point of a flash player.
_________________
www.Hobbycaster.com
Back to top
View user's profile Send private message
pkv



Joined: 26 Jul 2008
Posts: 7

PostPosted: Thu Jul 29, 2010 8:59 pm    Post subject: Reply with quote

Hello Karl

awesome! At the moment I'm using a icecast to wowza relay to the flash player to get rid of the infamous memory leak problems, but if icecast can come now with a flv wrapper, that's just great!
Very Happy Very Happy Very Happy
I'd like to test too your flv wrapper version of icecast, but the link you gave in April is dead.
Can you repost please?
Thanks in advance. Can't wait to test it out! Very Happy
Back to top
View user's profile Send private message
pkv



Joined: 26 Jul 2008
Posts: 7

PostPosted: Thu Jul 29, 2010 9:47 pm    Post subject: Reply with quote

ok, found it: (thanks google: icecast + flv)

http://www.xiphicecast.webspace.virginmedia.com/

i'm starting the testing Razz
Back to top
View user's profile Send private message
pkv



Joined: 26 Jul 2008
Posts: 7

PostPosted: Fri Jul 30, 2010 12:10 am    Post subject: bravo Karl ! Reply with quote

Tested 2.3.2-kh24 ; thumbs up Very Happy Very Happy
No memory leak at all on the flash player during a couple hours test under FF; the plugin container has a constant memory usage.

I tested with jwplayer 4.6 with the following code:

Code:
<p id='preview'>The player will show in this paragraph</p>

<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','320','20','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addVariable('file','http://IP:PORT/mountpoint%3Ftype%3D.flv');
s1.write('preview');
</script>


With jwplayer 5.2, however error code: 2044 , I am unable to have it work.
Anyway, the compatibility of live icecast streams with flash is such a great feature.
Bravo to Karl again !!!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Jul 31, 2010 5:29 am    Post subject: Reply with quote

The site was moved by the ISP, but the link is on my profile.

The 5.x player will also work if you pass a duration setting to the player, but I've heard of playback start issues with 5.1/5.2 with flash 10.1 on FF.

On a related note, I have a fix for flv post kh24 (shows as frame skipping) which is fixed in the test releases (currently kh24.16). I should be releasing kh25 this weekend, all being well.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pkv



Joined: 26 Jul 2008
Posts: 7

PostPosted: Mon Aug 02, 2010 2:35 pm    Post subject: Reply with quote

Karl, you rock! Very Happy Very Happy Very Happy Very Happy

Got it working with jwplayer 5.x !
- with Flash Player 10.1
- FF 3.5/ IE 8
- with aac / aac+ / mp3

Here's the code:

Code:

<p id='preview'>The player will show in this paragraph</p>
<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('/player.swf','player','320','268','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addVariable('file','http://IP:PORT/mountpoint%3Ftype%3D.flv');
s1.addVariable('duration','360000');
s1.addVariable('provider','video');
s1.write('preview');
</script>


This is the minimal script. There are two compulsory things:

- the 'duration' flashvars as explained by Karl; can be set to anything large (take it larger than your live stream).
- the 'provider' flashvars which must be set to 'video'.

There is a minor bug however; if you want to use other flashvars you have to declare them directly as variables, ex :
Code:
s1.addVariable('skin', 'yourskin.zip')
not through:
Code:
s1.addParam('flashvars', 'skin=yourskin.zip&otherflashvars')
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Aug 02, 2010 2:40 pm    Post subject: Reply with quote

Don't forget that any track details are included in-stream, you just need to have the callback setup for metadata.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dl



Joined: 28 May 2009
Posts: 7

PostPosted: Thu Aug 12, 2010 2:26 pm    Post subject: Reply with quote

Hi,

is it possible to use/read the cue points which are included in a flv ?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Aug 12, 2010 3:32 pm    Post subject: Reply with quote

Seeing that the longtailvideo player calls javascript then it must be possible, but I don't know the specifics within flash itself.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dl



Joined: 28 May 2009
Posts: 7

PostPosted: Tue Nov 02, 2010 8:39 pm    Post subject: Reply with quote

karlH wrote:
Seeing that the longtailvideo player calls javascript then it must be possible, but I don't know the specifics within flash itself.

karl.


Anyone else ? How to extract metadata with as3?
Back to top
View user's profile Send private message
Amature DJ



Joined: 17 Apr 2012
Posts: 26

PostPosted: Tue Jun 19, 2012 9:58 pm    Post subject: Reply with quote

karlH wrote:
If you are interested in testing this, then try out the following code at
http://www.icecast.pwp.blueyonder.co.uk/flv/icecast-2.3.2-kh22-flv.tar.gz


The url is no good?
Back to top
View user's profile Send private message
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Wed Jun 20, 2012 1:53 pm    Post subject: Reply with quote

Amature DJ wrote:

The url is no good?


http://karlheyes.github.com/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Listener Clients All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber