Embed YouTube Live Streaming Automatically - php

How to embed an YouTube live streaming automatically in an webpage using php?
Something like querying the video at https://youtube.com/user/USERID/live when a transmission is on air?

I am the author of the OP. I wrote this PHP class, maybe it will be useful for some so I'll link here:
https://github.com/iacchus/youtube-live-embed
It allows one to query a channel and embed the Live Streaming if there is one. May take some seconds or even minutes to YouTube API response to show the live streaming after the streaming is On Air.

You can easily do it with using search->list method by setting type=video and eventType=live
Here is another PHP search code sample that will get you started.

Yes, you can do it easily by using below iframe code:
https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID
You may have a look this site: streambd.co for your better understanding

Related

PHP-How to check webpage(url) contain video or not?

I create website for RSS reader.
I want to add new feature in it.
For this I want to test that webpage(url)
contain video or not??
Can any one tell me that how to do this??
I just want to test that the url or webpage contain video or not??
I believe the only way to do this is to scan the source code of the page through PHP and look for likely embedded video codes. Those can vary though, so you may need to look for several patterns. Some video sharing sites embed them via iframes though, and that will be harder to deal with.
There are plenty of examples on the web on how to parse a site's generated source code, but be careful of violating their terms of use.

How to Scan QR code using webcam and php or javascript

I am trying to implement QR code. i've successfully implement it using phpqrcode. However I don't know about how to decode the QR code using webcam and php or javascript. I've tried to search it on google, but can't find any solution for this. Anyone could help me? Thank you so much
you could use this jquery webcam plugin and then send the image to php-zbarcode. It uses zbar which can read qrcodes. Note that the plugin requires flash.
There is also jsqrcode which you could use to scan and interpret the QR Code, however this requires HTML5 for displaying the webcam output, and flash for capturing.
Here is a previous question pertaining to javascript-only solutions

Showing latest tweet using Twitter Stream API

I need to show the latest tweet of a specified user using the twitter stream API. I have moderate PHP, JSON and Javascript knowledge but not enough to figure out this twitter stream API on my own. Can someone explain to me what it would look like to "connect" to this twitter stream and display the latest tweet? Does something need to be done on the actual server, or can this all be done just through some json and php code in the website template?
You don't want to use the streaming API for this.
You'd want to fetch statuses/user_timeline and parse it. You could load it and parse it entirely via JavaScript, in fact, avoiding any need to do PHP work here.
If your set on using the Streaming API for whatever reason. What you could do is use something like PHP phirehose or to make it even easier as in dead simple easy. Look into and read the information posted about the 140 DEV Server by Adam Green.
His website is here: http://140dev.com/
and you can download the PHP framework/server from here: http://140dev.com/free-twitter-api-source-code-library/twitter-database-server/download/

Movie Streaming Script

I want to develop a Movie information Database and Video Streaming website. I am wondering is there any off the shelf script available for the same ?
Please share some information regarding the same..
I would prefer it to a PHP script
I don't know if there's already a solution for this, but the steps to achieve something like you want are not that hard.
Here's what you need:
Backend for Storing and Delivering files (Simple CRUD) and basic database access
Cron or something like this to convert your uploaded Videos into FLV/HTML5 Video (see ffmpeg)
Frontend to display your encoded videos (see http://videojs.com/)
you can use the html5 video tag

Online video streaming

I want to make a video site in which we can upload the video in any format and display it like youtube. How can I do this? My whole site is in PHP I'm a newbie in the video streaming sp plz be descriptive with your answer
Thanks
First you need a VideoPlayer written in Flash / Actionscript, there are also a lot of free ones arround in the internet, e.g.: FlowPlayer, You also could write you own. You acctually do not net to buy Flash for this. The Flash/Flex compiler mxmlc is available for free. You could also write you Flashvideoplayer in Haxe (also free).
You you do not want the users to switch within the video you could deliver the videos via HTTP, other wise you need an streaming server like: FlashMediaServer (not free). There are also open source alternatives like Red5 or haxeVideo.
You you do not have the video available in the right format you need to encode them: the best tool for this task could be ffmpeg
I suggest looking at the html5 <video> tag, this is probably the simplest way. For an example look at the the one from surfin' safari.
Be aware that some browsers support ogg and others h264, but not both.
Encoding of the video can be made using ffmpeg on the server.
One of my websites does this, and it's a MASSIVE pain.
However, there are websites out there that'll take a video and convert it to an FLV for you (for a price), for example we use a service called Hey!Watch which is reasonably reliable.
If you really want to encode it to flash yourself, you're going to need a full copy of Flash and a LOT of time =]
There is this highly underrated post with 3 great links for open source solutions that are like youtube and fits perfectly your question (and at least another one):
http://www.vidiscript.co.uk/
http://www.phpmotion.com/
http://osshare.sourceforge.net/
I'm posting this here just to point out the links. I think 2 of those 3 questions should be marked as duped anyway.

Categories