Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-01

Connect to 'https://...' url with fphttpclient ?

19 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

fredvs
to fredvs

Ooops, in previous mail, please read this:

Hello.

Is it possible to connect with 'https:// files with fphttpclient ?

For example, I can access this:

http://broadcast.infomaniak.net:80/alouette-high.mp3

but not this:

https://sites.google.com/site/fredvsbinaries/test.mp3

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727405.html Sent from the Free Pascal - General mailing list .
fredvs
to Michael Van Canneyt

Hello Michael and thanks for answer.

I have try with fpc 3.1.1 without success.

Huh, is there a brave heart that could download this:

https://github.com/fredvs/uos/blob/master/examples/sound/test.opus

and place it to a http:// server ?

This because I want to test opus-file streaming but I did not find any http:// to download opus files from.

Many thanks.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727411.html Sent from the Free Pascal - General mailing list .
fredvs
to fredvs

Re-hello.

Aaargh, same error than in first post (wrong url).

Please read this:

Hello Michael and thanks for answer.

I have try with fpc 3.1.1 without success.

Huh, is there a brave heart that could download this:

https://sites.google.com/site/fredvsbinaries/test.mp3

and place it to a http:// server ?

This because I want to test opus-file streaming but I did not find any http:// to download opus files from.

Many thanks.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727412.html Sent from the Free Pascal - General mailing list .
fredvs
to fredvs: Re-hello. Aaargh, same error than in first post (wrong url). Please read this: Hello…

AAArgh, wrong url again in previous post.

Please, read this:

Hello Michael and thanks for answer.

I have try with fpc 3.1.1 without success.

Huh, is there a brave heart that could download this:

https://sites.google.com/site/fredvsbinaries/test.opus

and place it to a http:// server ?

This because I want to test opus-file streaming but I did not find any http:// to download opus files from.

Many thanks.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727414.html Sent from the Free Pascal - General mailing list .
fredvs
to Graeme Geldenhuys: http://geldenhuys.co.uk/~graemeg/temp/test.opus Graeme

Hello Graeme.

Yep, many thanks. (and you place the good one ;-))

Ok, I have something for makeing nights white now.

PS: uos_SimplePlayer can play opus file in FreeBSD64 too (file =ok, url=must test it).

Thanks Graeme.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727416.html Sent from the Free Pascal - General mailing list .
fredvs
to Graeme Geldenhuys: http://geldenhuys.co.uk/~graemeg/temp/test.mp3 Graeme

Hello Graeme.

Thanks for the mp3 too.

I have try it, I can download and access it but... audio-streaming is not working here.

Must your server do something special to enable audio-streaming ?

Thanks.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727417.html Sent from the Free Pascal - General mailing list .
Graeme Geldenhuys
to fredvs
fredvs wrote
Must your server do something special to enable audio-streaming ?

Not according to VCL Media Player. I simply selected "File - Open Network Stream" and pasted in the MP3 URL. VCL played it without problem.

ps:
I don't know if VCL first downloads the file, then plays it, or plays (streams) it directly. I have no clue, sorry. I didn't notice any new files being created in my /tmp/ folder while the music was playing via VCL though.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp
Michael Van Canneyt
to fredvs
fredvs wrote 5 lines
Hello Michael. > just tried with the httpget sample program, works just fine. To access a "https" file ?

Yes. I accessed the file URL you posted here.

If so, there is something that must be done to the server to allow file streaming (or I miss something).

Are you testing on Windows ?

If so, make sure the openssl libraries are located somewhere in the PATH. (just put them next to the binary).

If you are on Mac, Beware that the default openssl libraries on Mac are old and that some servers simply refuse to set up the SSL connection with older protocols.

Michael.

fredvs
to Michael Van Canneyt

Hello.

Some news from the front.

There is a library included with opus package: libopusurl.so

This without any c header.

Ok,I did a pascal header for that library and use this method in code:

op_test_url: function(path: PAnsiChar; out error: Integer): TOpusFile

(in place of op_test_file: function(path: PAnsiChar; out error: Integer): TOpusFile;)

And... it works !

I can listen to http://geldenhuys.co.uk/~graemeg/temp/test.opus in web-streaming with fpc code!

I will release a working demo in uos asap.

So do I. Did you try with the httpget demo program ?

Not yet, I will do it tonight.

Yep, yep, yep.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727424.html Sent from the Free Pascal - General mailing list .
fredvs
to Michael Van Canneyt: So do I. Did you try with the httpget demo program ? Michael.

Hello Michael.

This will close the topic:

 uos_AddFromURL('https://sites.google.com/site/fredvsbinaries/test.opus') ;

=> WORKS...

So, conclusion, yes fphttpclient can connect to 'https://...' and uos can play 'https://... Opus streaming files.

Thanks for all your help.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727425.html Sent from the Free Pascal - General mailing list .
fredvs
to fredvs: Hello. Some news from the front. There is a library included with opus package:…

web-streaming with fpc code!

I will release a working demo in uos asap.

Huh, no, sorry, I said victory too fast.
I uos can listen in streaming "https" mp3 but not opus files.

The opus method op_test_url does not work here.

And I try to use op_test_memory with the TThreadHttpGetter of Andrew but without luck.
Also I highly would prefer to use TThreadHttpGetter than the build-in method op_test_url (where there is no control on Internet stream).

Sorry for the promise to release a working demo of opus-file streaming. (But we will find the solution, difficultly because there are no examples, even in c, how to do opus-streaming, but we will find it).

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Connect-to-https-url-with-fphttpclient-tp5727404p5727434.html Sent from the Free Pascal - General mailing list .