httpstreamer Question

Discuss about plugins that don't have a dedicated forum
Sheeva700
Posts: 27
Joined: Sun Mar 22, 2015 8:24 pm

httpstreamer Question

Post by Sheeva700 »

Hi,

I'm trying to deal with httpstreamer plugins (automagically) but when i try OpenFile(nil,"http://sound/some_song/mp3") (is a example)
I've gor this Message from OS4 Please insert Volume http: ?!?
Same error with all file or sound related keyword.

i had tryed with both @REQUIRE "httpstreamer.hwp" or LoadPlugin("httpstreamer.hwp" ) (no error plugin seem to be loaded)

Thanks for help.

Happy New Year !!!

My Config:
Amiga OS4
Hollywood 6
Cubic IDE
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: httpstreamer Question

Post by airsoftsoftwair »

Can you post a complete demo code that I can try here? (with a valid URL, your example URL is not a valid URL)
Sheeva700
Posts: 27
Joined: Sun Mar 22, 2015 8:24 pm

Re: httpstreamer Question

Post by Sheeva700 »

airsoftsoftwair wrote:Can you post a complete demo code that I can try here? (with a valid URL, your example URL is not a valid URL)
My idea is to write Podcast Player to replace AmiPoder wicht is too buggy for me. (This is just a proof of concept)

In This example, Loadbrush is Working Pretty well. LoadSample. LoadMusic, OpenFile Not. (insert Volume http:)

Code: Select all

@REQUIRE "avcodec.hwp" ; Just in case but not mandatory
@REQUIRE "httpstreamer" ,{ UserAgent = "Firefox", Timeout = 3000 }

;Working
LoadBrush(2,"http://media.rtl.fr/cache/YnYI52xORpiAz4qatZGNyw/795v530-2/online/image/2014/0807/7773631969_laurent-ruquier.jpg")
DisplayBrush(2,0,0)

; Not Working
LoadSample(1,"http://admedia.rtl.fr/online/sound/2015/1228/7781049365_grosses-tetes-du-29-12-2015.mp3")

Repeat
  WaitEvent
Forever    
Thanks for your help.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: httpstreamer Question

Post by airsoftsoftwair »

Ok, I can confirm this problem. It is related to this specific URL:
http://admedia.rtl.fr/online/sound/2015 ... 2-2015.mp3

You can see that this URL doesn't work with Hollywood's DownloadFile() command either so the HTTP server probably uses some features that Hollywood & HTTPStreamer don't support yet. I'll examine this. Thanks for the report!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: httpstreamer Question

Post by airsoftsoftwair »

By the way, you shouldn't use LoadSample() with large files. LoadSample() will buffer everything in memory and buffering a 70MB *compressed* MP3 file in memory will probably result in more than 1 GB of data :) LoadSample() should only be used with very short sounds which need to be played instantly (e.g. sound fx in a shoot'em'up).
Sheeva700
Posts: 27
Joined: Sun Mar 22, 2015 8:24 pm

Re: httpstreamer Question

Post by Sheeva700 »

You have right. Loadsample() is not the adapted command for that.

PlayStream() can be a good alternative. if you consent to add this in the httpstreamer plugin.

Downloadfile() as exactly the same behaviour as LoadSample() execpt when i add argument like { adapter="httpstreamer" } but, can not resolve link at the end. :(

I wish you all the best for 2016.

Thanks for your reactivity.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: httpstreamer Question

Post by airsoftsoftwair »

We don't need a new command like PlayStream(). To stream music, you just have to use OpenMusic() and PlayMusic(). This will use buffering to minimize footprint.
Sheeva700
Posts: 27
Joined: Sun Mar 22, 2015 8:24 pm

Re: httpstreamer Question

Post by Sheeva700 »

I never Give Up !

I try to download link using "WGET". Working pretty well and autodiscover the correct link to send. (Wget resolve this link alone. not httpstreamer)

Working Hollywood Code : ( ***all hardcoded & Ugly for now )

Code: Select all

@REQUIRE "avcodec.hwp"
@REQUIRE "httpstreamer" ,{ UserAgent = "Firefox", Timeout = 3000 }

LoadBrush(2,"http://media.rtl.fr/online/image/2014/0819/7773790654_les-grosses-tetes.jpg")
ScaleBrush(2,640,480,smooth)
DisplayBrush(2,0,0)
OpenMusic(1,"http://admedia.rtl.fr/online/sound/2016/0105/7781182459_les-grosses-tetes-du-mardi-05-janvier-2016.mp3?downloadId=0", { adapter = "httpstreamer" } )
PlayMusic(1)
Repeat
  WaitEvent
Forever
CloseMusic(1) 
?downloadId=0 is Originaly something More complicated string but, Value 0 is working Pretty well.
btw, Downloadfile() is working also.

Thanks for help.

Dominique.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: httpstreamer Question

Post by airsoftsoftwair »

Fixed in Hollywood and HTTPStreamer.
Sheeva700
Posts: 27
Joined: Sun Mar 22, 2015 8:24 pm

Re: httpstreamer Question

Post by Sheeva700 »

Hi,

IS avcodec plugin able to read mp3 stream ?

here is y problem with icecast stream.

Code: Select all

@REQUIRE    "httpstreamer" ,{ UserAgent = "Firefox", Timeout = 3000 }
@REQUIRE    "avcodec"

OpenMusic(1,"http://icy-e-01-cr.sharp-stream.com:80/ssvcbfbs5.mp3",{ Loader = "avcodec"})
PlayMusic(1)
produce always this error ( tested on Win10 & AmigaOS ):

Error in line 117 (opml.hws): Sound file "ssvcbfbs5.mp3" is in an unknown/unsupported format!

any clues ?

thx.
Post Reply