ffmpeg中文件打开错误
我正在使用 ffmpeg 进行视频合并。因为它包含 3-4 个步骤。在其中一个步骤中,我想从多个视频中提取音频部分并获得单个合并的音频。我遇到错误:
[avs @ 6c370838 JAVIFileOpen faild with error - 2147221164E:\mypath\bin\debug\videos\video.avs: Error while opening file
我正在使用以下命令(使用 C#)来获取音频部分:<<<>>>
ffmpeg.exe -i "E:\mypath\bin\Debug\Videos\video.avs" -acodec pcm_s16le -ar 41000 -ab 64k -y -ac 2 "E:\mypath\bin\Debug\Videos\audio.wav"
video.avs 中的文本是:
video = UnalignedSplice(DirectShowSource("bumper.wmv", fps = 25, Convertfps = true), DirectShowSource("video.wmv", fps = 25, Convertfps = true, audio = false), DirectShowSource("trailer.wmv", fps = 25, Convertfps =true))
audio = DirectShowSource("video.wmv", video = false)
Clip = AudioDub(video, audio)
DelayAudio(Clip, +1)
我正在使用下面的代码来编写 video.avs 文件:
StreamWriter writer2 = new StreamWriter(Application.StartupPath + "\\Videos\\videoPart.avs");
writer2.WriteLine("UnalignedSplice(DirectShowSource(\"" + "bumper.wmv" + "\", fps = 25, Convertfps = true),"
+ " DirectShowSource(\"" + "video.wmv" + "\", fps = 25, Convertfps = true, audio = false),"
+ " DirectShowSource(\"" + "trailer.wmv" + "\", fps = 25, Convertfps =true))");
writer2.Close();
请帮助我。
i am using ffmpeg for video merge. as it contains 3-4 steps. in one step in which i wants to extract audio part from multiple videos and get single merged audio. i am facing error:
[avs @ 6c370838 JAVIFileOpen faild with error - 2147221164E:\mypath\bin\debug\videos\video.avs: Error while opening file
i am using below command (using c#) to get audio part: <<<>>>
ffmpeg.exe -i "E:\mypath\bin\Debug\Videos\video.avs" -acodec pcm_s16le -ar 41000 -ab 64k -y -ac 2 "E:\mypath\bin\Debug\Videos\audio.wav"
and the text in video.avs is :
video = UnalignedSplice(DirectShowSource("bumper.wmv", fps = 25, Convertfps = true), DirectShowSource("video.wmv", fps = 25, Convertfps = true, audio = false), DirectShowSource("trailer.wmv", fps = 25, Convertfps =true))
audio = DirectShowSource("video.wmv", video = false)
Clip = AudioDub(video, audio)
DelayAudio(Clip, +1)
I am using below code to write video.avs file:
StreamWriter writer2 = new StreamWriter(Application.StartupPath + "\\Videos\\videoPart.avs");
writer2.WriteLine("UnalignedSplice(DirectShowSource(\"" + "bumper.wmv" + "\", fps = 25, Convertfps = true),"
+ " DirectShowSource(\"" + "video.wmv" + "\", fps = 25, Convertfps = true, audio = false),"
+ " DirectShowSource(\"" + "trailer.wmv" + "\", fps = 25, Convertfps =true))");
writer2.Close();
Please help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
终于我得到了答案。
我收到此错误是因为我使用 ffmpeg 无法读取的 .avs 文件。要使 ffmpeg 使用 .avs 文件,我们必须安装“Avisynth”。
您可以从以下位置下载“Avisynth”: http://www.videohelp.com/tools/Avisynth
finally i got the answer.
i was getting this error because i am using .avs files which cannot be read by ffmpeg. to make ffmpeg to use .avs file we will have to install "Avisynth".
you can download "Avisynth" from : http://www.videohelp.com/tools/Avisynth