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

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

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

fredvs
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://github.com/fredvs/uos/blob/master/examples/sound/test.mp3

Thanks.

Fre;D
Reply | Threaded
Open this post in threaded view
|

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

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
Reply | Threaded
Open this post in threaded view
|

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

Michael Van Canneyt
In reply to this post by fredvs


On Sun, 22 Jan 2017, fredvs wrote:

> 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://github.com/fredvs/uos/blob/master/examples/sound/test.mp3

It is possible, but not with the 3.0 one, it should be possible with the
3.0.2 one.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

fredvs
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

Reply | Threaded
Open this post in threaded view
|

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

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

Reply | Threaded
Open this post in threaded view
|

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

Graeme Geldenhuys-6
In reply to this post by fredvs
On 2017-01-23 12:34, fredvs wrote:
> This because I want to test opus-file streaming but I did not find any
> http:// to download opus files from.


http://geldenhuys.co.uk/~graemeg/temp/test.opus


Regards,
  Graeme

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by fredvs
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
Reply | Threaded
Open this post in threaded view
|

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

Graeme Geldenhuys-6
In reply to this post by fredvs
On 2017-01-23 12:39, fredvs wrote:
> 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.


http://geldenhuys.co.uk/~graemeg/temp/test.mp3


Regards,
  Graeme

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by Graeme Geldenhuys-6
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
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by Graeme Geldenhuys-6
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



Reply | Threaded
Open this post in threaded view
|

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

Graeme Geldenhuys-6
On 2017-01-23 12:55, 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

Michael Van Canneyt
In reply to this post by fredvs


On Mon, 23 Jan 2017, fredvs wrote:

> Hello Michael and thanks for answer.
>
> I have try with fpc 3.1.1 without success.

I just tried with the httpget sample program, works just fine.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

fredvs
Hello Michael.

> just tried with the httpget sample program, works just fine.

To access a "https" file ?

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

Fre;D
Reply | Threaded
Open this post in threaded view
|

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

Michael Van Canneyt


On Mon, 23 Jan 2017, fredvs wrote:

> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

fredvs
Hello.

I develop with Linux64 bit.
But I have try with FreeBSD64 and same result.

Fre;D
Reply | Threaded
Open this post in threaded view
|

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

Michael Van Canneyt


On Mon, 23 Jan 2017, fredvs wrote:

> Hello.
>
> I develop with Linux64 bit.

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

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

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

fredvs
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
Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by Michael Van Canneyt
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

Reply | Threaded
Open this post in threaded view
|

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

fredvs
In reply to this post by fredvs
> 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.

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