none
how to merge wav audio and avi video file.

    Question

  • I have wav format audio and avi format video file.I need to merge these two file in to one file.

    So I want to ask is anyone doing this job before?

    Thanks!

    Wednesday, May 11, 2016 5:16 AM

Answers

All replies

  • I'd probably try them over here.

    http://answers.microsoft.com/en-us/windows/forum/pictures?

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Wednesday, May 11, 2016 11:45 AM
    Moderator
  • when i used in cmd for that it will merge audio and video file 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'

    Thursday, May 12, 2016 4:09 AM
  • Might also try over here.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral%2Cwindowsgeneraldevelopmentissues%2Cwinforms&filter=alltypes&sort=lastpostdesc

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Mike Laughlin Thursday, May 12, 2016 12:40 PM
    Thursday, May 12, 2016 4:19 AM
    Moderator