2016-05-12 14 views
0
私はマージのためのCMDに使用

ffmpegのそれはここでのサンプルコードは、成功したマージ

のffmpeg -i「D:私のビデオキャプチャ\ \開発\ビデオキャプチャ\ WindowsFormsApplication1 \ D:\ Developments \ Video \ bin \ Debug \ Video \ uuu.wav "-i" D:\ Developments \ Videoキャプチャ\ Myビデオキャプチャ\ WindowsFormsApplication1 \ bin \ Debug \ Video \ 1.avi "-acodecコピー-vcodecコピー"

「output.avi \マイビデオキャプチャ\ WindowsFormsApplication1 \ binに\デバッグ\ビデオ\をキャプチャしますが、ここで私はC#アプリケーションの形で使用するサンプルコードで、

string Path_FFMPEG = Application.StartupPath + "\\ffmpeg.exe"; 
     string Wavefile = Application.StartupPath + "\\Video\\uuu.wav"; 
     string video1 = Application.StartupPath + "\\Video\\1.avi"; 
     string file = Application.StartupPath + "\\Video\\text.txt"; 
     string strResult = Application.StartupPath + "\\Video\\output.avi"; 
     System.Diagnostics.Process proc = new System.Diagnostics.Process(); 
     try 
     { 

      proc.StartInfo.FileName = Path_FFMPEG; 
      proc.StartInfo.Arguments = string.Format("ffmpeg -i {0} -i {1} -acodec copy -vcodec copy {2}", Wavefile, video1, strResult); 
      proc.StartInfo.UseShellExecute = false; 
      proc.StartInfo.CreateNoWindow = false; 
      proc.StartInfo.RedirectStandardOutput = true; 
      proc.StartInfo.RedirectStandardError = true; 

      proc.Start(); 

      string StdOutVideo = proc.StandardOutput.ReadToEnd(); 
      string StdErrVideo = proc.StandardError.ReadToEnd(); 
     } 
     catch { } 
     finally 
     { 
      proc.WaitForExit(); 
      proc.Close(); 
     } 
0123ここ

はoutpuエラーです....

FFmpegのバージョンのSVN-r23607、著作権(C)のgcc 4.4.2 構成で、2010年6月15日午前4時09分35秒で構築された2000年から2010年のFFmpegの開発者 : - -target-os = mingw32 --enable-runtime-cpudetect --enable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads - liblib - enable-libx264 - extra-libs = ' - lx264 -lpthread' - enable libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger - --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-librtmp --extra-libs = ' - lrtmp -lpolarssl -lws2_32 -lwinmm' --arch = x86 --cross-prefix = i686-mingw32- --cc = 'ccache i686-mingw32-gcc' --enable-memalign-hack libavu 50.19まで。 0/50.19。 0 libavcodec 52.76。 0/52.76。 0 libavformat 52.68。 0/52.68。 0 libavdevice 52. 2. 0/52. 2. 0 libavfilter 1.20。 0/1.20。 0 libswscale 0.11。 0/0.11。 0 'ffmpegの'

に適した出力形式を見つけることができません。この問題を解決するために私を助けてください..

+0

'SVN-r23607'は古く、サポートされていません。なぜあなたはそのような古いバージョンを使用していますか? 6年間の開発、バグ修正、機能、およびセキュリティ修正がありません。 – LordNeckbeard

答えて

1

あなたはまだ

proc.StartInfo.Arguments = string.Format("-i {0} -i {1} -acodec copy -vcodec copy {2}", Wavefile, video1, strResult); 
に変更 proc.StartInfo.FileName

経由のffmpegを呼んでいます

+0

あなたが言いました通りに変更しましたが、すべてのディレクトリが変更されたときにもう一度別のエラーが発生しました。 FFmpegバージョンSVN-r23607、Copyright(c)2000-2010 FFmpeg開発者 libavutil 50.19。 0/50.19。 0 libavcodec 52.76。 0/52.76。 0 libavformat 52.68。 0/52.68。 0 libavdevice 52. 2. 0/52. 2. 0 libavfilter 1.20。 0/1.20。 0 libswscale 0.11。 0/0.11。 0 D:\ Developments \ Video:そのようなファイルまたはディレクトリはありません。 –

+0

結果パスが 'D:\ Developments \ Video Capture \ My video capture \ WindowsFormsApplication1 \ bin \ Debug \ Video \'になるように、起動パスまたはパス参照を変更する必要があります。 – Mulvya

+0

。大きな助け.. –

関連する問題