【发布时间】:2016-09-07 17:07:36
【问题描述】:
当我在 cmd 中使用它合并成功时,这里是示例代码,
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"
但这是我在 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();
}
这是输出错误....
FFmpeg 版本 SVN-r23607,版权所有 (c) 2000-2010 FFmpeg 开发者 建于 2010 年 6 月 15 日 04:09:35,使用 gcc 4.4.2 配置: --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 libav 格式 52.68。 0 / 52.68。 0 libavdevice 52. 2. 0 / 52. 2. 0 库过滤器 1.20。 0 / 1.20。 0 libswscale 0.11。 0 / 0.11。 0 无法为“ffmpeg”找到合适的输出格式
请帮我解决这个问题..
【问题讨论】:
-
SVN-r23607是古老且不受支持的。你为什么用这么旧的版本?您错过了 6 年的开发、错误修复、功能和安全修复。
标签: c# ffmpeg audio-streaming video-capture