[Ffmpeg-devel] [PATCH] Specify file format in vhook watermark

Víctor Paesa wzrlpy
Mon Dec 4 11:04:06 CET 2006


Hi,
> Hi
>
> V?ctor Paesa wrote:
>> Hi,
>>
>> There has been some reports about images wrongly identified as MP3
>> by file probing in vhook watermark.
>>
>> To deal with that, the attached patch allows to specify explicitely
>> the file format as part of the vhook watermark invocation.
>>
>
> Maybe something like attached patch is good too. It would be usefull for
> filenames not containing a number pattern also. Is MAX/2 all right ?
>

If I use your patch alone, the container and vcodec are identified
correctly in watermark, but the pix_fmt is still the default yuv420p:

$ ./ffmpeg -i ~/src/SmallConcert.avi -vhook './vhook/watermark.dll -f
~/src/logo_watermark_full_layer.gif -m 0 -t ffffff' out.avi
FFmpeg version SVN-r7215, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --enable-mp3lame --enable-a52 --disable-static
--enable-shared --enable-pthreads --enable-swscaler --enable-avisynth
--enable-gpl --extra-cflags=-march=pentium4
  libavutil version: 49.1.0
  libavcodec version: 51.25.0
  libavformat version: 51.6.0
  built on Dec  3 2006 00:39:08, gcc: 3.4.4 (cygming special) (gdc 0.12,
using dmd 0.125)
Input #0, avi, from '/home/Inma/src/SmallConcert.avi':
  Duration: 00:00:20.2, start: 0.000000, bitrate: 30349 kb/s
  Stream #0.0: Video: dvvideo, yuv420p, 720x576, 25.00 fps(r)
  Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
[image2 @ 0xfa4054]Could not find codec parameters (Video: gif, yuv420p)
get_watermark_picture() Failed to find stream info
Failed to Configure ./vhook/watermark.dll



I believe your patch should be applied, because it fixes the
identification of input files:

Unpatched:
$ ffmpeg -i ~/src/logo_watermark_full_layer.gif
FFmpeg version SVN-r7215, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --enable-mp3lame --enable-a52 --disable-static
--enable-shared --enable-pthreads --enable-swscaler --enable-avisynth
--enable-gpl --extra-cflags=-march=pentium4
  libavutil version: 49.1.0
  libavcodec version: 51.25.0
  libavformat version: 51.6.0
  built on Dec  3 2006 00:39:08, gcc: 3.4.4 (cygming special) (gdc 0.12,
using dmd 0.125)
[mp3 @ 0x974054]Could not find codec parameters (Audio: mp1, 160 kb/s)
/home/Inma/src/logo_watermark_full_layer.gif: could not find codec parameters


Patched:
$ ./ffmpeg -i ~/src/logo_watermark_full_layer.gif
FFmpeg version SVN-r7215, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:  --enable-mp3lame --enable-a52 --disable-static
--enable-shared --enable-pthreads --enable-swscaler --enable-avisynth
--enable-gpl --extra-cflags=-march=pentium4
  libavutil version: 49.1.0
  libavcodec version: 51.25.0
  libavformat version: 51.6.0
  built on Dec  3 2006 00:39:08, gcc: 3.4.4 (cygming special) (gdc 0.12,
using dmd 0.125)
Input #0, image2, from '/home/Inma/src/logo_watermark_full_layer.gif':
  Duration: 00:00:00.0, start: 0.000000, bitrate: N/A
  Stream #0.0: Video: gif, pal8, 384x288, 25.00 fps(r)
Must supply at least one output file


Regards,
V?ctor






More information about the ffmpeg-devel mailing list