Cov txheej txheem:

Retro Idiot Box: 10 Kauj Ruam
Retro Idiot Box: 10 Kauj Ruam

Video: Retro Idiot Box: 10 Kauj Ruam

Video: Retro Idiot Box: 10 Kauj Ruam
Video: ВСЕ СЕРИИ КРУТОГО СЕРИАЛА С БЕСПОЩАДНЫМ СЮЖЕТОМ! Петля Нестерова / THE LOOP + ENGLISH SUBTITLES 2024, Kaum ib hlis
Anonim
Retro Idiot Box
Retro Idiot Box

Kuv pom lub xov tooj cua Magnavox qub los ntawm 1984 zaum ntawm lub txee ntawm kuv lub khw muag khoom hauv nroog. Kuv xav rau kuv tus kheej, "oh NEAT!" Raws li kev tshuaj xyuas ntxiv Kuv pom tus nqi $ 15 ntawm nws, yog li kuv txiav txim siab coj nws mus tsev thiab ua qee yam spiffy tawm ntawm nws. Kuv nco qab saib reruns raws li menyuam yaus ntawm txhua qhov zoo nkauj hauv cov xim dub thiab dawb, thiab xav ua qhov no muaj tseeb dua.

Qhov teeb meem yog tias tsis muaj cov chaw sib piv nyob rau ntawd ntxiv lawm, thiab qhov no tsis muaj peev xwm ua tau ntawm kev txiav txim siab ATSC, lossis ib qho kev txiav txim siab digital. Kuv tau pom tias muaj AV txuas ntawm sab, thiab muaj ob peb lub raspberry pi tso ib puag ncig, yog li kuv txiav txim siab mus rau hauv kev taug txuj kev nyuaj kom paub seb kuv tuaj yeem tso cov channel rau qhov no li cas. Kuv xav kom nws saib ntse, ib yam. Kuv yuav tsis siv nws ntawm 9 D-cell roj teeb, yog li kuv tuaj yeem nkaum rpi hauv lub roj teeb nrog rau tus tswv ntawm lwm yam khoom zoo.

Kauj Ruam 1: Tau Txais IPTV Cov Npe Zoo

Tau txais Daim IPTV Zoo
Tau txais Daim IPTV Zoo

Daim IPTV Txhua Hnub muaj qhov xaiv zoo heev ntawm cov chaw iptv pub dawb tsim los ntawm lub tebchaws. Xaiv lub tebchaws xaiv, thiab rub cov ntaub ntawv m3u.

Rau cov software uas nyob hauv qhov no, m3u yog hom ntawv xav tau. Koj tuaj yeem nyeem ntxiv txog qhov tshwj xeeb ntawm hom ntawv no.

Kauj Ruam 2: Kev Xeem Ua Ntej Ua Ntej

Tus nab npawb nab npawb nab npawb uas peb yuav sau cais cov ntaub ntawv m3u rau hauv cov npe chaw nres tsheb.

#!/usr/bin/python3

ntshuam subprocess los ntawm sys ntshuam argv chav kawm Chaw nres tsheb: def _init _ (tus kheej): self.channel = 0 self.name = `` self.address = '' channel_list = nrog qhib ('./ us-m3uplaylist-2020-08- 17-1.m3u ',' r ') raws li m3u: i = 0 rau kab hauv m3u: yog kab.startswith ('#EXTINF '): qhov no = Chaw Nres Tsheb () this.name = line.split (', ') [1] kab = tom ntej (m3u) this.address = line.strip () this.channel = kuv channel_list.append (qhov no) kuv = kuv + 1 txheej txheem = subprocess. Popen (['vlc', '--loop', '--intf', 'dummy', '--fullscreen', channel_list [int (argv [1])]. chaw nyob])

Wb rhuav qhov no.

#!/usr/bin/python3

Qhov no qhia bash tias peb yuav siv sej 3 los txhais cov ntawv no.

ntshuam cov txheej txheem los ntawm sys ntshuam argv

