IPTV Restream that means you use my stream with your server and your customer use from your server. The total user can use your IPTV service depends on...
Hi guys and welcome to the build your ownGoogle Television workshop, Alright who between you knows what on earth is a Google Television a Google Television is a hardwaredevice; you join it by HDMI for your Tv set, and you simply're Television set becomeslike a sensible Television you are able to watch YouTube video clips on it, playgames and It is really, no it is not the nexus dice, It truly is Pretty much such as nexus dice but it's calledthe Google Tv set now there carrying out likewise a hardwaredevice made by Sony that you just connect by HDMI to the Television they usually'redoing a standalone Television set that has a chip in it that serves the Google TV we're kind ofreplicating this around the Raspberry Pi, Alright but for now, we constructed; I created a YouTubedownloader so you can look at YouTube films over the Raspberry Pi and Regulate them withyour cell unit so ahead of digging deeper inthe complex stuff, I will tell you about a smalldemo, Alright To start with I'll SSH to your Raspberry Pi thatyou can give it commands Alright, 102 plus the username is pi, so by default the RaspberryPi has this default username that's pi plus the password isRaspberry, Okay so we are Within the pi this my property directory, Okay, I have installed the application within homeNode Google Television Alright, now I start the Node application byexecuting this command and increase the & image to run it while in the background.
Now there is a whole lot ofways to run the NodeJs application during the background but about the Raspberry Pi, It truly is thefastest way, Okay, since it was jogging and I did a previousdemo, Of course We will in additional particulars relating to this butthis is just to run the demo, We will talk about Node, regarding how theremote is Functioning, about all the things ah but we need to have it into, Okay and now I'mgoing to operate chromium in Kiosk method and that's why Don't fret men; we're heading togo by this, Alright and We've this error this mistake are not able to opendisplay, why due to the fact I'm executing the chromium browser from SSH, Alright so I want https://iptvrestream.net tocheck my ecosystem variables and incorporate to them display so I click on and typeexport display equals 0.
0 points into the monitor and after that I execute thisand We'll see that our beautiful Television set isup and running now this unsightly bar is simply because I Beforehand closed chromium in a bad wayso give it a second and its loading and that'sit so That is our famed Tv set, mainly I just did the watch but I am intending to dolisten and play in the future the weather conditions no, I manufactured The complete point but the design I took it from the net I usedthese lovely icons yea like there's this icon which is this icon you already know, very good artistscopy excellent artists steal, which is it everywhereok so I'm going to open tree mode, detect this, it's not a local Website software nevertheless it has abeautiful icon, Okay now, as you'll be able to see I am swiping suitable and itsmoving Alright And that i swipe left and it moves still left now I'm heading to find a Motion picture Okay it'sshowing with you? ok and I will click enjoy this script is referred to as YouTube downloader;We'll also pass through it.
It downloadsthe movie from YouTube and it saves it so It can be versus any YouTube insurance policies nevertheless it'sRaspberry Pi and It truly is an open org guys And so the workaround is to use the script, downloadthe movie and play it look at Certainly it may Enjoy as many as 1080p superior definitionmovie as well as the Film is loading, this is the Harlem shake at Lamba Labs that Imissed, if I desire to pause the Motion picture I just tap and it pauses, I faucet again to resume andif I wish to exit I tap on the header now thisis my user encounter about this you realize, I could not make like an appropriate remotewith buttons and things like that, so I reported whynot making use of swipe gestures and faucet and stuff such as this, Okay And so the demo is okay, the demo is Functioning let the workshop get started: Alright To begin with I'm going to tell you about brieflythe blueprint of your Raspberry Pi and that is a simplething to carry out now, there is the HDMI port, USB, u have two USB, LAN, the modelB comes with 512mbytes of ram the product A includes 256mbytes you may have theaudio, the movie, LEDs, as well as GPIO which you'll be able to method plus the hardwarestuff product b with 2 USBs model A at the same time as well as SD card now if youfirst acquire you happen to be Raspberry Pi, You must go to RaspberryPi.
org and download the ok, There are tons of Linuxdistributions you can boot around the SD card, they're all photographs, I'm employing Raspbianbecause It can be quite possibly the most identified and there is a great deal ofthese Distros are according to Debian, many of us knowDebian, but this Raspbian is specifically made forthe Raspberry Pi with plenty of softwares and systems and driverson it, ok now once you very first invest in you're Raspberry Pi you must copy thisimage and execute a couple of codes to make the impression bootable over the SD card Okay, we'renot gonna experience this currently, but you will discover a lotof tutorials on the net I did not adjust it, still left it the way it is Okay, hardware ingredient completed, configuration andsoftware applied Alright we mentioned Raspbian, Certainly the YouTube downloader, the script, YYouTube-dl ah sorry, no no, YouTube downloader, Sure It is a really know script todownload YouTube videos on Ubuntu Debian Linux Alright, not surprisingly It truly is forbidden by Google, You can not obtain YouTube video clips, It's important to stream them Indeed specifically, You should updateit when they modify, the guys improve Okay It truly is quite simple to downloada YouTube Motion picture using that; I will drop by YouTube, that'sa Motion picture, downloading video, and it's downloading, now I'm going to stop it, becausewe have minimal quota Alright, Sure It really is messy ok, it dependson the hardware, Omx participant as well as the Motion picture started off, Omx participant provides a established ofshortcuts, one example is I am able to halt and Engage in;I am tapping on my cellular I realize it's an incredibly wonderful song, we can't watchit: p ok and now I'll clarify a bit aboutthe architecture utilized During this challenge and why, Alright as you'll be able to see its all JavaScript, JavaScript to the frontend, JavaScript over the backend, suitable, That is why I had to use NodeJs, now, whoknows about NodeJs, arrive listed here men, convey to us a little bit about NodeJs and why did I exploit itin this job I informed u why :p Piotr: alright, so my name is Piotr Yordanovand, effectively the folks who know me understand that I'ma fanatic of kind of Node since I have beenusing Node for a long time, but there is certainly, so I'm going to show you why, tothe code straight, ok so NodeJs basically is, so chrome really operates something termed v8 it is a JavaScript engine; it is the enginethat understands and interprets JavaScript so there'sthis insane person who like four many years in the past took this v8 and place it over the server andnow all outside of a unexpected it is possible to summon you are terminal, you can start signing up for interpretingJavaScript the natural beauty over it is that you have the powerfulv8 engine accomplishing this, Okay so forget about this, as programmers what is fascinating about itis that Beforehand until these days if you do not useNode and you would like to create a World wide web software, you'regoing to be applying almost any other language No matter, based upon your style, python, it could be php, it might be ruby, and it might bewhatever, and every language, even Java, every single languagehas a framework in addition to it that may be like for World wide web, Ruby has Rails, Php has a whole lot ofthem coding evenings or no matter what cake, python has jungleflask and the rest Node isn't a language and Node isnot a framework, Node is simply Node, a JavaScript interpreter, That is what it is, youcan't Evaluate Node to your others having said that that being mentioned, Node has couple offrameworks to choose from that are form of intriguing although the exciting Portion of working with Node isthat you are using JavaScript, should you fail to remember aboutperformance, simply because at the end working day how can we actually proveif It truly is a lot more profound compared to the Other individuals? It does have restrictions, simply because Node issingle threaded, so which is superior for io terrible forCPU intense responsibilities, suitable? So when Derek was describing to mehow he did the application, what is definitely intriguing isthat, do I talk about socket? Derek: Of course Piotr: thisis identified as socket.
io, now any of you, Have you ever performed World wide web function before? Do you knowabout Ajax? Audience: yea Piotr: in the event you don'tknow, just simply put, Ajax is largely around the browser and I need tolet's say transform what is happening above listed here devoid of loading the web site, but I would like to fetchcontent from somewhere, it can be my server or any server, so I makean Ajax ask for, Ajax is good, but it surely's kindof bothersome any time you generate it, the problem is safe, it's possible, Idon't know but what is taking place in this easy socket.
iowhat seriously comes about is that it produces sockets, so now, if you are around the consumer, you connectto a socket on the server and it would not block, it just emits events, right away event driven, the thing about socket.
io In particular is thatit's purely in JavaScript so it's like, it natively operates in Node, and World-wide-web sockets ingeneral, they don't natively work in every other language you can find library~ so what Derek is doing above here is: he wantsto be capable of control from his controller whichis the cell phone he wants to control the browser or Raspberry Pi and it should be Reside, it must be situations happening “swipe” that is anevent, so on my pi I wish to realize that's anevent and make anything about it so he could have done it in Ajax but He's doingit using socket due to the fact, yea truly that is the syntax, it's truly muchmore less difficult, and it's like integrated in native in the ecosystem he is working with, so socketis a person solid issue and one other powerful stage isthat he just made use of JavaScript over the pi, Derek: onthe socket issue, does one recall writing a code, an Ajax code natively, ahnot natively but devoid of working with jQuery?it's a lengthy approach; It's important to fulfill a good deal ofbrowsers like World wide web explorer, things like that, so jQuery, they did Ajax which happens to be asimple Software to obtain Ajax and gets and publish and no matter what, now socket.
io did a similar matter for Website sockets, and not just for web sockets, forreal-time programs like socket.
io supports even IE6 which has no World wide web sockets in it Piotr:It's Flash Derek: Of course , so it falls into A further technology, like flash or Xhr polling, lengthy polling, things likethat Piotr: Consider they really use Ajax Derek: andthey use Ajax at the same time, socket.
io Marc: yea it deprecates to Ajax, just, sothat's it Piotr: so socket.
io was the robust place, the opposite potent position is me doingJavaScript in each place, correct Derek: as well as the thirdpoint is spawning Piotr: that's essentially a fascinating andfunny thing what happened with Node, is usually that Rapidly you can actually builda shell script, working with JavaScript, for those who at any time needto call one thing on your terminal, generally there is certainly this functionality identified as spawnDerek: Spawn boy or girl method, module Piotr: you may have your app, which has a programrunning; it spawns Yet another plan and operate a command in it, and you'll startpiping success from one app to another, if you understand about piping, yea so That is what'scool about this Derek: making sure that's The rationale why I am working with NodePiotr: did I forget just about anything? Derek: no that is mainly it Piotr: okDerek: not surprisingly, on the front close, I take advantage of html, CSS and JavaScript, And that i use CSS3 and html5 CSS3 around the mobiledevice to perform the CSS transforms things.
Piotr: which 1? Derek: over the application Alright, a single previous detail, nowwe are relocating into a completely diverse section which can be the entrance stop ofthe application although executing this job I learned Piotr: Github:p Derek: I identified Github for mac, no :p ok, Incidentally this undertaking is open supply;it is possible to fork me on Github, and have your individual versionof the Raspberry Tv set so before likely further from the application composition, I'm going to let you know a little bit regarding the trick that Idiscovered whilst executing the net cellular app, Okay you understand, there's indigenous apps and mobileweb applications and there is Phonegap that is hybridso I've, yea ok, as you may see listed here, the iconof the app what? Of course, can you open up the app please, Alright? there is certainly aflash display screen, and it looks like a local application, there isn't any browser, why, because of this, I went towards the apple safari documentation, and I readthe subsequent: in case you insert the Metatag in the html app mobile Net application title remote, any time you head to safari, you visit this hyperlink, youcan click add to residence monitor, proper which title will appear by default, the picture, the icon will come, and we exchange the default icon by stating Ralequal apple touch icon along with the startup picture and that is the flash picture is apple contact startupimage so these Metatags and hyperlinks are supplied by apple, so we are style of noticing what theywant to do Sooner or later you already know they're jumping into webtechnologies and JavaScripts to create native applicationsthat's my notion about cellular growth, and just lately Firefox mobile OS, if you readabout it, it's all about creating Those people nativemobile applications employing World wide web engineering Piotr: It is really truly a system Construct on html5Derek: Certainly, particularly, Audience: and do you think if on android itwill be chrome OS? Derek: yes, I hope so: p no it is the samehouse anyways, yea which is it, I'm utilizing the logoas Svg, I don't know why :p Alright, now let's return to Node, now back again tothe core of the application, as you could begin to see the structure is quite simple I have a publicdirectory, in it there is certainly the html, JavaScript, images, fonts, CSS, all People issues, andmy server is barely this code, It can be application.
js, ok now if you're establishing on Node, youhave one thing known as npm, npm can be a pool of modules and libraries Construct on Node so let'ssay I want Omx player, That is what I did, and shockingly, it worked, I had been wanting fora way to regulate Omx player with out crafting The entire core so I found this, ok, how canI use it? I drop by my dependencies file; ah not thisone, that is the Node module, yea deal.
Json, in this article you are able to specify loads of variables, thename of your respective software, whichever, dependencies, That is what's important, I'm working with Convey, I will look at it, jade, no I'm not using jade Okay, great, could it be crystal clear, very well I am goingto move to Github, the code is on Github, a lot better ok so Specific, jade, I'm not usingjade, socket.
io Omx controller, just so How come we try this? on Node, you create downyour dependencies on a person file, so you go in your terminal, to the Node Listing whichis this 1 here, and search , what I will do, I'll be ridiculous , I am likely todelete my job Okay, I'll convey to it sudo, and what, I deleted the Node modulesnow the applying is not Performing any more so I go on and create down npm install, and what comes about could it be study the dependencies file and downloads the many dependencies andthe dependencies in the dependencies so you don't do anything at all, you could deploy your application with a server, with a development for your personal developer friendyou know anyplace and you only ~~~~~ these, justification me Audience: why You should not you utilize apt-get? Derek: apt-get is for Ubuntu and Debian, youknow to down load stuff, npm is similar it the identical idea but placed on the internet just, but bear in mind, these dependencies are diverse within the dependencies you're pondering aboutthese dependencies are for Node, utilizing npm rather than apt-get, but it is the same conceptand That is what's great about Node ok so right after downloading the dependencies you are going to geta folder identified as Node modules, Okay also to use these modules, you have to need them, soI'm intending to say var Categorical require express application equal Categorical generates the Specific server, but it surely does not, but I need to involve http which happens to be by default there and make serverand wrap it with application, so inside it, within generate server, There is certainly your Categorical server, now if I don't need to work with Convey, which saves many time, I am able to predefine my serverto serve the material that I want, Okay but below I'm making use of Convey for these good reasons, route, in no way brain, io is socket.
io, and socket.
io listens towards the server and also to the shopper soyou have to have socket.
io on the server facet and socket.
io on your own front end spawn is alsolike Piotr explained, a local module and Node, you need not download it Omx player isto Management the Omx player on the Raspberry Pi now each Specific server needs a littlebit of configuration specifying the port and things like that now discover right here I'm usingprocess.
environment.
testport ok, now if I return into this, And that i key in env it stayson the environments, now if I incorporate test port, export check port equivalent 8080 Alright, by doing this wheneverI deploy my application, it will get the job done, you recognize Therefore if on my staging server I'm using the port8080 but on my authentic server I am utilizing the default port eighty, proper so I'm able to try this by specifyingthis in the process surroundings, like I'm able to access this by way of Node by executing this process.
env.
thevariable, meaning if I console .
load now course of action .
env Display screen over the Raspberry Pi, it willshow, 0.
0 app.
person.
omx This is often for that Omx participant, for instance I desire to pause the movie, if I am working with Specific, I'm able to point out that Specific.
use.
omx , it will eventually produce for me these 3 requests, that I can do, pause, quit and begin now the routes, usually, what you can do on Node, You'll need a boiler plate to start, appropriate, you don't want to write down the boring code againand again and again, What exactly Specific does, which happens to be the Node server, Firstly youshould set up it like that, npm and