Rekhoda idesktop yakho kwisiphelo sendlela kunye neFFmpeg

Rekhoda isikrini kunye nesiphelo kunye neFFmpegKwiiyure ezimbalwa ezidlulileyo sipapashe Inqaku apho sichaze khona ukuba ungayiguqula njani ifayile yeaudiyo kwenye ifomathi (kunye nesandi) ngeFFmpeg. Kwelo nqaku sichaze nokuba isakhelo ekuthethwa ngaso sisixhobo esinamandla esinokwenza ngaso imisebenzi emininzi enxulumene nevidiyo kunye nevidiyo, kwaye ngelinye ixesha siya kukufundisa Ungayibhala njani ikhusi lePC yethu ngeFFmpeg ukusuka kwisiphelo sendlela. Lo mzuzu ufikile kwaye inqaku liya kuba yile.

Rekhoda isikrini kunye nale sikhokelo izakuba nzima ngakumbi kunokuguqula iaudiyo. Ubunzima bufumaneka ngexesha lokubhalwa komyalelo, kuba into ekufuneka siyikhumbule ingaphezulu kokubeka umyalelo, "-i" kunye neefayile ezimbini, igalelo kunye nemveliso. Ukongeza, indlela yokwenza yenziwe yahlaziywa kuba baguqule umyalelo / isixhobo esiza kurekhoda ngaso isikrini. Ngaphandle kokuqhubela phambili, ngoku siza kuchaza amanyathelo anokulandelwa, ekungekho amanye ngaphandle kwalawo afunyenwe kwifayile ye- iphepha elisemthethweni yeprojekthi.

I-FFmpeg isivumela ukuba sibhale phantsi iscreen sedesktop kunye nangaphandle kwesandi

Njengezinye iinkqubo ezinje nge-VLC okanye i-SimpleScreenRecorder, i-FFmpeg isivumela ukuba sibhale phantsi iscreen sedesktop kunye nangaphandle komsindo. Ukongeza, iya kuthi isivumele ukurekhoda kuphela isahlulo sedesktop yethu, into eya kuba lula ukusebenzisa usetyenziso olunonxibelelwano lomsebenzisi olunokusivumela ukuba sikhethe ummandla oza kurekhoda ngesikhombisi. Ngayiphi na imeko, imiyalelo okanye amanyathelo ekufuneka elandelwe ukurekhoda isikrini sedesktop yethu iya kuba koku kulandelayo:

  1. Njengokuba siguqula iifayile, siyaqinisekisa ukuba sinesoftware eyimfuneko efakiweyo. Ukwenza oku, chwetheza "ffmpeg" (ngaphandle kwezicatshulwa) kwisiphelo sendlela. Siza kubona into efana nale ilandelayo:ffmpeg kwisiphelo sendlela
  2. Ukuba kukho into enje apha ngasentla ibonakala, siya kwinyathelo lesi-3. Ukuba akunjalo, sibhala oku kulandelayo kwisiphelo sendlela:
sudo apt install ffmpeg
  1. Xa isoftware ifakiwe, kuya kubakho amanyathelo amabini kuphela aseleyo: qala ukurekhoda kwaye uyeke. Ukuyiqala, siza kubhala lo myalelo ulandelayo.
ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 salida.mp4
  • Ukusuka ngasentla kufuneka kuthathelwe ingqalelo:
    • 1920 × 1080 ubungakanani bokurekhodwa.
    • umgangatho wefreyimu linani lezakhelo ngomzuzu.
    • 0.0 ngummandla oza kuwurekhoda. Unokunika ukuqala kwe-X kunye ne-Y ukurekhoda inxenye yesikrini emva kwesimboli sokudibanisa, esinokubonakala ngathi 0.0 + 100,200 ngefestile eqala kwinqanaba X = 100 kunye nenqaku Y = 200.
    • iziphumo.mp4 yifayile yemveliso. Ukuba siyibeka ngokomyalelo odlulileyo, ifayile iya kugcinwa kwifolda yethu enegama "imveliso.mp4".
  1. Okokugqibela, ukuyeka ukurekhoda sicinezela Ctrl + C

Rekhoda isikrini ngesandi

Ukuba into esiyifunayo kukurekhoda kwakhona iaudiyo, imiyalelo inokujongeka ngoluhlobo:

  • Ukukhupha iAudio:
ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f pulse -ac 2 -i default salida.mkv
  • Kwi-ALSA:
ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f alsa -ac 2 -i hw:0 salida.mkv

Ukuphucula umgangatho wezandi, kungcono ukuvala zonke iinkqubo ezingeyomfuneko. Kuzo zombini iimeko, for Yeka ukurekhoda ctrl + C. Xa sisenza oku, ividiyo izakusilinda kwifolda yethu enegama esililungiselele lona, ​​kwezi meko "output.mp4" okanye "output.mkv".

