Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ซอฟต์แวร์ >> ซอฟต์แวร์

GLC: ตัวเลือก Linux สำหรับ FRAPS ในการจับวิดีโอเดสก์ท็อป

สำหรับผู้ที่สงสัย FRAPS คือโปรแกรม Windows ที่ใช้ record video streams ของ applications ที่รันบนเดสก์ท็อป บ่อยครั้งคือเกม ตัวอย่าง ผมเคยใช้ FRAPS grab cool videos เล็กน้อยขณะเล่น Live for Speed การสามารถ record desktop activities มีหลายมิติ — educational, tutorial และบางครั้ง sheer bravado มี circumstances ที่ nothing short of video demonstration จะ work

No problem คุณมี tools หลายตัวทำได้ — Wink, recordMyDesktop ตัวอย่าง ทั้งคู่ผมレビューไว้ที่นี่ อีกโปรแกรมคือ Istanbul ซึ่งผมแสดงใน PCLinuxOS 2009 article อย่างไรก็ตาม ในขณะที่โปรแกรมเหล่านี้ quite adequate สำหรับ pure desktop use พวกมันไม่ทำงานดีกับเกม พวกมันใช้ X Windows ในขณะที่เกมส่วนใหญ่ใช้ hardware acceleration ของ graphic card ทำ magic การ render จริงๆ เกิดขึ้นก่อน pixels hit screen เราต้องการ something else เพื่อ grab video ในเกมและ OpenGL programs อื่นๆ

Well, enter glc, a Linux FRAPS-like software capable of capturing, playing และ encoding video และ audio มันทำสิ่งที่เราต้องการ มา demonstrate ให้ดู เราจะใช้ few sexy games สำหรับนั้น ไม่มีอะไรเทียบได้กับ hardcore shooting action และ fast-paced driving ที่ instill concept นี้ Oh, ผมจะ refer Wine และ Windows applications ด้วย ดังนั้นหากคุณสงสัยว่า glc จะ work กับ World of Warcraft หรือ Wine-ed game อื่นๆ คำตอบคือ yes ตามมามาก่อน Plenty of screenshots รออยู่เพียง few scrolls ด้านล่าง!

GLC: ตัวเลือก Linux สำหรับ FRAPS ในการจับวิดีโอเดสก์ท็อป

Get glc

คุณสามารถ install glc จาก official distro repositories หรือ download build script จาก official website และ build เอง ผมเจอ difficulties ใช้ latter method ดังนั้นแนะนำใช้ version ใน repositories ดู Problem section ด้านล่างสำหรับรายละเอียด

Using glc

เมื่อโปรแกรมติดตั้งแล้ว คุณจะมี two utilities — glc-capture และ glc-play ทั้งคู่เป็น command utilities พร้อม handful of flags คุณจะต้องใช้ 몇 moments เรียนรู้การใช้ glc แตไม่ยากนัก

Most basic usage คือ:

glc-capture <executable>

จากนั้น ในเกม คุณสามารถ start/stop recording ด้วย hotkey Default คือ Shift + F8 คุณยัง config หลาย parameters ได้ เช่น start recording immediately (-s), เปลี่ยน output filename และ path (-o), cap frames per second, เปลี่ยน compression หรือแม้แต่ disable audio

ตัวอย่าง:

glc-capture -s --disable-audio <executable>

นี่จะ record แค่วิดีโอ ทันทีที่ application launches แตพอพูด มาดู fine examples

ผมทดสอบกับ Enemy Territory Quake Wars beautiful, lovely first person shooter Power game และ start recording Lo and behold slowdown ในเกม almost negligible ทุกอย่างรัน quite smoothly Roughly 30-second recording ผลิต 250MB stream ที่ผม encode ได้แค่ 14MB .avi file แตคุณรู้ไหมว่าคุณทำดี? glc-play

Playback

ใช้ glc-play ดู in-program หรือ in-game recording

