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 fellas and welcome into the Create your ownGoogle Television set workshop, ok who amongst you appreciates what on earth is a Google Television a Google Television is usually a hardwaredevice; you hook up it by HDMI to your TV, and you also're Tv set becomeslike a wise Television set you may look at YouTube videos on it, playgames and it's, no it's actually not the nexus cube, It can be almost such as nexus dice but it really's calledthe Google TV now there accomplishing too a hardwaredevice made by Sony which you link by HDMI for the TV and so they'redoing a standalone Television set using a chip in it that serves the Google Tv set we're form ofreplicating this about the Raspberry Pi, Alright but for now, we created; I crafted a YouTubedownloader in order to view YouTube films to the Raspberry Pi and Regulate them withyour cellular gadget so just before digging further inthe technical stuff, I'm going to explain to you a smalldemo, Okay first of all I'll SSH for the Raspberry Pi thatyou can provide it instructions Okay, 102 along with the username is pi, so by default the RaspberryPi has this default username that's pi and the password isRaspberry, Okay so we're inside the pi this my residence Listing, ok, I've installed the appliance inside homeNode Google TV ok, now I start the Node software byexecuting this command and add the & symbol to operate it from the background.
Now there is a good deal ofways to operate the NodeJs application while in the history but about the Raspberry Pi, it's thefastest way, Okay, since it was operating and I did a previousdemo, yes we're going to in more particulars relating to this butthis is simply to run the demo, We will speak about Node, regarding how theremote is Doing the job, about anything ah but we must have it into, Alright and now I'mgoing to run chromium in Kiosk method and that is why don't worry guys; we are heading togo by way of this, Alright and We have now this mistake this mistake are not able to opendisplay, why since I'm executing the chromium browser from SSH, Alright so I want tocheck my ecosystem variables and include to them display so I click and typeexport display equals 0.
0 factors to your display after which I execute thisand We will see that our gorgeous Tv set isup and operating now this hideous bar is because I Formerly shut chromium in a nasty wayso give it a second and its loading and that'sit so This can be our famed Tv set, fundamentally I just did the look at but I'm planning to dolisten and Engage in in the future the weather no, I designed the whole point but the look I took it from the online market place I usedthese gorgeous icons yea like you will find this icon which is this icon you realize, superior artistscopy fantastic artists steal, which is it everywhereok so I'll open tree mode, detect this, this isn't a native World wide web application but it really has abeautiful icon, Alright now, as you can see I am swiping right and itsmoving ok And that i swipe remaining and it moves still left now I am going to search for a movie ok it'sshowing along with you? Okay and I'm going to click on enjoy this script is referred to as YouTube downloader;We'll also go through it.
It downloadsthe Film from YouTube and it saves it so It is really from any YouTube policies nevertheless it'sRaspberry Pi and It is an open up org fellas so the workaround is to utilize the script, downloadthe movie and Participate in it check out Of course it may possibly Enjoy approximately 1080p high definitionmovie along with the Film is loading, Here is the Harlem shake at Lamba Labs that Imissed, if I want to pause the Film I just faucet and it pauses, I tap yet again to resume andif I desire to exit I tap about the header now thisis my person knowledge about this you understand, I could not make like an appropriate remotewith buttons and stuff like that, so I reported whynot making use of swipe gestures and tap and things similar to this, Alright so the demo is okay, the demo is working Enable the workshop get started: Okay To start with I'll show you brieflythe blueprint on the Raspberry Pi which is a simplething to carry out now, there is the HDMI port, USB, u have two USB, LAN, the modelB comes along with 512mbytes of ram the model A includes 256mbytes you have theaudio, the movie, LEDs, and also the GPIO which you'll be able to software and also the hardwarestuff design b with two USBs design A as well as well as SD card now if youfirst acquire you might be Raspberry Pi, You need to head over to RaspberryPi.
org and down load the Alright, There are many of Linuxdistributions that you can boot over the SD card, they're all photos, I'm using Raspbianbecause It can be by far the most acknowledged and there's a lot ofthese Distros are depending on Debian, most of us knowDebian, but this Raspbian is specifically made forthe Raspberry Pi with plenty of softwares and applications and driverson it, Alright now once you first purchase you might be Raspberry Pi you need to copy thisimage and execute a few codes to produce the picture bootable over the SD card ok, we'renot intending to experience this these days, but you will find a lotof tutorials on the internet I didn't modify it, left it how it's ok, components ingredient performed, configuration andsoftware employed Alright we talked about Raspbian, Indeed the YouTube downloader, the script, YYouTube-dl ah sorry, no no, YouTube downloader, Certainly It really is an extremely know script todownload YouTube flicks on Ubuntu Debian Linux Alright, naturally It truly is forbidden by Google, You can not download YouTube films, You need to stream them yes particularly, You will need to updateit when they modify, the blokes transform Alright It is really very simple to downloada YouTube movie utilizing that; I'll visit YouTube, that'sa Film, downloading movie, and It is downloading, now I'm going to quit it, becausewe have limited quota Alright, Sure it's messy ok, https://iptvrestream.net it dependson the hardware, Omx player along with the Motion picture started, Omx participant supplies a established ofshortcuts, by way of example I'm able to prevent and Enjoy;I am tapping on my cellular I know it's a really nice track, we can't watchit: p ok and now I will reveal a bit aboutthe architecture utilized In this particular venture and why, ok as you'll be able to see its all JavaScript, JavaScript within the frontend, JavaScript on the backend, right, that's why I needed to use NodeJs, now, whoknows about NodeJs, appear here men, tell us slightly about NodeJs and why did I exploit itin this venture I advised u why :p Piotr: alright, so my title is Piotr Yordanovand, very well the people who know me understand that I'ma fanatic of style of Node for the reason that I have beenusing Node for some time, but there's, so I'm going to tell you why, tothe code straight, ok so NodeJs in essence is, so chrome essentially operates some thing referred to as v8 it is a JavaScript engine; it's the enginethat understands and interprets JavaScript so there'sthis nuts man who like four decades back took this v8 and set it around the server andnow all away from a sudden you are able to summon you happen to be terminal, you can begin becoming a member of interpretingJavaScript the natural beauty about it is that you've got the powerfulv8 motor executing this, ok so forget about this, as programmers what is intriguing about itis that previously until currently if you do not useNode and you want to develop a World wide web software, you'regoing to become applying virtually any other language Irrespective, depending on your style, python, it could be php, it could be ruby, and it can bewhatever, and every language, even Java, just about every languagehas a framework on top of it that may be like for World-wide-web, Ruby has Rails, Php has a whole lot ofthem coding nights or whatsoever cake, python has jungleflask and The remainder Node will not be a language and Node isnot a framework, Node is just Node, a JavaScript interpreter, that's what it can be, youcan't Assess Node to the Some others having said that that becoming explained, Node has couple offrameworks in existence that happen to be form of interesting however the interesting Element of applying Node isthat you are working with JavaScript, in case you ignore aboutperformance, since at the tip day how can we actually proveif It is far more profound compared to the Other individuals? It does have restrictions, simply because Node issingle threaded, so that is fantastic for io undesirable forCPU intense jobs, correct? So when Derek was describing to mehow he did the application, what is really interesting isthat, do I talk about socket? Derek: Indeed Piotr: thisis known as socket.
io, now any of you, have you finished web operate in advance of? Would you knowabout Ajax? Viewers: yea Piotr: should you don'tknow, just To put it simply, Ajax is basically around the browser and I need tolet's say change what is taking place above listed here without loading the page, but I would like to fetchcontent from someplace, it could be my server or any server, so I makean Ajax request, Ajax is good, but it surely's kindof frustrating if you write it, the problem is Safe and sound, possibly, Idon't know but what is actually going on in this easy socket.
iowhat seriously transpires is that it makes sockets, so now, in case you are over the customer, you connectto a socket to the server and it isn't going to block, it just emits gatherings, right away celebration driven, the matter about socket.
io Specifically is thatit's purely in JavaScript so it's like, it natively performs in Node, and web sockets ingeneral, they don't natively get the job done in almost every other language you can find library~ Just what exactly Derek is undertaking around here is: he wantsto manage to Management from his controller whichis the cellular phone he wants to regulate the browser or Raspberry Pi and it must be Are living, it should be functions occurring “swipe” that is anevent, so on my pi I desire to know that's anevent and make something about it so he might have done it in Ajax but he is doingit utilizing socket because, yea basically that is the syntax, It truly is truly muchmore simpler, and It really is like built-in in native from the ecosystem he's applying, so socketis a single strong point and one other powerful place isthat he just used JavaScript around the pi, Derek: onthe socket detail, would you recall writing a code, an Ajax code natively, ahnot natively but without the need of working with jQuery?it's a prolonged system; It's important to fulfill a good deal ofbrowsers like Net explorer, stuff like that, so jQuery, they did Ajax and that is asimple Instrument to access Ajax and receives and put up and whatever, now socket.
io did the same issue for World-wide-web sockets, and not only for World wide web sockets, forreal-time apps like socket.
io supports even IE6 that has no Net sockets in it Piotr:It's Flash Derek: yes , so it falls into A different technology, like flash or Xhr polling, extensive polling, stuff likethat Piotr: Believe they actually use Ajax Derek: andthey use Ajax also, socket.
io Marc: yea it deprecates to Ajax, particularly, sothat's it Piotr: so socket.
io was the solid place, the other potent place is me doingJavaScript in each put, proper Derek: and also the thirdpoint is spawning Piotr: that's really a fascinating andfunny detail what happened with Node, is the fact that all of a sudden you can actually builda shell script, utilizing JavaScript, for those who at any time needto get in touch with something on your own terminal, generally there's this purpose termed spawnDerek: Spawn baby course of action, module Piotr: you might have your application, which has a programrunning; it spawns another system and run a command in it, and you will startpiping results from one application to another, if you learn about piping, yea so that's what'scool over it Derek: so that's The rationale why I'm employing NodePiotr: did I forget about just about anything? Derek: no which is mainly it Piotr: okDerek: naturally, to the front conclude, I exploit html, CSS and JavaScript, and I use CSS3 and html5 CSS3 over the mobiledevice to carry out the CSS transforms things.
Piotr: which 1? Derek: to the application ok, one very last issue, nowwe are going into a completely different portion which can be the entrance conclude ofthe application when accomplishing this undertaking I found Piotr: Github:p Derek: I identified Github for mac, no :p ok, Incidentally this job is open up resource;you may fork me on Github, and also have your own versionof the Raspberry Television set so right before heading deeper in the application composition, I will inform you a tad about the trick that Idiscovered while executing the world wide web cellular application, Alright you recognize, you can find native apps and mobileweb applications and there's Phonegap which is hybridso I've, yea Okay, as you'll be able to see right here, the iconof the application what? Yes, can you open the app remember to, ok? there is certainly aflash display screen, and it seems like a native app, there is not any browser, why, due to this, I went into the apple safari documentation, and I readthe subsequent: if you insert the Metatag within your html application cell World wide web app title distant, whenever you go to safari, you drop by this connection, youcan click incorporate to property screen, proper which title will arrive by default, the graphic, the icon will occur, and we substitute the default icon by expressing Ralequal apple contact icon and also the startup image that is the flash impression is apple touch startupimage so these Metatags and backlinks are furnished by apple, so we are form of noticing what theywant to perform Sooner or later you are aware of They are leaping into webtechnologies and JavaScripts to generate indigenous applicationsthat's my concept about cell advancement, and recently Firefox cell OS, if you readabout it, It is all about producing those nativemobile programs applying Net technology Piotr: It really is really a program Make on html5Derek: Of course, particularly, Audience: and do you think if on android itwill be chrome OS? Derek: Sure, I hope so: p no it's the samehouse anyhow, yea that's it, I'm utilizing the logoas Svg, I do not know why :p Alright, now let's return to Node, now again tothe core of the appliance, as it is possible to begin to see the structure is quite simple I have a publicdirectory, in it there's the html, JavaScript, visuals, fonts, CSS, all People factors, andmy server is barely this code, It truly is application.
js, Okay now when you're creating on Node, youhave one thing called npm, npm is a pool of modules and libraries build on Node so let'ssay I need Omx player, That is what I did, and shockingly, it labored, I was seeking fora way to control Omx player without the need of crafting The full core so I found this, Alright, how canI utilize it? I head to my dependencies file; ah not thisone, that's the Node module, yea package deal.
Json, below it is possible to specify a great deal of variables, thename of the software, whatever, dependencies, that's what's critical, I am employing Convey, I will talk about it, jade, no I am not employing jade Alright, fantastic, could it be apparent, nicely I am goingto go to Github, the code is on Github, a lot better Okay so Convey, jade, I am not usingjade, socket.
io Omx controller, merely so How come we do that? on Node, you produce downyour dependencies on a single file, therefore you go to your terminal, on your Node directory whichis this one particular below, and appear , what I will do, I'll be ridiculous , I am heading todelete my job Okay, I will notify it sudo, and what, I deleted the Node modulesnow the application just isn't Functioning any more so I go ahead and publish down npm install, and what transpires can it be read through the dependencies file and downloads many of the dependencies andthe dependencies of your dependencies so You do not do just about anything, you'll be able to deploy your application with a server, on a enhancement to your developer friendyou know anyplace and you simply ~~~~~ these, excuse me Audience: why Will not you use apt-get? Derek: apt-get is for Ubuntu and Debian, youknow to down load things, npm is similar it the same idea but applied to the net accurately, but be aware, these dependencies are various within the dependencies that you are considering aboutthese dependencies are for Node, using npm instead of apt-get, but it's the identical conceptand That is what's pleasant about Node ok so soon after downloading the dependencies you will geta folder known as Node modules, ok and also to use these modules, You will need to call for them, soI'm intending to say var Convey have to have Specific app equal Categorical results in the Convey server, but it surely would not, but I must have to have http that's by default there and build serverand wrap it with application, so inside it, within create server, There may be your Categorical server, now if I don't desire to make use of Categorical, which saves a great deal of time, I can predefine my serverto provide the written content that I want, Alright but right here I am making use of Specific for these causes, path, hardly ever intellect, io is socket.
io, and socket.
io listens for the server and also to the consumer soyou want socket.
io in your server aspect and socket.
io with your entrance conclude spawn is alsolike Piotr explained, a native module and Node, you don't need to down load it Omx participant isto Regulate the Omx participant about the Raspberry Pi now each and every Categorical server needs a littlebit of configuration specifying the port and stuff like that now discover here I am usingprocess.
atmosphere.
testport Alright, now if I go back into this, And that i type in env it stayson the environments, now if I include examination port, export test port equal 8080 Okay, in this manner wheneverI deploy my app, it's going to do the job, you are aware of so if on my staging server I am utilizing the port8080 but on my true server I'm using the default port 80, ideal so I am able to make this happen by specifyingthis in the method natural environment, like I can entry this by means of Node by carrying out this process.
env.
thevariable, meaning if I console .
load now approach .
env display within the Raspberry Pi, it willshow, 0.
0 app.
person.
omx That is for your Omx player, for instance I desire to pause the Film, if I am making use of Specific, I'm able to condition that Convey.
use.
omx , it is going to make for me these 3 requests, that I can do, pause, quit and start now the routes, normally, what you can do on Node, You will need a boiler plate to start out, proper, you don't need to put in writing the boring code againand over and over, so what Categorical does, and that is the Node server, To start with youshould install it like that, npm and put in express, and provide the minus g parameter, minus g will put in it globally, so now if I want to make a new task, ~~~, let'sgive