ffmpeg中文件打开错误

发布于 2024-10-21 07:20:55 字数 1389 浏览 3 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

影子是时光的心 2024-10-28 07:20:55

终于我得到了答案。
我收到此错误是因为我使用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文