glc-play <recorded file - bears .glc suffix>

glc-play จะ stream ไฟล์ใน media-player-like frame ของตัวเอง คุณสามารถใช้ glc-play และ additional software สร้าง movies ให้ทุกคนดูและ appreciate เราจะทำ shortly ก่อนหน้านั้น cool screenshot:

อย่า confused by Lucid window theme demonstration นี้ทำบน 32-bit Karmic รันจาก external 2.5" 5400rpm USB disk connected กับ RD510 laptop ซึ่งปกติ boot two instances of Ubuntu 10.04 Lucid Lynx, one instance of Jaunty และ one of openSUSE 11.2 Gnome On my way to a 10-boot system btw Graphics card คือ 512MB RAM Nvidia 9600GS

P.S. หากคุณ wonder เรื่อง new themes และวิธีใช้บน older Ubuntu versions โปรดดู blog นี้ และหาก care เรื่อง ramblings เรื่อง new themes อาจจะอยากอ่าน Color of stability article ของผม

Encoding

ตอนนี้มาส่วน really fun part ทำ cool videos จากงานของคุณ! Going into complete detail about encoding beyond scope of this article อย่างไรก็ตาม ผมจะแสดง few quick tips ที่ควรช่วยคุณ get started with encoding

glc ทำงานกับ mencoder และ lame utilities ดังนั้นคุณควร download และ install those first ทั้งคู่เป็น popular tools available ใน repositories ของ most distributions หลังขั้นตอนนี้เสร็จ คุณสามารถ encode Basically stream file ด้วย glc-play และ pipe ไป mencoder สำหรับ packaging ดู cryptic เล็กน้อย แตไม่ terrible

First มี encoding script (direct link, shell script) available บน official site ซึ่งจะสร้าง MP4 videos จาก streams ของคุณ Script มี few hard-coded options ดังนั้น no guarantee จะ work สำหรับคุณ

Second มี wiki page บน official site ซึ่ง offers examples on various options เมื่อผมเริ่มใช้ glc นี่คือ one reference ที่ผมใช้ successfully

There's no golden rule แตนี่คือ example มีสองส่วน:

glc-play [stream file] -a 1 -o audio.wav

glc-play plays first available audio stream into a WAV file

glc-play <stream file> -y 1 -o - | mencoder -demuxer y4m - -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=3000 -audiofile audio.wav -oac mp3lame -o video.avi

ต่อไป glc-play plays first available video stream และ pipes ไป mencoder ตัวหลังใช้ y4m demuxer interpret stream และ package เป็น MPEG-4 video ใน .avi format ใช้ libavcodec (lavc) bitrate ค่อนข้าง low แค่ 3Mb/sec earlier created audio file ก็ inserted เข้า output video encoded ด้วย mp3lame

ตอนนี้ ผม no multimedia expert แตเชื่อว่านี้ pretty much explains ใน simple terms หากคุณไม่มี audio track และไม่願意ใช้ คุณสามารถ remove audio part จาก command ได้

นี่คือ example ของ mencoder hard at work:

Once your video is ready power up a media player และ enjoy:

Nice, isn't it?

Works with Wine too!

Oh yes คุณยังสามารถใช้ record Wine-powered games ได้ ในกรณีของผม best example คือ phenomenal driving simulator Live for Speed เพื่อ record game action แค่ execute glc-capture against wine command:

glc-capture <options> wine <path to LFS.exe>

คุณอาจอยากใช้ -s หรือ additional flags ตามที่เห็น necessary

Some screenshots, glc-play in action:

VLC และ Totem playback:

ผม always amazed anew by staggering realism ในเกมนี้ สังเกต tire flexing ระหว่าง wild side drifts ใน Peugeot 106 Absolutely fantastic

GLC: ตัวเลือก Linux สำหรับ FRAPS ในการจับวิดีโอเดสก์ท็อป

Encoding:

FPS rate และ smoothness ของ videos เมื่อ record Wine applications น้อยกว่า native programs/games น่าจะ due to extra translation layer ยังคง quite manageable

Problems & observations

มี few issues กับ glc โปรด bear these in mind เมื่อ considering และ using application

Sound

ใน few cases ผม unable to play streams recorded with audio glc-play function จะ complain about ALSA this or that ผมไม่ได้ debug this at any great length แตคุณควร remember this และหากเจอ issues ให้ run glc-capture ด้วย --disable-audio option

64-bit compatibility & build script

glc would not work well on a 64-bit system ทำงาน great on 32-bit ทำ all functions expected ผม follow instructions บน official website รวมถึง creating manual symbolic links และ using build script แตไม่ work จริงๆ script exited เมื่อมัน realized มัน working on a 64-bit OS ต่อมา ผม install software ผ่าน repository และนี้ went well แตไม่ช่วย tool functionalityRecording feature was flaky Hopefully 这将 be sorted out

The big issue คือ คุณ cannot fully utilize power of 64-bit processors และ extra RAM ด้วย video และ audio editing simply made for 64-bit machines PAE kernel on 32-bit systems can help a little with RAM limitations แตคุณอาจไม่ชอบ โดยเฉพาะเพราะ most modern machines use 64-bit architecture 去了 quite some time now

บน 32-bit system glc installed ใช้ build script ไม่หา libraries ได้ ยกเว้น installed in root directory 任何 attempt to place it under /home, /usr/local or /opt resulted in a failure

Performance

ผม mention นี้ก่อนหน้า แตคุณควรมี powerful machine และ fast hard disk เพื่อ utilize glc properly ส่วนใหญ่ laptops จะไม่ handle high-FPS, high-resolution games well คุณจะ hit disk I/O bottleneck

Recording แม้ simple games เพียง few seconds แปลเป็น hundreds of MB of data บนดิสก์ จงระวัง คุณสามารถ run out of space ได้ง่าย บวก game playback อาจ stutter A second disk หรือ external disk sounds like a good idea here

Not a problem per se more of an advisory

Usability

Tool very much geeky พร้อม long และ somewhat confusing functions ที่ require familiarity กับ video/audio editing รวมถึง mencoder และ lame นี่ทำให้ glc somewhat inaccessible to less knowledgeable users A GUI wrapper would be a good idea รวมถึง all the grisly options สำหรับ encoding และ formatting และ whatnot nicely hidden under big shiny buttons

Again this is more of a nice-to-have wish-list

Closing word ...

ก่อนปิดบทความ บันทึกนิดหน่อย:

จำได้ไหมผม kind of complained ใน Nexuiz review ว่าเรายัง figure out ไม่ได้ วิธี capture video ขณะเล่น? Well, here we go There's your answer

Finally เหมือน Winetricks tutorial นี้ mighty important สำหรับ Linux gamers ดังนั้นผมจะมีมัน linked ใน Gaming section ด้วย

อ่านเพิ่มเติม

คุณอาจอยากดู articles นี้ด้วย:

WINK software

recordMyDesktop software

สรุป

นี่คือมัน A fantastic tool สำหรับสร้าง in-game videos และ demonstration อนุญาตให้คุณ brag about your pwning skills ใน first person shooters หรือ show what a skilled driver you are หรือไม่ สิ่งสำคัญคือ การเป็น Linux user ไม่หมายความว่าคุณ less photogenic กว่า Windows peers ของคุณ

glc เป็น very nice tool มันค่อนข้าง difficult to use มากกว่า geared toward experienced users และมี unresolved problems บ้าง เช่น sound issues และ 64-bit support แตมัน works well และ renders lovely output แค่ให้แน่ใจว่าคุณมี fast disks และ plenty of RAM ไปด้วย ไปแล้ว หวังว่าคุณ enjoy this See you around!

ขอแสดงความนับถือ