Kukho oko thatha ingqalelo ubungakanani bevidiyo. Kwimiyalelo, ndibeke "1920 × 1080" kuba bubungakanani kunye nokusonjululwa kwescreen sam. Into elungileyo kukuba nganye nganye yongeza ubungakanani / isisombululo sayo apho. Kuya kufuneka sazi ukuba ayifanelekanga ukwenza iskripthi sokumisela iodolo, kuba inokungaphumeleli okanye, kwiimeko ezintle, singabenza nzima ubomi bethu ngalo mzuzu sifuna ukuyeka ukurekhoda. Ukuba uthatha isigqibo sokuvavanya ukuba isebenza kakuhle kuwe ngeskripthi, ungasoloko uzama ukumisa inkqubo ngomyalelo "wemisebenzi", njengoko kuchaziwe Oku kubhaliwe ngoJuni ophelileyo.

Ucinga ntoni ngale ndlela yokurekhoda isikrini kwisiphelo sendlela kunye neFFmpeg?


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

Izimvo ezi-7, shiya ezakho

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa.

*

*

  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.

  1.   Isoftware yesiCreole sitsho

    Ibhlog entsha ngeSoftware yasimahla evela eArgentina!

    Sityelele:

    http://softwarecriollo.blogspot.com

    KuFacebook: IsoftwareCriollo Argentina

    Kwi-twitter: @softwarecriollo

    Kufuneka silusasaze ulwazi ukuze sikhululeke!

    Nibuliso!

  2.   UGaspar Fernandez sitsho

    Kumnandi ukuba nalo mgca ngesandla. Ngenye imini bendisilwa ukwenza iscreencast ngefmpmpeg kwaye ndinengxaki yesandi, esingangqinelani kakuhle.

    Ndiyisombulule ngendlela ecekeceke ... ukurekhoda iaudiyo ngecord ngokwahlukeneyo emva koko ndazibandakanya nemijelo: S: S

  3.   umama 21 mama sitsho

    Sawubona,
    ewe abahlobo abaluncedo kakhulu.
    Ndikhuthazwe ngu-bash kwaye ndadibanisa iskripthi esinegama elithi "xrec" kwaye ndasifaka kwityala.

    Ukuba ufuna ukuzama, uyamenywa http://cut07.tk/e6

  4.   Yinyani sitsho

    Ndisebenzisa lo mthetho ulandelayo:
    $ ffmpeg -f oss -i / dev / dsp1 -f x11grab -s sxga -r 24 -i: 0.0 /home/seunome/Videos/teste.mpg

    Okanye "-f oss" leyo ithi ifuna ukurekhoda umsindo ngokunjalo,
    "-I / dev / dsp" isixelela isixhobo esinegalelo ukuba sisetyenziswe.
    Sebenzisa "-i / dev / dsp0" okanye "-i / dev / dsp1" (Okwam, isebenze ne-DSP1)
    I "-f x11grab" inika ingxelo yokuba ufuna ukurekhoda umfanekiso wevidiyo yeGrafix X11.
    Okanye "-s sxga" ilingana "-s 1280 × 1024" esisisombululo sesiboniso sam (LCD). Enye inketho yi-xga ehambelana ne-1024 × 768, Ukwazi ngakumbi funda amaxwebhu e-ffmpeg.
    Okanye "-r 24" iingxelo zokuba sifuna ukurekhoda izakhelo ezingama-24 (imifanekiso) ngomzuzwana, ubuncinci ubuncinci ukuba uzive njengomboniso bhanyabhanya.
    I "-i: 0.0" ibonisa ukuba sifuna ukufaka iziboniso em "0.0" zeX11.
    Okokugqibela qwalasela umkhombandlela kwaye uphelise igama lefayile eliza kwenziwa.
    Yiyo leyo, ungafunda amaxwebhu e-ffmpeg ukuphucula kunye nokufumana umgangatho ongcono.
    Enkosi lonke.

  5.   IiTarribali sitsho

    Enkosi. Kwisisombululo, umz. 1024X600, u-X kufuneka abhalwe ukuba makasebenze.

  6.   USantiago Yornet sitsho

    Ungathini, ndizamile yonke imiyalelo oyithethileyo kwaye bonke bayandirekhoda ividiyo ngaphandle kwesandi.Ndine Ubuntu 20.04.

    1.    Diego sitsho

      Ubuntu batshintshe abaqhubi besiseko njengoDebian nabanye, andazi ukuba bazokusebenzisa eyiphi ngoku kuba ndisaphila ngaphambili.
      Fumanisa ukuba zeziphi ezisetyenziswayo kwaye zithathe indawo yazo kwiAlsa okanye Pulse.