0
votes

when i used in cmd for merge that it merge successfully ,here is sample code,

ffmpeg -i "D:\Developments\Video Capture\My video capture\WindowsFormsApplication1\bin\Debug\Video\uuu.wav" -i "D:\Developments\Video Capture\My video capture\WindowsFormsApplication1\bin\Debug\Video\1.avi" -acodec copy -vcodec copy "D:\Developments\Video Capture\My video capture\WindowsFormsApplication1\bin\Debug\Video\output.avi"

but here is sample code i used in c# application form,

   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();
        }

here is outpu error....

FFmpeg version SVN-r23607, Copyright (c) 2000-2010 the FFmpeg developers built on Jun 15 2010 04:09:35 with gcc 4.4.2 configuration: --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-libx264 --extra-libs='-lx264 -lpthread' --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 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 Unable to find a suitable output format for 'ffmpeg'

please help me to fix this problem..

1
SVN-r23607 is ancient and unsupported. Why are you using such an old version? You're missing 6 years of development, bug fixes, features, and security fixes. - llogan

1 Answers

1
votes

You are already calling ffmpeg via proc.StartInfo.FileName

so change to

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