gpt4 book ai didi

c# - 如何解决ffmpeg水印 "No such filter: '电影'"AND "avformat_open_input失败?

转载 作者:行者123 更新时间:2023-12-04 22:56:35 28 4
gpt4 key购买 nike

我正在开发 Windows 服务,我的 Windows 服务使用“ffmpeg”,同时我正在开发用于测试代码的桌面应用程序。

我想在我的视频中导入水印。我可以用我的桌面应用程序做到这一点。但是当我运行我的 Windows 服务时,它会出错。

ffmpeg version N-36635-gceb0dd9 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 9 2012 17:39:58 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 34.100 / 51. 34.100
libavcodec 53. 54.100 / 53. 54.100
libavformat 53. 29.100 / 53. 29.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 58.100 / 2. 58.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 51. 2.100 / 51. 2.100
[mpeg4 @ 01CA93A0] Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from 'C:\Apps\SabilVideoProcesser\WAITING_FOR_WATERMARK\Pixar - For the Birds.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:03:16.56, start: 0.000000, bitrate: 2113 kb/s
Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 25 fps, 25 tbr, 25 tbn, 30k tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 32 kb/s
[buffer @ 02746A20] w:720 h:416 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[movie @ 02748E00] Failed to avformat_open_input 'logo.png'
Error initializing filter 'movie' with args 'logo.png'
Error opening filters!

我有时会更改 logo.png,但它不起作用并已修复。我不明白出了什么问题?

我尝试更改 ffmpeg.exe 并从“http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/static/”下载,但是当我运行服务时,我再次遇到错误。这次错误不同,我会发疯的...
FFmpeg version SVN-r26400, Copyright (c) 2000-2011 the FFmpeg developers
built on Jan 18 2011 04:07:05 with gcc 4.4.2
configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect --enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 1 / 0.16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.93. 0 / 52.93. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.74. 0 / 1.74. 0
libswscale 0.12. 0 / 0.12. 0
[mpeg4 @ 003dfbd0] Invalid and inefficient vfw-avi packed B frames detected
[mpeg4 @ 003dfbd0] frame skip 8

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 25.00 (25/1)
Input #0, avi, from 'C:\Apps\SabilVideoProcesser\WAITING_FOR_WATERMARK\Pixar - For the Birds.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:03:16.56, start: 0.000000, bitrate: 2113 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 720x416 [PAR 1:1 DAR 45:26], 25 fps, 25 tbr, 25 tbn, 30k tbc
Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 189 kb/s
[buffer @ 020d51b0] w:720 h:416 pixfmt:yuv420p
No such filter: 'movie'
Error opening filters!

这是我的 ffmpeg 参数;
-i "C:\Apps\SabilVideoProcesser\WAITING_FOR_WATERMARK\Pixar - For the Birds.avi" -vf "movie=logo.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]" -vcodec libx264 -acodec ac3_fixed "C:\Apps\SabilVideoProcesser\WAITING_FOR_SPLIT\inprocess_Pixar - For the Birds.avi"

最佳答案

问题 #1:Failed to avformat_open_input 'logo.png'
您遇到两个不同的问题。留言Failed to avformat_open_input 'logo.png'可能表示ffmpeg找不到logo.png (或者可能无法正确解码)。要么提供文件的绝对路径,要么将其放在与 ffmpeg 二进制文件相同的目录(或“文件夹”,我相信是 Windows 术语)中。如果文件在正确的位置然后运行 ​​ffmpeg -i logo.png看看ffmpeg是否甚至可以解码它。

问题 #2:No such filter: 'movie'
第二条消息No such filter: 'movie'表示此命令中使用的 ffmpeg 太旧,或者不支持过滤器,或者对于 movie 来说太旧了。 .来自 arrozcru.org 的二进制文件已过时。 Zeranoe FFmpeg Builds保持最新并且配置合理。您应该继续获取更新的二进制文件。修订版 36635 已经至少有 3696 个修订版。那就看看FFmpeg: The ultimate Video and Audio Manipulation Tool有关使用情况的良好概述。

添加水印

无论如何,您不需要 movie源过滤器添加水印。请参阅 How to add transparent watermark in center of a video with ffmpeg? 中的示例

关于c# - 如何解决ffmpeg水印 "No such filter: '电影'"AND "avformat_open_input失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10455611/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com