Peb yuav xav tau cov txheej txheem txheej txheem los pib peb qhov piv txwv vlc, thiab peb yuav xav tau argv los xaiv qhov channel twg peb yuav tso vlc rau hauv.

Chav Kawm Chaw Nres Tsheb: def _init _ (self): self.channel = 0 self.name = `` self.address = ''

Qhov no piav qhia chav kawm hu ua Chaw Nres Tsheb. Txhua tus channel yuav muaj tus lej channel, lub npe ntawm cov channel raws li tau txais los ntawm cov ntaub ntawv m3u, thiab qhov chaw nyob ntawm qhov chaw uas kwj tawm los ntawm.

channel_list =

Nov yog cov npe uas yuav khaws txhua txoj hauv kev cais los ntawm cov ntaub ntawv m3u.

nrog qhib ('./ us-m3uplaylist-2020-08-17-1.m3u', 'r') li m3u: i = 0 rau kab hauv m3u: yog line.startswith ('#EXTINF'): qhov no = Chaw Nres Tsheb () this.name = line.split (',') [1] kab = tom ntej (m3u) this.address = line.strip () this.channel = kuv channel_list.append (qhov no) kuv = kuv + 1

Lub voj no qhib m3u playlist, thiab nkag mus rau cov ntaub ntawv. m3u cov kab ntawv uas peb txaus siab pib nrog #EXTINF, Qhov no qhia txog kev nkag mus tshiab rau hauv daim ntawv playlist. Tus nqi tom ntej ntawm kev txaus siab yog lub npe, uas nyob ntawm kab ib yam li #EXTINF, tab sis nrog tus lej nruab nrab ntawm lawv. Cov kab hauv qab no ntawm qhov tshwj xeeb m3u yog qhov chaw nyob ntawm kwj. Muaj tus lej "i" siv los suav cov channel twg uas yog. Lub voj no rov ua dua los ntawm tag nrho cov ntaub ntawv m3u thiab ua tiav cov channel_list nrog cov chaw nres tsheb.

txheej txheem = subprocess. Popen (['vlc', '--loop', '--intf', 'dummy', '--fullscreen', channel_list [int (argv [1])]. address])

subprocess lub tsev qiv ntawv tso cai rau nab nab hu cov txheej txheem (cov haujlwm) thiab rov qab PID (Txheej Txheem ID). Qhov no ua rau nab nab muaj peev xwm los tswj kev pib thiab kaw ntawm cov haujlwm "raug" yam tsis tau sau cov ntaub ntawv keeb kwm, lossis tso cai ntau txoj cai kom ua haujlwm nrog "system" hu xov tooj. Txhua lub ntsiab lus ntawm kab lus siv los ua kev sib cav rau Popen yog raws li tau sau hauv kab hais kom ua.

vlc --loop --intf dummy --fullscreen chaw nyob

Cov lus txib saum toj no yog dab tsi uas xav kom khiav, nrog --loop xaiv kho qee qhov teeb meem nrog kwj ncua thaum lub sijhawm thauj khoom tom ntej (txawv m3u8 teeb meem), --intf dummy pib vlc yam tsis muaj lub interface, tsuas yog lub vijtsam, --fullscreen tshaj tawm cov vis dis aus hauv hom puv npo (TSIS YOG!), thiab qhov chaw nyob yog qhov chaw nyob ntawm kwj. Raws li koj tuaj yeem pom hauv cov cai, peb tab tom muab qhov chaw nyob los ntawm daim ntawv teev cov naj npawb channel, uas tau muab rau ntawm runtime ntawm cov lus argv. Txuag cov ntaub ntawv no raws li tv_channels.py, hloov qhov chaw playlist hauv cov ntaub ntawv nab nab los taw rau koj daim ntawv teev npe, thiab koj tuaj yeem ua raws txoj cai raws li hauv qab no:

nab hab sej tv_channels.py

Kauj Ruam 3: Ntxiv GPIO

Ntxiv GPIO
Ntxiv GPIO
Ntxiv GPIO
Ntxiv GPIO

