httpstreamer Question

General questions that have to do with plugins go here

httpstreamer Question

Postby Sheeva700 » Wed Dec 30, 2015 11:52 am

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
Sheeva700
 
Posts: 27
Joined: Sun Mar 22, 2015 9:24 pm

Re: httpstreamer Question

Postby airsoftsoftwair » Wed Dec 30, 2015 2:49 pm

Can you post a complete demo code that I can try here? (with a valid URL, your example URL is not a valid URL)
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: httpstreamer Question

Postby Sheeva700 » Thu Dec 31, 2015 11:31 am

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.
Sheeva700
 
Posts: 27
Joined: Sun Mar 22, 2015 9:24 pm

Re: httpstreamer Question

Postby airsoftsoftwair » Thu Dec 31, 2015 1:58 pm

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: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: httpstreamer Question

Postby airsoftsoftwair » Thu Dec 31, 2015 2:00 pm

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).
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: httpstreamer Question

Postby Sheeva700 » Thu Dec 31, 2015 4:15 pm

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.
Sheeva700
 
Posts: 27
Joined: Sun Mar 22, 2015 9:24 pm

Re: httpstreamer Question

Postby airsoftsoftwair » Sat Jan 02, 2016 11:44 pm

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.
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: httpstreamer Question

Postby Sheeva700 » Wed Jan 06, 2016 2:40 pm

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.
Sheeva700
 
Posts: 27
Joined: Sun Mar 22, 2015 9:24 pm

Re: httpstreamer Question

Postby airsoftsoftwair » Mon Feb 22, 2016 7:24 pm

Fixed in Hollywood and HTTPStreamer.
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: httpstreamer Question

Postby Sheeva700 » Sun Jun 19, 2016 11:40 am

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.
Sheeva700
 
Posts: 27
Joined: Sun Mar 22, 2015 9:24 pm

Next

Return to General plugin questions

Who is online

Users browsing this forum: No registered users and 1 guest