我正在开发 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"