I-Streamlink, isixhobo se-CLI sokujonga imijelo yevidiyo ekwi-intanethi

malunga ne-streamlink

Kwinqaku elilandelayo siza kujonga kwi-Streamlink. Yi le umgca wokuyalela oya kusivumela ukuba sihambise ukuhanjiswa kwevidiyo kwiinkonzo ezahlukeneyo ziye kumdlali wevidiyo, Esiza kuthi ngaphambili sibeke kwikhompyuter yethu. Eyona njongo iphambili yesi sicelo kukuphepha iiwebhusayithi ezingalungiselelwanga, ngelixa uvumela umsebenzisi ukuba onwabele umxholo ohanjiswayo.

I-Stlinklink yi Inkqubo yomthombo ovulekileyo ebhalwe ngolwimi lwePython. Le nkqubo yenziwa ifolokhwe kwi-LiveStreamer, engasagciniwe. Sisoftware ehambelana neGNU / Linux, Windows kunye neMac OS X. Umntu asebenza naye sele ethethile ngale nkqubo kwi le bhlog okwethutyana elidlulileyo, kodwa ngoku siza kubona iindlela ezininzi zokufaka le nkqubo ku-Ubuntu.

I-Streamlink sisixhobo sokuhambisa umgca somyalelo esiya kuthi sisivumele Bukela imijelo yevidiyo ekwi-intanethi kubadlali beendaba abadumileyo abaziwayo njengeVLC, MPlayer, MPlayer2, MPC-HC, mpv, iDaum Pot Player, i-QuickTime kunye ne-OMXPlayer, njl..

Kule mihla le software ixhasa iinkonzo zokusasaza ividiyo njenge-YouTube, Dailymotion, Livestream, Twitch, UStream nokunye. Njengoko esi sicelo sisekwe kwinkqubo yezongezo ezikuvumela ukongeza ngokulula iinkonzo ezintsha. Ungajonga uluhlu lwezinto ezikhoyo ezikhoyo unxibelelwano.

Kubalulekile ukubeka ingqalelo I-Streamlink ayizukudlala imijelo yevidiyo ukuba akukho zixhobo zeendaba ziyafumaneka kwinkqubo. Ke ngoko, kufuneka uqiniseke ukuba ufake umdlali kwinkqubo yethu ngaphambi kokusebenzisa le nkqubo.

Faka iSlinklink kwi-Ubuntu

Ukuhamba ngePIP

Okoko iScrlink ibhaliwe kusetyenziswa iPython, inokufakwa kusetyenziswa umphathi wephakheji PIP. Ukuba ikhompyuter yakho ayinaso esi sixhobo, ungayifaka usebenzisa i-terminal (Ctrl + Alt + T):

sudo apt install python3-pip

Xa sele unayo iPip efakwe kwikhompyuter yakho, unga sebenzisa lo myalelo ulandelayo ukuze ufake iSlinklink:

I-instalar streamlink kunye nepip3

sudo pip3 install streamlink

Njenge AppImage

Unokuyonwabela le sicelo usebenzisa ifayile yayo ye-AppImage ehambelanayo. Oku kunokukhutshelwa kwi iphepha lokukhupha usebenzisa isikhangeli sewebhu okanye ngokuvula i-terminal (Ctrl + Alt + T) kunye nokusebenzisa wget ngoku Landelayo:

Khuphela usetyenziso lwe-streamlink

 

wget https://github.com/streamlink/streamlink-appimage/releases/download/2.4.0-1/streamlink-2.4.0-1-cp39-cp39-manylinux2014_x86_64.AppImage -O streamlink.AppImage

Xa sikhuphele ifayile yeAppImage, sinayo kuphela yenze isebenze ngomyalelo:

chmod +x streamlink.AppImage

Okwangoku, sinako yazisa inkqubo ngokunqakraza kabini kwifayile, okanye ngokuchwetheza kwisiphelo sendlela (Ctrl + Alt + T) umyalelo:

./streamlink.AppImage

Ukujonga ngokukhawuleza kwenkqubo