Cov txheej txheem qhia pom ob lub GPIO pins siv rau cov nyees khawm, thiab txhua tus muaj qhov rub tawm tus tiv thaiv kom GPIO tus pin rub siab tom qab khawm nias. Cov cai tau teev tseg yav dhau los tuaj yeem ua kom zoo dua los ua haujlwm me ntsis ntxiv los ntawm kev ntxiv GPIO lub peev xwm. Qhov no tso cai rau peb hloov pauv cov channel nrog cov nyees khawm, ntau dua li cov keyboard thiab cov lus sib cav, ib yam li rau kev lees paub tv.

Thawj qhov ntawm kev ceeb toom yog tias kuv muaj lub TV txhais ua chav kawm. Txhawm rau ua TV, peb yuav tsum nyob ntawm cov channel tam sim no, muaj cov npe ntawm cov peev txheej ua tau, thiab muaj peev xwm hloov pauv cov channel. Hauv qhov piv txwv no, tsuas yog txoj hauv kev ntawm kev hloov pauv cov channel yuav yog nce mus rau cov npe channel, thiab txav mus rau hauv cov npe channel. Thaum cov channel txiav txim siab, peb yuav tau pib VLC ntawm cov channel peb xav pom.

#!/usr/bin/python3

los ntawm lub sijhawm ntshuam pw ntshuam ntshuam subprocess los ntawm sys ntshuam argv los ntawm gpiozero ntshuam khawm chav kawm Chaw Nres Tsheb: def _init _ (tus kheej): self.channel = 0 self.name = `` self.address = '' self.process = '' chav TV: def _init _ (self, filename): self.current_channel = 0 self.channel_list = self.build_channel_list (filename) self.start_channel () def build_channel_list (self, filename): nrog qhib (filename, 'r') li m3u: i = 0 rau kab hauv m3u: yog line.startswith ('#EXTINF'): qhov no = Chaw Nres Tsheb () this.name = line.split (',') [1] kab = tom ntej (m3u) this.address = kab. strip () this.channel = kuv tus kheej.channel_list.append (qhov no) kuv = kuv + 1 def channel_up (tus kheej): self.current_channel = tus kheej.current_channel + 1 yog self.current_channel> len (self.channel_list): tus kheej. current_channel = len (self.channel_list) self.start_channel () def channel_down (tus kheej): self.current_channel = self.current_channel - 1 yog self.current_channel <0: self.current_channel = 0 self.start_channel () def start_channel (self): sim: self.process. tua () tshwj tsis yog: kis dhau ('pib channel % d' % self.current_channel) self.process = subprocess. Popen (['vlc', '-q', '--loop', '--intf', ' dummy ',' --fullscreen ', self.channel_list [self.current_channel].address]) this = TV ('./ us-m3uplaylist-2020-08-17-1.m3u ') channel_UP = Khawm (18) channel_DN = Khawm (23) thaum Tseeb: channel_UP.when_pressed = this.channel_up channel_DN.when_pressed = this.channel_down

Qhov kev rov ua dua ntawm cov cai no muaj qee qhov kev txhim kho. nws tam sim no siv tus qauv hu ua gpiozero uas xav tau los ntawm raspberry pi kom nkag tau yooj yim ua haujlwm ntawm GPIO pins

sudo apt-tau nruab python3-gpiozero

los yog

sudo pip nruab gpiozero

Raws li pom hauv kuv tus lej, kuv tau xaiv GPIO 18 thiab GPIO 23 rau channel UP thiab channel DOWN feem. Lub tsev qiv ntawv gpiozero muaj chav kawm zoo rau cov haujlwm nyees khawm rau when_pressed, is_pressed, when_held, thiab lwm yam. Qhov no ua rau nws yooj yim zoo nkauj. Kuv tau xaiv qhov when_pressed, uas hais txog kev hu rov qab los ua haujlwm thaum pom lub teeb liab no.

