Cov txheej txheem:
- Kauj ruam 1: Tau Ubuntu, Tsim Cov Ntawv Teev Npe
- Kauj ruam 2: Tsim Streamrecord Script
- Kauj Ruam 3: Txuag Tsab Ntawv, Ua Pkill Tsab Ntawv thiab Ua Cov Ntawv Sau
- Kauj ruam 4: Siv KCron los teem sijhawm rau koj txoj haujlwm
- Kauj ruam 5: Koj nyob hauv Kev Lag Luam
Video: Teem Sij Hawm Streaming Audio Recordings hauv Ubuntu: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Yog tias koj zoo li kuv, koj tus thawj coj xav kom koj ua haujlwm thaum ua haujlwm, thiab tsis txhob zaum mloog koj lub xov tooj cua nyiam uas koj nyiam. Hauv cov lus qhia no, kuv yuav qhia yuav ua li cas kaw ib lub suab kwj tau siv mplayer, ceg tawv thiab cron kom teem sijhawm ua haujlwm.
Kauj ruam 1: Tau Ubuntu, Tsim Cov Ntawv Teev Npe
Rau cov lus qhia no, koj yuav tsum muaj Ubuntu Linux. Kuv khiav 7.04, tab sis qhov no yuav ua haujlwm rau lwm yam ntxiv thiab. Yog tias tib neeg zoo li txaus siab, Kuv yuav sau cais qhia qhia pom yuav ua li cas nrog Windows Yog tias koj twb tau khiav Ubuntu, tsuas yog yam koj xav tau yog muaj pub dawb los ntawm apt. Siv cov lus txib hauv qab no ntawm lub davhlau ya nyob twg los teeb tsa Lame, Mplayer thiab KCron.sudo apt-get install lame mplayer kcronType hauv koj tus password thiab paub meej tias teeb tsa. Siv cov lus txib hauv qab no los tsim cov ntawv koj yuav xav tau.sudo mkdir /scriptsmkdir /home /username /Music /NameOfShow Thiab cov lus txib no los ua tswv cuab ntawm cov npe uas koj nyuam qhuav tsim: sudo chown YourUserName /scripts
Kauj ruam 2: Tsim Streamrecord Script
Cov theem rau tsab ntawv peb tab tom siv yog raws li hauv qab no: 1. Qhib mplayer, taw tes rau suab kwj ntawm Internet2. Sau cov kwj rau wav cov ntaub ntawv hauv /tmp directory3. Tua tus txheej txheem mplayer thaum ua yeeb yam xaus 4. Hloov /tmp/mystream.wav rau mp3 cov ntaub ntawv, npe nws nrog hnub no hnub no thiab txav nws mus rau ntau 'cov neeg siv nyiam' phau ntawv teev npe nyob hauv cov neeg siv nplaub tshev. 5. Rho tawm cov ntawv wav hauv /tmp phau ntawv teev npe kom ua tiav qhov no, koj yuav tsum xub nrhiav pom qhov URL ntawm cov kwj uas koj tab tom nkag mus. Piv txwv li, Kuv yuav siv CSPAN xov tooj cua tshaj tawm, thiab sau cia thaum nruab nrab ntawm tav su thiab 2 teev tsaus ntuj hnub Monday txog Friday. Nov yog cov ntawv ntawm tsab ntawv:#!/Bin/shNOW = $ (hnub +"%b-%d-%y") mplayer "mms: //rx-wes-sea20.rbn.com/farm/pull/tx -rbn -sea34: 1259/wmtencoder/cspan/cspan/wmlive/cspan4db.asf "-ao pcm: file =/tmp/mystream.wav -vc dummy -vo null; lame -ms /tmp/mystream.wav -o" /home/shawn/Music/CSPAN/My Show - $ NOW.mp3 "; rm /tmp/mystream.wav; Luam cov ntawv no rau hauv cov ntawv tsis siv Gedit lossis Vi, thiab txuag nws li" streamrecord ". Koj yuav tsum tau kho cov cheeb tsam ntawm tsab ntawv hauv cov ntawv qaij, vim cov no tsis siv rau koj. Cov ntawv tom qab mplayer yog URL rau kwj uas koj xav sau, qhov no yuav tsum tau hloov nrog koj cov kwj URL, uas tuaj yeem pom yooj yim los ntawm kev mus rau kwj hauv Firefox, cia lub mplayer plugin pib, tom qab ntawd nyem-thiab xaiv "Luam URL".
Kauj Ruam 3: Txuag Tsab Ntawv, Ua Pkill Tsab Ntawv thiab Ua Cov Ntawv Sau
Tom ntej no, peb yuav khaws tsab ntawv mus rau /phau ntawv sau npe. Thaum tau txais kev cawmdim, mus rau ntu ntu ntu thiab ntaus cov hauv qab no:
cd /scripts chmod 700 streamrecord (Qhov no ua rau tsab ntawv koj nyuam qhuav tsim rau hauv cov ntawv ua tiav.) Tsim ib daim ntawv ntxiv hauv /cov ntawv sau. Qhov no yuav raug hu ua pkill, thiab yuav yog koj tus ntaus. Ntawd yog, nws yuav tua tus txheej txheem mplayer txhawm rau tso cai thawj tsab ntawv txuas ntxiv nrog kev hloov npe thiab nkag mus rau hauv cov kwj uas tau ntes. Cov ntawv sau tag nrho ntawm pkill tsab ntawv yog raws nraim hauv qab no: pkill mplayer Tam sim no, qhov no ua txhaum kev sau ntawv tsis raug cai, los ntawm tsis muaj #!/Bin/sh rau saum, tab sis nws ua haujlwm rau kuv. Thaum koj tau khaws cov ntaub ntawv pkill hauv /phau ntawv sau npe, siv chmod hais kom rov ua qhov no kom ua tiav. Koj yuav tsum tau nyob hauv ntu ntu ntu, hauv /phau ntawv sau ua ntej, tom qab ntawv ntaus: chmod 700 pkill Kev nrawm "ls" yuav qhia koj cov ntaub ntawv uas koj nyuam qhuav tsim, tam sim no nyob rau hauv qhov ntxim nyiam ntsuab tsis siv tus qauv dub.
Kauj ruam 4: Siv KCron los teem sijhawm rau koj txoj haujlwm
Cron, qhov zoo tab sis tsis meej pem me ntsis cov ntawv me me thiab cov kev pabcuam cuam tshuam tsim nyog tau txais tag nrho cov lus qhia rau nws tus kheej. Txhawm rau ua kom yooj yim dua, peb yuav siv KCron (uas peb tau teeb tsa ua ntej) hloov chaw. Yog tias kev teeb tsa mus raws li tau npaj tseg, koj yuav tsum pom KCron hauv Cov Ntawv Thov Cov Cuab Yeej Cuab Yeej. Hloov pauv, txoj haujlwm tuaj yeem pib los ntawm lub davhlau ya nyob twg los ntawm kev ntaus "kcron". Siv Ctrl+N los tsim txoj haujlwm tshiab, thiab teeb tsa txoj haujlwm raws li qhia hauv daim duab. Hauv daim duab koj tuaj yeem pom kuv teeb tsa qhov program /scripts /streamrecord kom ua haujlwm txhua lub hlis, mon-fri thaum 12 teev tsaus ntuj nrog 0 feeb.
Tsab ntawv thib ob uas koj tau ua, hu ua 'pkill' yog qhov ua tiav mplayer thiab tso cai thawj tsab ntawv txuas mus ntxiv. Koj yuav tsum teeb tsa lwm txoj haujlwm cron los ua cov ntawv ntawd ib yam. Rau kuv tus piv txwv, Kuv xaus nrog ob txoj haujlwm hauv KCron. (saib daim duab 2)
Kauj ruam 5: Koj nyob hauv Kev Lag Luam
Qhov ntawd yog txhua yam rau nws, txhawm rau tshuaj xyuas koj tes haujlwm koj tuaj yeem nyem txoj haujlwm ua haujlwm hauv cov ntaub ntawv hauv Kcron, xaiv 'khiav tam sim no' thiab tshawb xyuas mystream.wav hauv koj /tmp phau ntawv teev npe. Yog tias nws nyob ntawd (thiab loj hlob sai), khiav cov haujlwm pkill thiab koj yuav tsum pom sai sai no mystream.wav ploj ntawm koj /tmp phau ntawv teev npe, thiab cov ntaub ntawv.mp3 tshiab hauv cov npe koj tau teev tseg thaum koj hloov tsab ntawv. Yog tias koj kaw cov yeeb yaj kiab ntev, nco ntsoov tias nws yuav siv sijhawm zoo los teev koj cov ntaub ntawv.wav Ntawm ib qho 3 teev qhia kuv kaw, nws siv sijhawm kwv yees li 10 feeb los hloov kho rau mp3. Yog tias koj muaj teeb meem tau txais qhov no los ua haujlwm, tsis txhob tso kuv kab.
Khoom P. S. Kuv paub kuv cov txheej txheem yog qhov nyuab me ntsis, vim tias muaj tej zaum zoo tshaj plaws-kev coj ua uas kuv tsis ua raws hauv qee yam ntawm kuv cov kauj ruam, yog li thov tsis txhob kawm kuv ntawm Linux 101, qhov no tsuas yog txoj kev nrawm thiab qias neeg kom tsis txhob nco koj nyiam suab kwj.
Pom zoo:
SCARA Robot: Kawm Txog Foward thiab Rov Qab Kinematics !!! (Plot Twist Kawm Yuav Ua Li Cas Ua Lub Sij Hawm Tiag Hauv ARDUINO Siv Kev Ua Haujlwm !!!!): 5 Cov Kauj Ruam (nrog Duab)
SCARA Robot: Kawm Txog Foward thiab Rov Qab Kinematics !!! (Plot Twist Kawm Yuav Ua Li Cas Ua Lub Sij Hawm Tiag Hauv ARDUINO Siv Kev Ua Haujlwm !!!!): SCARA neeg hlau yog lub tshuab nrov heev hauv ntiaj teb kev lag luam. Lub npe sawv cev rau ob qho Kev Xaiv Ua Raws Li Lub Rooj Sib Tham Robot Arm lossis Xaiv Ua Raws Li Cov Neeg Siv Khoom Ua Haujlwm. Nws yog qhov tseem ceeb ntawm peb qib ntawm kev ywj pheej neeg hlau, yog thawj ob lub tebchaws
Lub Sijhawm Teem Sijhawm Teem Sijhawm ntawm RaspberryPi-4: 6 Cov Kauj Ruam (nrog Duab)
Lub Sijhawm Teem Sijhawm Teem Sijhawm ntawm RaspberryPi-4: Hauv Cov Lus Qhia no peb yuav ua lub ntsej muag-paub lub sijhawm tiag tiag ntawm Raspberry Pi 4 nrog Shunya O/S siv Shunyaface Library. Koj tuaj yeem ua tiav qhov ntsuas pom ntawm 15-17 ntawm RaspberryPi-4 los ntawm kev ua raws cov lus qhia no
Ua Lub Sij Hawm Sij Hawm Kub Lub Caij Nyoog: 16 Cov Kauj Ruam
Ua Lub Sij Hawm Sijhawm Sijhawm Sijhawm Sijhawm Sijhawm Ntev: Txawm hais tias lub thawv noj su zoo ib yam yog yooj yim siv thiab ua haujlwm tab sis muaj ib txoj haujlwm, nws tsis tuaj yeem teev sijhawm lossis teeb tsa qhov kub kom sov. Txhawm rau txhawm rau txhim kho qhov tsis txaus no, lub sijhawm no DIY tau ua los ntawm kev ua noj
VizTimer: Cov Teev Sij Hawm Hauv Hluav Taws Xob: 28 Kauj Ruam (nrog Duab)
VizTimer: Lub Sij Hawm Hluav Taws Xob: Thaum peb tus tub muaj hnub nyoog peb lossis plaub xyoos peb pib cia siab tias nws yuav ua qee yam raws sijhawm. Kuv yuav hais tej yam zoo li "Peb yuav tsum mus hauv kaum feeb!" lossis " Ua si nrog lub tsheb thauj khoom rau tsib feeb ntxiv, thiab tom qab ntawd muab rau lwm tus neeg
Ua Koj Lub Khoos Phis Tawj UPS Kawg Rau Teev Sij Hawm Siv Sij Hawm: 8 Kauj Ruam
Ua Koj Lub Khoos Phis Tawj UPS Kawg Rau Teev Sij Hawm Siv Sij Hawm: Rau yam uas yuav tshwm sim rau kuv, tab sis tej zaum tsis yog rau txhua tus, Kuv muaj tag nrho kuv lub khoos phis tawj ntawm UPS roj teeb thaub qab. Tom qab tau txais kev ntxhov siab thaum lub hwj chim flickered ib hnub, Kuv tam sim ntawd tawm mus thiab yuav ib lub UPS. Zoo, tsis ntev tom qab, lub zog