原創|使用教程|編輯:郝浩|2013-08-29 11:28:34.000|閱讀 837 次
概述:TVideoGrabber可以對屏幕進行錄制和壓縮,本文來詳細的說明在多種情況下TVideoGrabber是如何實現屏幕的錄制和壓縮。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
TVideoGrabber可以對屏幕進行錄制和壓縮,本文來詳細的說明在多種情況下TVideoGrabber是如何實現屏幕的錄制和壓縮。
屏幕錄制
當VideoSource = vs_ScreenRecording時,就可以啟用屏幕錄制,然后就可以應用視頻捕捉設備的所有的預覽和錄制功能:
——調用StartPreview,開始預覽
——調用CaptureFrameTo進行捕捉
——動態壓縮或是在捕捉之后
——當啟用了幀捕捉之后,就機進行視頻處理、圖像和文本疊加
通過用ScreenRecordingWithCursor可以啟用或是禁用光標。
通過ScreenRecordingLayeredWindows屬性可以啟用分層捕捉窗口(比如浮動或是透明冊窗口)。
如果屏幕的某些區域不可以正確記錄的話,可以嘗試啟用或是禁用。
ScreenRecordingThroughClipboard屬性。
使用Windows媒體屏幕編解碼器對WMV屏幕記錄壓縮
當用WMV進行記錄時,使用Windows媒體屏幕編解碼器將會自動的進行下面的設置:
VideoGrabber.VideoSource = vs_ScreenRecording VideoGrabber.RecordingMethod = rm_ASF VideoGrabber.ASFProfileVersion = apv_ProfileVersion_9 VideoGrabber.ASFVideoQuality = 95 VideoGrabber.StartRecording()
或者是:
VideoGrabber.VideoSource = vs_ScreenRecording VideoGrabber.RecordingMethod = rm_ASF VideoGrabber.ASFProfileVersion = apv_ProfileVersion_9 VideoGrabber.ASFVideoBitRate = 2000000 VideoGrabber.StartRecording()
注意:ASFVideoBitRate 和ASFVideoQuality 是獨占的,而 ASFVideoQuality 是強制性的。
如多你正在使用一個.prx文件,當使用WMProEdt.exe創建時,在編碼器列表中選擇屏幕編解碼器。
通過使用第三方編解碼器進行AVI 屏幕錄制壓縮
例如使用Innoheim ISCC編解碼器:
VideoGrabber.VideoSource = vs_ScreenRecording VideoGrabber.RecordingMethod = rm_AVI VideoGrabber.VideoCompressor = VideoGrabber.VideoCompressorIndex ("inno Screen Capture Codec") VideoGrabber.CompressionType = ct_Video if VideoGrabber.VideoCompressor > -1 then VideoGrabber.StartRecording() else MessageBox ("screen codec not installed") end
當可用的顯示器超過1個時,可以指定監視器來錄制:
如果超過一臺顯示器是可用的,通過ScreenRecordingMonitor屬性來指定用于錄制的監視。
器。
——設置ScreenRecordingMonitor = 0(默認值),來錄制默認的監視器
——設置ScreenRecordingMonitor = 1,來錄制第二個監視器,并依此類推
錄制可擴展的桌面
只是需要簡單的設置ScreenRecordingMonitor = -1,就會跨所有的顯示器錄制整個的可擴展的桌面。
備注:
預覽或錄制視頻顯示的幀率是通過FrameRate屬性指定的。
——當錄制全屏的時候,建議使用一個低幀率來防止幀丟失。
——當啟用了ScreenRecordingThroughClipboard時,在預覽和錄制期間剪貼板會不間斷的進行刷新。
>>>TVideoGrabber 下載
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件