Qhov kev hloov pauv loj kawg yog suav nrog '-q' xaiv hauv VLC cov txheej txheem hu ua. Qhov no yooj yim sau vlc yam tsis muaj txhua qhov tso tawm mus rau lub davhlau ya nyob twg kom nws tsis txhob sib tsoo kom peb tuaj yeem pom cov ntaub ntawv luam tawm cov lus hauv cov cai.

Kauj Ruam 4: Muab Cov Khoom Kho Kom Zoo Dua

Ua ke Cov Khoom Kho Kom Zoo Dua
Ua ke Cov Khoom Kho Kom Zoo Dua
Ua ke Cov Khoom Kho Kom Zoo Dua
Ua ke Cov Khoom Kho Kom Zoo Dua
Ua ke Cov Khoom Kho Kom Zoo Dua
Ua ke Cov Khoom Kho Kom Zoo Dua

Kuv tsis tau xam pom tias kuv xav ua kom tiav qhov no, thiab nws yuav yog qhov kev daws teeb meem tshwj xeeb rau txhua tus qauv tv hauv kev siv. Kuv yuav tsum xav txog qhov no thiab tshuaj xyuas ib puag ncig TV kom pom lub zog zoo rau tus pi thaum kuv ntsaws lub computer sab hauv lub roj teeb loj. Kuv kuj tau txiav txim siab siv lub khawm khawm rau xaiv cov channel, raws li lawv twb zoo nkauj tso rau hauv TV, thiab lub moos tsis ua haujlwm lawm. Kuv yuav tshaj tawm ntxiv thaum kuv pom qhov kev daws teeb meem zoo, tab sis qhov no yog qhov uas kuv txoj haujlwm yuav sib txawv heev los ntawm txhua tus neeg. Txaus siab rau qhov tiag-tv-zoo li IPTV kev koom ua ke!

Kauj ruam 5: Pi zog

Pi zog
Pi zog

Txog tus qauv TV kuv pom, nws xav tau lub hwj chim 12V. Kuv tau tshawb nrhiav ib puag ncig ntawm pawg thawj coj, tab sis tsis pom ib qho kev tswj hwm lub zog pom tseeb rau 5V, yog li qhov chaw pom tseeb tshaj plaws kom tau txais lub zog ruaj khov yog nyob ntawm pawg thawj coj saib xyuas qhov twg lub qhov txuas txuas rau 12V los. Muaj teeb meem pom tseeb nrog qhov no. peb tsis xav kib pi, yog li peb yuav xav tau tus tswj hwm lub zog. Kuv tau xaiv MP2315 Step-Down Power Converter. Nws yog av pheej yig, thiab siv tau yooj yim. Peb yuav muab lub 12VDC cov tswv yim los ntawm lub thoob txuas rau ntawm PCB mus rau IN+ thiab GND pins ntawm tus hloov pauv, thiab VO+ rau pin 2 ntawm Raspberry Pi, ntxiv rau GND.

Ua ntej qhov no ua tiav, nco ntsoov ua kom lub zog hloov pauv thiab ua kom ntseeg tau tias qhov tsim nyog 5V tawm los ntawm cov zis. Kuv xaiv qhov kev xaiv yooj yim tshaj plaws nrog qhov hloov kho qhov hluav taws xob. Lub tshuab txiav yuav kho qhov hluav taws xob, yog li kuv tau saib qhov hluav taws xob tso tawm nrog lub ntsuas hluav taws xob raws li kuv tau kho lub tshuab txiav nrog tus ntsia hlau.

Kauj Ruam 6: Kev Sib Koom Fais Fab

Kev Sib Koom Fais Fab
Kev Sib Koom Fais Fab
Kev Sib Koom Fais Fab
Kev Sib Koom Fais Fab
Kev Sib Koom Fais Fab
Kev Sib Koom Fais Fab

