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...
Hello men and welcome to the Establish your ownGoogle Television set workshop, Alright who between you understands what on earth is a Google Television set a Google Tv set is usually a hardwaredevice; you connect it by HDMI to the TV, so you're TV becomeslike a wise Television set you'll be able to watch YouTube videos on it, playgames and It is, no it's not the nexus dice, It truly is Virtually such as the nexus dice but it really's calledthe Google Television set now there accomplishing likewise a hardwaredevice produced by Sony that you simply link by HDMI for the Television they usually'redoing a standalone TV by using a chip in it that serves the Google Tv set we're variety ofreplicating this about the Raspberry Pi, Okay but for now, we created; I developed a YouTubedownloader to help you view YouTube films over the Raspberry Pi and Management them withyour cell machine so right before digging deeper inthe technical stuff, I will explain to you a smalldemo, Okay Firstly I'll SSH into the Raspberry Pi thatyou may give it commands ok, 102 and also the username is pi, so by default the RaspberryPi has this default username and that is pi and also the password isRaspberry, Alright so we are In the pi this my household directory, Okay, I have set up the applying inside of homeNode Google TV Okay, now I launch the Node application byexecuting this command and increase the & symbol to operate it from the track record.
Now there's a great deal ofways to run the NodeJs software during the track record but on the Raspberry Pi, It truly is thefastest way, Alright, as it was working and I did a previousdemo, yes we're going to https://iptvrestream.net in additional details about this butthis is simply to run the demo, We will discuss Node, about how theremote is Performing, about every little thing ah but we have to have it into, ok and now I'mgoing to operate chromium in Kiosk mode and that is why Don't fret men; we're heading togo as a result of this, Okay and Now we have this mistake this error simply cannot opendisplay, why since I'm executing the chromium browser from SSH, Alright so I would like tocheck my natural environment variables and incorporate to them Screen so I simply click and typeexport Show equals 0.
0 factors to the display screen then I execute thisand We'll see that our stunning TV isup and jogging now this hideous bar is mainly because I Beforehand shut chromium in a nasty wayso give it a next and its loading Which'sit so This is often our well-known TV, mainly I just did the view but I am planning to dolisten and Perform in the future the temperature no, I manufactured the whole factor but the design I took it from the internet I usedthese attractive icons yea like you can find this icon that's this icon you recognize, fantastic artistscopy good artists steal, that's it everywhereok so I'm going to open up tree mode, see this, this is simply not a native web application nevertheless it has abeautiful icon, ok now, as it is possible to see I'm swiping right and itsmoving Okay and I swipe remaining and it moves remaining now I am heading to find a Film Alright it'sshowing with you? ok and I'll click on look at this script known as YouTube downloader;we're going to also pass through it.
It downloadsthe Motion picture from YouTube and it saves it so it's from any YouTube policies nonetheless it'sRaspberry Pi and It can be an open org guys Hence the workaround is to use the script, downloadthe Film and Engage in it look at Sure it may Engage in around 1080p higher definitionmovie along with the Motion picture is loading, This is actually the Harlem shake at Lamba Labs that Imissed, if I want to pause the Motion picture I just tap and it pauses, I tap all over again to resume andif I want to exit I tap to the header now thisis my user experience about this you realize, I could not make like a proper remotewith buttons and stuff like that, so I stated whynot applying swipe gestures and tap and stuff similar to this, Alright Hence the demo is okay, the demo is Operating Enable the workshop get started: Okay First off I'm going to demonstrate brieflythe blueprint with the Raspberry Pi and that is a simplething to do now, you will find the HDMI port, USB, u have two USB, LAN, the modelB comes with 512mbytes of ram the model A comes along with 256mbytes you've theaudio, the movie, LEDs, and also the GPIO which you'll be able to application as well as hardwarestuff product b with 2 USBs model A as well and also the SD card now if youfirst buy you're Raspberry Pi, You must visit RaspberryPi.
org and download the ok, There are tons of Linuxdistributions which you can boot around the SD card, They are all photos, I'm employing Raspbianbecause It really is by far the most acknowledged and there is a good deal ofthese Distros are according to Debian, every one of us knowDebian, but this Raspbian is specially produced forthe Raspberry Pi with plenty of softwares and packages and driverson it, Okay now when you to start with obtain you happen to be Raspberry Pi you must duplicate thisimage and execute several codes to produce the picture bootable to the SD card Alright, we'renot going to endure this right now, but you will discover a lotof tutorials online I didn't improve it, left it just how it's Alright, hardware component completed, configuration andsoftware utilised Alright we mentioned Raspbian, Sure the YouTube downloader, the script, YYouTube-dl ah sorry, no no, YouTube downloader, yes It is really an exceedingly know script todownload YouTube flicks on Ubuntu Debian Linux Alright, obviously It is forbidden by Google, You can not down load YouTube video clips, You should stream them Certainly accurately, You need to updateit when they alter, the fellows adjust Alright It is really very simple to downloada YouTube Motion picture making use of that; I will visit YouTube, that'sa Motion picture, downloading video, and It really is downloading, now I'll end it, becausewe have restricted quota Alright, yes It truly is messy ok, it dependson the hardware, Omx participant as well as movie started off, Omx player supplies a established ofshortcuts, such as I can stop and Participate in;I'm tapping on my cellular I understand it's a really pleasant music, we will not watchit: p Okay and now I'm going to reveal a little bit aboutthe architecture utilised Within this job and why, Alright as you'll be able to see its all JavaScript, JavaScript around the frontend, JavaScript within the backend, suitable, This is why I had to use NodeJs, now, whoknows about NodeJs, appear here fellas, convey to us just a little about NodeJs and why did I exploit itin this job I instructed u why :p Piotr: alright, so my identify is Piotr Yordanovand, properly the individuals who know me understand that I'ma fanatic of style of Node mainly because I have beenusing Node for some time, but there is certainly, so I will tell you why, tothe code directly, ok so NodeJs mainly is, so chrome truly runs one thing termed v8 it's a JavaScript engine; it's the enginethat understands and interprets JavaScript so there'sthis ridiculous man who like four many years in the past took this v8 and place it within the server andnow all outside of a sudden you are able to summon you might be terminal, you can start signing up for interpretingJavaScript the attractiveness about it is that you have the powerfulv8 engine carrying out this, Alright so forget about this, as programmers what's appealing about itis that Beforehand until now if you don't useNode and you should make a Net software, you'regoing to get applying any type of other language Irrespective, based on your taste, python, it might be php, it can be ruby, and it could bewhatever, and every language, even Java, each and every languagehas a framework along with it that's like for Internet, Ruby has Rails, Php has a lot ofthem coding evenings or no matter what cake, python has jungleflask and The remainder Node isn't a language and Node isnot a framework, Node is just Node, a JavaScript interpreter, that's what it truly is, youcan't Evaluate Node towards the Many others having said that that getting claimed, Node has couple offrameworks on the market that happen to be style of intriguing even so the appealing part of applying Node isthat you're using JavaScript, if you overlook aboutperformance, simply because at the end working day how can we actually proveif It is really a lot more profound in comparison to the Other folks? It does have limitations, mainly because Node issingle threaded, so that is excellent for io poor forCPU intense responsibilities, suitable? So when Derek was describing to mehow he did the app, what is truly appealing isthat, do I talk about socket? Derek: Certainly Piotr: thisis identified as socket.
io, now any of you, Have you ever accomplished Website get the job done just before? Do you knowabout Ajax? Viewers: yea Piotr: in the event you don'tknow, just simply put, Ajax is basically to the browser and I need tolet's say modify what is occurring around listed here devoid of loading the page, but I want to fetchcontent from someplace, it could be my server or any server, so I makean Ajax request, Ajax is nice, but it's kindof troublesome whenever you produce it, the problem is Safe and sound, perhaps, Idon't know but what's taking place in this easy socket.
iowhat really happens is that it results in sockets, so now, if you are within the client, you connectto a socket about the server and it won't block, it just emits occasions, right away celebration pushed, the factor about socket.
io Specifically is thatit's purely in JavaScript so It can be like, it natively is effective in Node, and Website sockets ingeneral, they do not natively get the job done in any other language you can find library~ so what Derek is executing about Here's: he wantsto have the capacity to control from his controller whichis the mobile phone he would like to manage the browser or Raspberry Pi and it needs to be Reside, it should be activities taking place “swipe” which is anevent, so on my pi I would like to realize that's anevent and make a thing over it so he could have performed it in Ajax but he is doingit working with socket simply because, yea actually that's the syntax, It is basically muchmore more simple, and It really is like integrated in indigenous inside the ecosystem he's using, so socketis a single strong position and the opposite strong issue isthat he just used JavaScript within the pi, Derek: onthe socket matter, would you recall producing a code, an Ajax code natively, ahnot natively but without the need of working with jQuery?it's a prolonged procedure; You should satisfy a lot ofbrowsers like World-wide-web explorer, things like that, so jQuery, they did Ajax which can be asimple Resource to entry Ajax and receives and article and regardless of what, now socket.
io did the identical factor for World wide web sockets, and not just for Internet sockets, forreal-time programs like socket.
io supports even IE6 that has no World wide web sockets in it Piotr:It's got Flash Derek: Certainly , so it falls into A different technology, like flash or Xhr polling, very long polling, things likethat Piotr: think they really use Ajax Derek: andthey use Ajax also, socket.
io Marc: yea it deprecates to Ajax, specifically, sothat's it Piotr: so socket.
io was the powerful point, the opposite potent issue is me doingJavaScript in each and every spot, right Derek: and also the thirdpoint is spawning Piotr: that is essentially a fascinating andfunny thing what occurred with Node, is the fact that Abruptly you can in fact builda shell script, making use of JavaScript, when you ever needto get in touch with anything on your terminal, generally there is certainly this perform called spawnDerek: Spawn boy or girl method, module Piotr: you have your application, which has a programrunning; it spawns An additional plan and run a command in it, and you'll startpiping results from one particular app to a different, for those who know about piping, yea so that's what'scool about it Derek: to make sure that's The key reason why why I am making use of NodePiotr: did I ignore anything at all? Derek: no which is generally it Piotr: okDerek: of course, over the entrance conclusion, I exploit html, CSS and JavaScript, and I use CSS3 and html5 CSS3 around the mobiledevice to perform the CSS transforms things.
Piotr: which a single? Derek: to the app Okay, 1 very last matter, nowwe are transferring into a completely various segment which is the front conclude ofthe application even though doing this job I uncovered Piotr: Github:p Derek: I found Github for mac, no :p Okay, by the way this challenge is open supply;you'll be able to fork me on Github, and also have your personal versionof the Raspberry Television set so in advance of likely deeper from the application construction, I will show you a tad in regards to the trick that Idiscovered although performing the world wide web cellular app, Okay you understand, you can find native applications and mobileweb apps and there is Phonegap which can be hybridso I've, yea ok, as you can see right here, the iconof the application what? Yes, can you open up the app remember to, ok? you will find aflash screen, and it seems like a native app, there's no browser, why, due to this, I went on the apple safari documentation, and I readthe following: in the event you add the Metatag in your html application cellular World-wide-web application title remote, whenever you head over to safari, you head over to this connection, youcan click insert to residence display screen, right which identify will arrive by default, the impression, the icon will come, and we swap the default icon by expressing Ralequal apple contact icon and the startup impression which happens to be the flash impression is apple touch startupimage so these Metatags and links are supplied by apple, so we're type of noticing what theywant to accomplish in the future you know They are jumping into webtechnologies and JavaScripts to produce native applicationsthat's my thought about cell progress, and not too long ago Firefox cell OS, in case you readabout it, It is all about acquiring People nativemobile applications applying World-wide-web technology Piotr: It is actually a method Construct on html5Derek: yes, just, Audience: and do you believe if on android itwill be chrome OS? Derek: Certainly, I hope so: p no it is the samehouse anyhow, yea that's it, I'm using the logoas Svg, I don't know why :p ok, now let us go back to Node, now back again tothe Main of the application, as you are able to see the composition is very simple I've a publicdirectory, in it there is certainly the html, JavaScript, photos, fonts, CSS, all Those people things, andmy server is only this code, it's application.
js, ok now when you're creating on Node, youhave a little something identified as npm, npm is actually a pool of modules and libraries Create on Node so let'ssay I want Omx participant, That is what I did, and shockingly, it worked, I was seeking fora way to regulate Omx participant devoid of crafting The full core so I found this, ok, how canI use it? I drop by my dependencies file; ah not thisone, that's the Node module, yea package.
Json, listed here you can specify many variables, thename within your software, whichever, dependencies, That is what's crucial, I'm utilizing express, I will look at it, jade, no I am not applying jade Ok, superior, could it be distinct, very well I am goingto move to Github, the code is on Github, much better Okay so express, jade, I'm not usingjade, socket.
io Omx controller, just so How come we do that? on Node, you create downyour dependencies on a person file, and you also go to the terminal, on your Node Listing whichis this a single listed here, and appear , what I'll do, I'm going to be ridiculous , I am going todelete my project Alright, I will tell it sudo, and what, I deleted the Node modulesnow the applying just isn't working anymore so I go ahead and publish down npm set up, and what happens is it read the dependencies file and downloads all of the dependencies andthe dependencies with the dependencies so You do not do everything, you may deploy your software with a server, on a growth on your developer friendyou know anywhere and you just ~~~~~ these, justification me Viewers: why Will not you utilize apt-get? Derek: apt-get is for Ubuntu and Debian, youknow to download stuff, npm is similar it a similar thought but placed on the world wide web accurately, but remember, these dependencies are various from your dependencies that you are contemplating aboutthese dependencies are for Node, working with npm instead of apt-get, but it is the similar conceptand that's what's good about Node Okay so following downloading the dependencies you may geta folder termed Node modules, ok and to use these modules, You should require them, soI'm intending to say var express have to have Categorical app equivalent Convey generates the Specific server, but it does not, but I have to demand http that is by default there and make serverand wrap it with application, so within it, within create server, There exists your Categorical server, now if I don't desire to utilize Specific, which saves a great deal of time, I can predefine my serverto serve the articles that I want, ok but below I am working with Convey for these explanations, route, in no way thoughts, io is socket.
io, and socket.
io listens towards the server also to the client soyou will need socket.
io on your own server aspect and socket.
io on your entrance finish spawn is alsolike Piotr explained, a local module and Node, you don't need to obtain it Omx player isto Manage the Omx player about the Raspberry Pi now every single Specific server desires a littlebit of configuration specifying the port and things like that now recognize right here I'm usingprocess.
atmosphere.
testport Alright, now if I return into this, and I key in env it stayson the environments, now if I incorporate exam port, export exam port equal 8080 ok, in this manner wheneverI deploy my application, it can get the job done, you already know Therefore if on my staging server I'm utilizing the port8080 but on my serious server I am utilizing the default port eighty, proper so I can try this by specifyingthis in the method environment, like I can entry this by means of Node by undertaking this method.
env.
thevariable, that means if I console .
load now procedure .
env Screen about the Raspberry Pi, it willshow, 0.
0 application.
person.
omx this is for that Omx participant, as an example I want to pause the Film, if I am making use of Specific, I am able to point out that Convey.
use.
omx , it is going to create for me these 3 requests, that I can do, pause, quit and begin now the routes, typically, what you are able to do on Node, you need a boiler plate to begin, appropriate, you don't want to put in writing the unexciting code againand many times, so what Specific does, that is the Node server, first of all youshould install it like that, npm and set up Convey, and provide the minus g parameter, minus g will install it globally,