Njengoko kuphawulwe imigca engentla, esi sisicelo somgca wokuyalela. Ukusetyenziswa kwesiqhelo seStrlink iya kuba yinto efana nale ilandelayo:

isync syntax

streamlink [OPCIONES] <URL> [CALIDAD]

I-URL ibonisa i-URL yokusasaza ividiyo kwi-Intanethi. Ingaba nayiphi na ikhonkco yevidiyo kwiindawo ezixhaswayo. UMGANGATHO ubonakalisa umgangatho wevidiyo. Ingasetyenziswa 'eyona'okanye'kunazoukufumana owona mgangatho uphakamileyo okanye usezantsi ofumanekayo. Ukongeza siya kuba nethuba lokuchaza uluhlu lwezisombululo ezahlulwe ngeekoma, ezingayinto efana nale ilandelayo:

"720p,480p,best"

Ukuba akukho kulandelelana kuchaziweyo kwaye akusetyenziswanga -Ungagqibekanga-ngumjelo, inkqubo iya kuprinta uluhlu lwamabakala akhoyo.

Dlala ividiyo

I-Streamlink siza kudlala imijelo yevidiyo kwisidlali sevidiyo esingagqibekanga.

kudlala nevlc

./streamlink.AppImage https://www.youtube.com/watch?v=-tAEAyHgCec best

Nje ukuba usebenze lo myalelo, I-Streamlink ikhupha umjelo wevidiyo okwi-intanethi ukusuka kwi-url echaziweyo kwaye uyihambisa kumdlali wevidiyo osilelayo (kwimeko yam iVLC), okanye apho sibonisa khona ngomgangatho ofumanekayo.

Uluhlu lwemisinga ekhoyo

Ukubona uluhlu lwevidiyo ekhoyo, konke okufuneka ukwenze kuku ungakhankanyi ixabiso LOKUGQIBELA (okubi kakhulu okanye okugqwesileyo).

izigqibo ezikhoyo zevidiyo

Dlala iaudiyo kuphela

Ukuba unomdla wokumamela kuphela iaudiyo, Ekupheleni komyalelo kuya kufuneka wongeze "iaudio_mp4a"Okanye"Iaudio_webm" ngaphandle kwe "eyona":

ukudlala iaudiyo kuphela

streamlink https://www.youtube.com/watch?v=-tAEAyHgCec audio_mp4a

Khetha umdlali oza kumsebenzisa

Ukuba ufuna ukudlala imijelo yevidiyo ngesidlali esahlukileyo kunaleyo ingagqibekanga, Kuyimfuneko kuphela ukuyichaza ngokhetho –Umdlali ilandelwe ligama lomdlali:

edlala mplayer

streamlink https://www.youtube.com/watch?v=-tAEAyHgCec 480p --player mplayer

Lo myalelo uza kudlala umjelo wevidiyo onikiweyo kumgangatho we480p usebenzisa iMplayer ukuyidlala kwakhona.

Bona ezinye iinkonzo

Le nkqubo inokusetyenziswa kunye nezinye iinkonzo zokusasaza kwi-Intanethi kwiiplagi. Uluhlu olupheleleyo lweefowuni ezibandakanyiweyo ngoku lunokufumaneka kwifayile ye- iwebhusayithi yeprojekthi.

Ukongeza sinako Uluhlu lweeplagi usebenzisa umyalelo:

iiplagi ezikhoyo

streamlink --plugins

Uncedo

Abasebenzisi abafuna banako Fumana ulwazi oluthe kratya malunga nokusebenzisa le nkqubo unokujonga kumaphepha endoda:

indoda yokusasaza

man streamlink

Okanye ngokuchwetheza kwisiphelo sendlela:

streamlink --help

Ukongeza, abasebenzisi banako yazi ngakumbi ngendlela osebenza ngayo nale nkqubo, usebenzisa i tutorial enikezelwa kwiwebhusayithi yeprojekthi okanye kwifayile yakho ye- Indawo yokugcina izinto zeGitHub.


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Yiba ngowokuqala ukuphawula

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.