Tom qab khawb ib ncig ntawm TV, nws tau txiav txim siab tias qhov chaw zoo tshaj plaws kom tshem tawm lub zog yog los ntawm qhov tsis zoo ntawm lub tog raj txuas thiab lub TV ON/OFF hloov, uas txhais tau tias peb tuaj yeem qhib thiab tua cov kwj nrog TV, theej tas li txhawb lub zog pi los ntawm kev rub ncaj qha los ntawm lub tog raj txuas.

Cov xov hlau tau muab xauv rau hauv thiab pub nyob ib sab ntawm PCB qhov ib sab ntawm rooj plaub kom txog thaum lawv mus txog tom qab ntawm chav tsev, qhov uas lawv tau pub los ntawm lub qhov uas nyob tom qab ntawm lub roj teeb. Thaum lawv tau pub dhau los, peb tuaj yeem npaj qhov kawg ntawm txoj kab thiab txuas lawv mus rau tus tswj hwm lub zog. Kuv tau kho nws rau 5V txhawm rau lub zog pi thiab siv lub taub hau txuas rau nws kom peb tuaj yeem khiav poj niam rau poj niam dhia los ntawm tus tswj hwm lub zog ncaj qha mus rau pi's GPIO header teeb. Qhov no ib txwm tsis tau qhia, raws li pi feem ntau tau txais lub zog los ntawm UBS, uas muaj tus tswj hwm kab hauv qab txhawm rau kho 5V, tab sis txij li lub zog twb tau raug tswj lawm nws yuav tsum zoo.

Muaj qee qhov suab nrov ntawm kab kab los ntawm kev ua qhov no, vim tias muaj lub voj hauv av hauv qhov system. Kuv tau sim ntau lub zog thiab cov ntsiab lus hauv ntiaj teb thoob plaws pawg thawj coj vam tias yuav teb tau yooj yim, tab sis tsis pom ib qho. Kuv kuj tau siv lub xov tooj microUSB rau lub tshuab hloov pauv kom pom tias yuam lub zog los ntawm pi tus tswj hwm sab hauv yuav txheeb qhov teeb meem. Nws tsis ua Txoj kev daws teeb meem yuav nyob hauv qee qhov suab hauv av hloov pauv. Cov no tau xaj ntau dua li tsim, vim tias lawv pheej yig thiab ntim tau zoo. Koj tuaj yeem khaws lawv los ntawm cov khw muag khoom lossis cov chaw ua haujlwm feem ntau. Nov yog qhov kuv xaiv.

Kauj Ruam 7: Lub Sijhawm Ntev Khawm Tshuaj

Lub Sijhawm Ntev Kov Tshuaj
Lub Sijhawm Ntev Kov Tshuaj
Lub Sijhawm Ntev Kov Tshuaj
Lub Sijhawm Ntev Kov Tshuaj

Ua xyem xyav, cov nyees khawm yuav tsis nyob ntawm lub khob cij, yog li yuav tsum muaj kev daws teeb meem tas mus li. Kuv tau tuav qee qhov qub protoboard thiab cuam lub Circuit Court ua ke nrog qee tus header pins kom yooj yim nkag mus rau cov cim. Nov yog qhov uas txhua tus neeg yuav muaj qhov sib txawv ntawm kev xav yuav ua li cas txuas lossis nce cov nyees khawm. Kuv tau xaiv los tiv thaiv lawv thiab tsuas yog muab lawv tso rau hauv lub chassis xws li tus kov uas viav vias hla lub vijtsam kom nqa tsis cuam tshuam. Xav tias dawb mus rau lub tsev teev ntuj tsim los ntawm kev ntxiv 3d cov ntaub ntawv luam tawm uas ua kom yooj yim dua, siv cov txiv ntoo thiab ntsia liaj qhov rooj, cov nplaum zoo nkauj, ua ke cov khawm qub, txawm li cas los xij. Tsuav nws ua haujlwm, tsis muaj cov lus teb tsis raug.

Cov no yuav raug teeb tsa mus rau sab nraud ntawm rooj plaub, thiab Raspberry Pi yuav raug ntsaws sab hauv ntawm lub roj teeb uas dav heev, yog li yuav tsum muaj lub qhov me me txhawm rau txhawm rau tso cov kab hluav taws xob nkag mus rau hauv lub roj teeb.

