2

scene1.aviファイル名などで保存されたビデオを少しずつ作成していますscene2.avi

ビデオを 1 つのブロックに構築し、オーディオ トラックにダビングする簡単な方法が必要です。この目的のために、VirtualDub を使用しています。

さて、VirtualDub を開き、[ファイル] => [開く] に移動し、最初のシーンをロードし、[ファイル] => [ビデオ セグメントを追加] に移動し、2 番目のシーンを選択し、[ファイル名による追加セグメントの自動検出] オプションをオンにして、ビデオをダイレクト ストリーム コピーに変換し、オーディオを「他のファイルから」に設定し、サウンドトラックを選択してから、全体を次のように保存しout.aviます。

私が欲しいのは、これらすべてのファイルを一緒に構築するための VCF スクリプトです。残念ながら、コーディング言語は最低です。

このスクリプト言語を作成したとき、何を考えていたのかわかりません。それは非常に大まかにCに基づいていますが、もっとひどいです。バブルガム クライシスを作成する前に見ていたに違いありません。
すべてのステートメントは宣言または式のいずれかであり、すべてのステートメントはセミコロンで終了する必要があります。フロー制御はありません。関数も手続きも if も while も for も switch も goto もありません。

いいえif、いいえwhile、いいえfor...だから私while file exists("scene"+i+".avi") {VirtualDub.Append("scene"+i+".avi"); i++;}は完全に問題外だと思います。

私は Batch スクリプトを使用して VCF ファイルの存在を確認し、スクリプトを実行するための正しいコマンド ラインで VirtualDub を実行しています。ファイル?VCF ファイル内のセグメントを自動検出する方法はありますか? または、バッチ スクリプトを使用して VCF をカスタム ビルドする必要がありますか?

4

2 に答える 2

1

コーディングを開始するための関連/類似の何かを書きました。これはバッチ ファイルなので、次を something.bat にコピーします。

Set Mfps=23.976
Set Bpath="E:\- Video Extractions\Virtualdub\1920x1280 (23.976fps pure,93%%,MPEG2,deinterlaced)auto openNsave.vcf"
rem Set Bpath="E:\- Video Extractions\Virtualdub\852x480 DAR3 (16x9) (24fps,96%%,MPEG2,deinterlaced).vcf"
Set Vdpath="E:\- Video Extractions\Virtualdub\VirtualDub-1.8.8\"
Set Svpath="D:\"
for %%A in (*.mkv *.avi *.mpg *.mpeg *.m2ts *.vob) do >%%~nA.avs echo # M2ts file & >>%%~nA.avs echo SetMemoryMax(128) & >>%%~nA.avs echo DirectShowSource("%%~dA%%~pA%%~nA%%~xA", fps=%Mfps%, audio=true, seekzero = true, convertfps=true) & >>%%~nA.avs echo EnsureVBRMP3Sync() & start /d %Vdpath% VirtualDub.exe /i %Bpath% "%%~dA%%~pA%%~nA.avs" "%Svpath%%%~nA.avi"
rem ---Notes---
rem code requires: Avisynth, virtualdub, pre-existing (.vcf) config file
rem most people prefer to use virtualdub with jobs in queue; run them in sequence. This runs jobs in parallel by searching the directory of the script, finding all listed wildcard masked files below, generating a simple avisynth script file for each file, then opening virtualdub and autosaving the video to .avi
rem caution, this will stress your system. you may only be able to handle 1 file at a time. I can input 30 blueray .m2ts files just fine, so long as i set vdub process to idle or low. Modify the code to your hearts content  ~  TigerWild
rem create a unique .vcf that you will use with this batch file only. Do this by running Virtualdub, opening a video file, configuring all your settings as you want them, then selecting File->save processing settings->.vcf
rem use a text editor to open the vcf file you made, and add these 2 lines:      VirtualDub.Open(VirtualDub.params[0]); VirtualDub.SaveAVI(VirtualDub.params[1]);
rem ---References---
rem http://stackoverflow.com/questions/8749637/dos-command-to-sperate-file-name-and-extension-into-variables
rem http://forum.doom9.org/archive/index.php/t-152842.html     with a nod to stax76
于 2013-05-16T00:26:47.300 に答える