原創(chuàng)|使用教程|編輯:郝浩|2013-08-26 10:19:56.000|閱讀 539 次
概述:TVideoGrabber是一款支持包括C#、.NET、VB.NET、C++、Delphi、C++Builder和ActiveX平臺在內的視頻處理控件,不僅可以捕捉視頻,還可以作為多媒體播放器。本文將詳細說明TVideoGrabber如何重新編碼音頻、視頻剪輯。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
TVideoGrabber可以讓你對音頻、視頻剪輯進行重新編碼剪輯,如下:
1、通過指定開始和停止的時間,可以簡單的剪輯視頻
2、可以重新編碼剪輯
——通過指定開始和停止時間
——使用當前音頻或是視頻編碼器
——通過應用任何幀采集功能(文本覆蓋、圖形疊加、視頻旋轉······)
Reencoding 屬性
關于開始/停止幀和倍數
——default -1值指定了“剪輯開始的起始”或是“要到剪輯結束的時候停止”
——倍數用100ns單位指定,比如3秒= 30000000
——如果指定一個Reencoding_StartTime以及Reencoding_StartFrame,Reencoding_StartTime就會被忽略。
——如果指定Reencoding_StopTime 和 a Reencoding_StopFrame,這個Reencoding_StopTime就會被忽略。
開始重新編碼:
開始重新編碼的視頻剪輯:
——設置“Reencoding_...”屬性
——調用Startreencoding
備注:
當調用Startreencoding時,進程開始重新編碼,并會立即返回,不會等到重新編碼進程完成。
如果你正在用編程的方式創(chuàng)建組件,在破壞組件之前,一定要等待OnReencodingCompleted,否則重新編碼進程將會在完成前被打斷。
比如:
VideoGrabber1.Reencoding_SourceVideoClip = "MyVideoClipToReencode.avi" VideoGrabber1.Reencoding_NewVideoClip = "MyReencodedVideoClip.wmv" VideoGrabber1.Reencoding_WMVOutput = true // output clip is wmv VideoGrabber1.Reencoding_Method = rm_ASF VideoGrabber1.Reencoding_StartFrame = -1 // -1 = beginning of the clip. E.g. if you set 100 it starts at the frame #100 VideoGrabber1.Reencoding_StopFrame = -1 // -1 = beginning of the clip. E.g. if you set 500 it will stop when the frame #500 is reached VideoGrabber1.Reencoding_StartTime = -1 // -1 = end of the clip. E.g. if you set 50000000 it will start at 5 seconds VideoGrabber1.Reencoding_StopTime = -1 // -1 = end of the clip. E.g. if you set 100000000 it will stop at 10 seconds VideoGrabber1.Reencoding_IncludeAudioStream = true // if audio stream needed in the reencoded clip VideoGrabber1.Reencoding_IncludeVideoStream = true // if video stream needed in the reencoded clip VideoGrabber1.Reencoding_UseAudioCompressor = false VideoGrabber1.Reencoding_UseVideoCompressor = false VideoGrabber1.Reencoding_UseFrameGrabber = true VideoGrabber1.StartReencoding // from now the progress will be returned periodically by the OnReencodingProgress event.end;
簡單的調用StopReencoding即可在重新編碼進程之前結束進程。
>>>TVideoGrabber 下載
本站文章除注明轉載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件