Kauj Ruam 8: Kuaj Qhov Kawg Kawg

Kuaj Ntsuas Kawg
Kuaj Ntsuas Kawg

Txhua yam khoom siv yuav tsum tau ua kom raug kuaj xyuas zaum kawg kom pom qhov twg txhua qhov ntawm qhov yuav tsum tau ua rau lub chassis, thiab qhov loj me me, thiab lwm yam yuav tsum tau ua. Ib qho ntxiv nws yuav tsum tau txiav txim siab qhov twg tso cov khoom siv rau kev pom yooj yim ntawm kev sib txuas thiab nkag mus. Zaj dab neeg luv luv, xyuas kom txhua yam haum rau qhov uas koj xav tias nws ua ua ntej koj ua tsis tau yam tsis zoo rau koj txoj haujlwm thiab yuav tsum tau txais qhov khoob.

Kauj Ruam 9: Kev Sib Koom zaum kawg

Kev Sib Koom Zaum Kawg
Kev Sib Koom Zaum Kawg
Kev Sib Koom Zaum Kawg
Kev Sib Koom Zaum Kawg
Kev Sib Koom Zaum Kawg
Kev Sib Koom Zaum Kawg

Tam sim no txhua yam khoom siv kho vajtse yog qhov uas nws xav tau, thiab txhua yam haum zoo ib yam li cov kab hauv cov ntaub pua tsev. Wb txiav tej yam! Kuv txheeb xyuas qhov chaw nyob ntawm lub roj teeb uas kuv tuaj yeem tso cov kab hluav taws xob AV tawm siv qhov me me nyob hauv cov yas. Kuv tsau nws nrog lub zom zaws. Nws ua haujlwm luv luv zoo nkauj ntawm nws. Kuv siv lub dremel los zom cov yas ntau dua kom nws zoo haum zoo rau cov hlua.

Qhov kawg tivthaiv yog tus xaiv channel. Kuv tau hlais ib lub qhov me me hauv lub roj teeb thiab muab cov kab hluav taws xob tso rau ntawm nws ib zaug. Cov nyees khawm tau txuas nrog, thiab kuv tau txuas lub protoboard rau lub chassis yas nrog ob ntu ntawm pre-adhesive'ed velcro. Kuv tau txais tias muaj txog 1200 txoj hauv kev zoo los ua qhov no, tab sis qhov no ua haujlwm, thiab kuv muaj txhua yam uas kuv xav tau ntawm tes.

Kauj ruam 10: Txaus siab rau Koj Lub IPTV Vintage

Txaus siab rau koj Vintage IPTV
Txaus siab rau koj Vintage IPTV
Txaus siab rau koj Vintage IPTV
Txaus siab rau koj Vintage IPTV
Txaus siab rau koj Vintage IPTV
Txaus siab rau koj Vintage IPTV

Uas txog sums nws. Nrhiav cov yeeb yam thiab muaj kev lom zem saib. Tsis txhob zaum ze dhau, txawm li cas los xij. Koj yuav rot koj lub hlwb!

Muaj ntau chav los txhim kho txoj haujlwm no, yog li coj nws mus rau qhov kev xav uas koj xav tau, tab sis nws tau lom zem kom tau txais qhov no deb. Raws li rau kuv, Kuv khiav qhov no los ntawm cronjob ntawm kev rov pib dua, yog li stdout tsis ntes cov lus los ntawm tsab ntawv nab nab. Kuv xav kho qhov no kom kuv paub tias kuv nyob rau channel twg. Lwm qhov zoo ntxiv yog wireless keyboard dongle ntawm Pi. Qhov no yuav cia koj hloov pauv wifi network yog tias koj tawm hauv koj lub tsev nrog TV. Tsis hais. nws yog qhov haujlwm lom zem, thiab kuv tos tsis tau kom pib ntawm qhov tom ntej.

Pom zoo: