[FFmpeg-user] lbavfilter. watermark. time interval.

Mark Himsley mark at mdsh.com
Mon Dec 12 16:49:35 CET 2011


On 12/12/11 14:29, demimurych wrote:

>> Sorry,I forgot to mention an important detail: while you probably
>> supposed that I want to use a video sequence as watermark, my
>> watermark is a static PNG image.I really hope it can work this
>> way.Best regards,Max

Ah - yes, I agree. Fading a still image over time doesn't appear to 
work. As it happens, I need this feature too.

I have asked on IRC this morning, but perhaps I'll reiterate my query 
here in email:


Does anyone know how can I get more than 1 frame out of a -vf movie 
source of an image?

N never gets above 0 with -vf 
"movie=watermark.png,showinfo[logo];[in][logo]overlay=0:0[out]" which 
means I cannot use the fade filter on an image.


Example command (I'm not worried about the quality of this encode - just 
whether the watermark fades):


ffmpeg -loglevel debug -threads 4 -shortest -i "../576i25/Compression 
test clips.mov" -vf 
"movie=SD_BBC_blocks_watermark.png,scale=0:0:interl=1,format=yuva420p,fade=in:25:25:alpha=1,fade=out:250:25:alpha=1,showinfo[logo];[in]scale=0:0:interl=1,format=yuv420p,setpts=PTS-STARTPTS,[logo]overlay=0:0,scale=0:0:interl=1[out]" 
-vcodec mpeg4 -aspect 16:9 -top 1 -an -vframes 300 -y "Compression test 
clips-out.mov"


What I note from the text output is that the showinfo line for the 
watermark movie is only printed once - so the fade cannot happen as the 
fade should happen for every frame.


ffmpeg version N-35158-g6d16a96, Copyright (c) 2000-2011 the FFmpeg 
developers
   built on Nov 25 2011 12:09:02 with gcc 4.4.3
   configuration: --arch=x86 --cpu=i686 --enable-static 
--extra-cflags='--static -I$PREFIX/include' --extra-libs='-static 
-L$PREFIX/lib' --prefix=/usr/local --disable-ffplay --disable-ffprobe 
--enable-gpl --enable-version3 --enable-nonfree --enable-pthreads 
--enable-x11grab --enable-libdirac --enable-libfaac --enable-libgsm 
--enable-libmp3lame --enable-libopenjpeg --enable-libspeex 
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid
   libavutil    51. 29. 0 / 51. 29. 0
   libavcodec   53. 37. 0 / 53. 37. 0
   libavformat  53. 21. 0 / 53. 21. 0
   libavdevice  53.  4. 0 / 53.  4. 0
   libavfilter   2. 49. 0 /  2. 49. 0
   libswscale    2.  1. 0 /  2.  1. 0
   libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xad8f660] Format mov,mp4,m4a,3gp,3g2,mj2 
probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xad8f660] ISO: File Type Major Brand: qt
[dvvideo @ 0xad961a0] err{or,}_recognition separate: 1; 1
[dvvideo @ 0xad961a0] err{or,}_recognition combined: 1; 65537
[dvvideo @ 0xad961a0] Unsupported bit depth: 0
[pcm_s16le @ 0xad96f20] err{or,}_recognition separate: 1; 1
[pcm_s16le @ 0xad96f20] err{or,}_recognition combined: 1; 65537
[pcm_s16le @ 0xad9fce0] err{or,}_recognition separate: 1; 1
[pcm_s16le @ 0xad9fce0] err{or,}_recognition combined: 1; 65537
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xad8f660] All info found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../576i25/Compression test 
clips.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537199360
     compatible_brands: qt
     creation_time   : 2009-06-09 16:00:06
   Duration: 00:01:46.12, start: 0.000000, bitrate: 30344 kb/s
     Stream #0:0(eng), 1, 1/25: Video: dvvideo (dvcp / 0x70637664), 
yuv420p, 720x576 [SAR 16:15 DAR 4:3], 1/25, 28800 kb/s, SAR 59:54 DAR 
295:216, 25 fps, 25 tbr, 25 tbn, 25 tbc
     Metadata:
       creation_time   : 2009-06-09 16:00:06
       handler_name    : ?Apple Alias Data Handler
     Stream #0:1(eng), 47, 1/48000: Audio: pcm_s16le (sowt / 
0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s
     Metadata:
       creation_time   : 2009-06-09 16:00:06
       handler_name    : ?Apple Alias Data Handler
     Stream #0:2(eng), 47, 1/48000: Audio: pcm_s16le (sowt / 
0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s
     Metadata:
       creation_time   : 2009-06-09 16:00:06
       handler_name    : ?Apple Alias Data Handler
     Stream #0:3(eng), 0, 1/25: Data: none (tmcd / 0x64636D74)
     Metadata:
       creation_time   : 2009-06-09 16:00:44
       handler_name    : ?Apple Alias Data Handler
[buffer @ 0xadfcb60] w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:59/54 
sws_param:
[png @ 0xad8d580] err{or,}_recognition separate: 1; 1
[png @ 0xad8d580] err{or,}_recognition combined: 1; 65537
[png @ 0xad8d580] err{or,}_recognition separate: 1; 65537
[png @ 0xad8d580] err{or,}_recognition combined: 1; 65537
[movie @ 0xad95440] seek_point:0 format_name:(null) 
file_name:SD_BBC_blocks_watermark.png stream_index:0
[fade @ 0xadb09c0] Setting value '1' for key 'alpha'
[fade @ 0xad8f500] type:in start_frame:25 nb_frames:25 alpha:1
[fade @ 0xadb1300] Setting value '1' for key 'alpha'
[fade @ 0xadb1240] type:out start_frame:250 nb_frames:25 alpha:1
[scale @ 0xadb1d80] w:720 h:576 fmt:yuv420p -> w:720 h:576 fmt:yuv420p 
flags:0x4
[format @ 0xadb0ee0] TB:0.000001
[scale @ 0xad96100] w:720 h:576 fmt:bgra -> w:720 h:576 fmt:yuva420p 
flags:0x4
[overlay @ 0xadb1080] main w:720 h:576 fmt:yuv420p overlay x:0 y:0 w:720 
h:576 fmt:yuva420p
[overlay @ 0xadb1080] main_tb:1/1000000 overlay_tb:1/25 -> tb:1/1000000 
exact:1
[scale @ 0xadb28c0] w:720 h:576 fmt:yuv420p -> w:720 h:576 fmt:yuv420p 
flags:0x4
[mpeg4 @ 0xadb5260] err{or,}_recognition separate: 1; 1
[mpeg4 @ 0xadb5260] err{or,}_recognition combined: 1; 65537
[mpeg4 @ 0xadb5260] intra_quant_bias = 0 inter_quant_bias = -64
[mpeg4 @ 0xadb5260] Unsupported bit depth: 0
[dvvideo @ 0xad961a0] err{or,}_recognition separate: 1; 65537
[dvvideo @ 0xad961a0] err{or,}_recognition combined: 1; 65537
[dvvideo @ 0xad961a0] Unsupported bit depth: 0
Output #0, mov, to 'Compression test clips-out.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537199360
     compatible_brands: qt
     creation_time   : 2009-06-09 16:00:06
     encoder         : Lavf53.21.0
     Stream #0:0(eng), 0, 1/25: Video: mpeg4 (mp4v / 0x7634706D), 
yuv420p, 720x576 [SAR 64:45 DAR 16:9], 1/25, q=2-31, 200 kb/s, 25 tbn, 
25 tbc
     Metadata:
       creation_time   : 2009-06-09 16:00:06
       handler_name    : ?Apple Alias Data Handler
Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo -> mpeg4)
Press [q] to stop, [?] for help
[showinfo @ 0xadb1960] n:0 pts:0 pts_time:0.000000 pos:-1 fmt:yuva420p 
sar:0/1 s:720x576 i:P iskey:1 type:I checksum:617BE6EC 
plane_checksum:[410DCF31 88788BD6 88788BD6 00000000]
frame=   62 fps=  0 q=31.0 size=     329kB time=00:00:02.48 
bitrate=1087.3kbits/s    frame=  127 fps=126 q=31.0 size=     397kB 
time=00:00:05.08 bitrate= 640.1kbits/s    frame=  188 fps=125 q=31.0 
size=     572kB time=00:00:07.52 bitrate= 623.7kbits/s    frame=  247 
fps=123 q=31.0 size=     724kB time=00:00:09.88 bitrate= 600.4kbits/s 
  frame=  300 fps=123 q=24.8 Lsize=     825kB time=00:00:12.00 bitrate= 
563.3kbits/s
video:822kB audio:0kB global headers:0kB muxing overhead 0.393410%


-- 
Mark


More information about the ffmpeg-user mailing list