[Gambas-user] Video question

Benoît Minisini gambas at ...1...
Wed Feb 10 22:41:47 CET 2016


Le 10/02/2016 22:30, richard terry a écrit :
> On 11/02/16 01:41, ML wrote:
>> On 2016-02-10 08:37, richard terry wrote:
>>> On 10/02/16 22:24, Benoît Minisini wrote:
>>>> Le 10/02/2016 12:22, richard terry a écrit :
>>>>> On 10/02/16 21:48, Benoît Minisini wrote:
>>>>>> gb.media can do that.
>>>>> MediaView1.URL = Media.URL("https://www.youtube.com/watch?v=h-cUFt2t0IY")
>>>>>
>>>>> Hi Benoit,
>>>>> This doesn't work ?am I missing something?
>>>>> What I wanted to do was to stream an i-p camera from my front office to
>>>>> my room with a little media control in the corner of a window.
>>>>> thanks
>>>>> richard
>>>> Are you kidding? 'https://www.youtube.com/watch?v=h-cUFt2t0IY' is
>>>> "youtube", the website. Not the url of a streamed video!
>>> Benoit you should know by now I nothing of these things. So are you
>>> saying that if you point the control to a i-p camera if will work?. And
>>> also, how come it doesn't play a URL of a video? Just remember I'm
>>> ignorant of all  things like this. Not trying to be stupid.
>>> richard
>> Richard,
>>
>> Most IP cameras come with a program to watch them. This is usually Windows.
>> You can also use a browser, like Firefox, and the camera's URL will ask
>> you for your credentials (user/pass). All this you know.
>>
>> Android apps -for example- ask you for the make/model of the cam, its
>> URL and credentials to connect and stream the video.
>> The point here is that you should check the URL of the page with the
>> streaming video, after you connected successfully.
>>
>> For example, I do have a cam. I can use
>> *http://xxxxxxxxxxxxx/index.html* to authenticate and connect. That's
>> the cam main page, allows me to select use IE/FFox/Chrome, etc.
>> Once I select Firefox, I get to see the cam video at
>> *http://xxxxxxxxxxxxx/monitor2.html*. But even that is a page with some
>> decoration and the video in the middle.
>> I then right-click the streaming video itself and select '*Copy Image
>> Location*'. This gives me the URL to access the video itself.
>> In my particular cam's case (credentials changed, of course), it is
>> *http://xxxxxxxxxxxxx/videostream.cgi?user=myuser&pwd=mypass*.
>> Your cam's URL may (WILL!) change if it is a different make/model, but
>> the steps are the same:
>> 1- Authenticate and connect with browser and navigate to the video.
>> 2- From the video, if possible, get the stream's URL via
>> right-click/Copy Image Location in the browser.
>> Beware that most (chinese) IP-cams will send your credentials in plain
>> text in the URL, as shown in my case above.
>>
>> It can also happen that the cam does not send user/pass in the URL
>> because it uses browser cookies. In such cases, you may need to prepend
>> it to the URL in this form:
>> *http://myuser:mypass@...3576.../videostream.cgi
>> *but, as you can see it also is sent in clear text. I'd recommend using
>> a view-only user/pass combination.
>>
>> Disclaimer:
>> I got this but did not test that it works with Gambas. It does work with
>> several Android phones and browsers, though.
>>
>> Regards,
>> zxMarce.
>
> thanks for the detailed description, that makes sense now
>
> Regards
>
> Richard
>

And note that I made a 'gb.media.form' component that provides a media 
player control that allows you to play any GStreamer URL without having 
to deal with the internals.

You just have to find which URL to assign to the control now. Maybe 
"http://" URLs work out of the box, I don't know.

-- 
Benoît Minisini




More information about the User mailing list