原創(chuàng)|使用教程|編輯:郝浩|2013-08-26 10:19:56.000|閱讀 557 次
概述:TVideoGrabber是一款支持包括C#、.NET、VB.NET、C++、Delphi、C++Builder和ActiveX平臺(tái)在內(nèi)的視頻處理控件,不僅可以捕捉視頻,還可以作為多媒體播放器。本文將詳細(xì)說明TVideoGrabber如何重新編碼音頻、視頻剪輯。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
TVideoGrabber可以讓你對(duì)音頻、視頻剪輯進(jìn)行重新編碼剪輯,如下:
1、通過指定開始和停止的時(shí)間,可以簡(jiǎn)單的剪輯視頻
2、可以重新編碼剪輯
——通過指定開始和停止時(shí)間
——使用當(dāng)前音頻或是視頻編碼器
——通過應(yīng)用任何幀采集功能(文本覆蓋、圖形疊加、視頻旋轉(zhuǎn)······)
Reencoding 屬性
關(guān)于開始/停止幀和倍數(shù)
——default -1值指定了“剪輯開始的起始”或是“要到剪輯結(jié)束的時(shí)候停止”
——倍數(shù)用100ns單位指定,比如3秒= 30000000
——如果指定一個(gè)Reencoding_StartTime以及Reencoding_StartFrame,Reencoding_StartTime就會(huì)被忽略。
——如果指定Reencoding_StopTime 和 a Reencoding_StopFrame,這個(gè)Reencoding_StopTime就會(huì)被忽略。
開始重新編碼:
開始重新編碼的視頻剪輯:
——設(shè)置“Reencoding_...”屬性
——調(diào)用Startreencoding
備注:
當(dāng)調(diào)用Startreencoding時(shí),進(jìn)程開始重新編碼,并會(huì)立即返回,不會(huì)等到重新編碼進(jìn)程完成。
如果你正在用編程的方式創(chuàng)建組件,在破壞組件之前,一定要等待OnReencodingCompleted,否則重新編碼進(jìn)程將會(huì)在完成前被打斷。
比如:
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;
簡(jiǎn)單的調(diào)用StopReencoding即可在重新編碼進(jìn)程之前結(jié)束進(jìn)程。
>>>TVideoGrabber 下載
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@ke049m.cn
文章轉(zhuǎn)載自:慧都控件