Reputation: 4262
i am developing a windows service, my windows service use "ffmpeg" and same time i am developing a desktop application for testing the code.
i want to import a watermark in my videos. i can do it with my desktop app. but when i run my windows service it take an error.
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!
i change logo.png sometimes but it didnt work and fixed. i dont understand what is wrong?
I tried change ffmpeg.exe and i downloaded from "http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/static/" but when i run service, i got an error again. this time error is different i will crazy...
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!
here is the my ffmpeg params;
-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"
Upvotes: 1
Views: 5942
Reputation: 134073
Failed to avformat_open_input 'logo.png'
You are experiencing two separate issues. The message Failed to avformat_open_input 'logo.png'
probably indicates that ffmpeg can't find logo.png
(or perhaps can't decode it properly). Either provide an absolute path to the file or place it in the same directory (or "folder" I believe is the Windows vernacular) as your ffmpeg binary. If the file is in the correct location then run ffmpeg -i logo.png
to see if ffmpeg can even decode it.
No such filter: 'movie'
The second message No such filter: 'movie'
indicates that the ffmpeg used in this command is too old and either supports no filters or is simply too old for movie
. Binaries from arrozcru.org are outdated. The Zeranoe FFmpeg Builds are kept up to date and are configured sanely. You should go ahead and get a more recent binary while your at it. Revision 36635 is already at least 3696 revisions old. Then take a look at FFmpeg: The ultimate Video and Audio Manipulation Tool for a good overview on usage.
Anyway, you don't need the movie
source filter to add a watermark. See the example in How to add transparent watermark in center of a video with ffmpeg?
Upvotes: 2
Reputation: 2491
Faced the same issue
(Error initializing filter 'movie' with args '/mnt/sdcard/MyApp/frame.png').
Using static ffmpeg library in my android app. On samsung galaxy s3 it works fine, but on the lenovo and htc 2.3.6 i had same error in ffmpeg - he coudln't find my watermark. Fixed this error by moving waterkmark in the same folder as ffmpeg (executable). So now i using next path in movie filter "...movie=frame.png..." instead of "...movie=/mnt/sdcard/MyApp/frame.png". Still don't know is it a bug or i'm just doing something wrong.
Upvotes: 0