Estou tentando fazer um vídeo com o registro de data e hora (do início do filme) exibido no quadro. Eu estou fazendo isso com o seguinte:
ffmpeg -loop 1 -framerate 30 -t 3600 -i /path/to/my.png -s 1280x720 -vf drawtext="fontfile=/path/to/my.ttf:fontcolor=white: timecode='00\:00\:00;00': r='30000/1001': text='': fontsize=148: x=190: y=260:" -c:v libx264 -vb 1000k -pix_fmt yuv420p -preset fast -f mp4 -r 30 -y out.mp4
O primeiro quadro começa com o timestamp 00:00:00;00
e o próximo 00:00:00;01
e assim por diante até chegarmos à marca de um minuto, onde os timestamps vão de 00:00:59;29
a 00:01:00;02
, que aparentemente está pulando dois quadros . Não importa o quanto eu mexa com o framerate de entrada e o framerate de saída, eu obtenho os mesmos resultados. Eu tentei -r 29.97
em ambos os lugares.
edite:
a saída completa -
ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 11 2014 20:59:04 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.1.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libvpx --enable-librtmp --enable-ffplay
libavutil 52. 48.101 / 52. 48.101
libavcodec 55. 39.101 / 55. 39.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, image2, from 'a.png':
Duration: 00:00:00.03, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, pal8, 1904x1232, 30 fps, 30 tbr, 30 tbn, 30 tbc
[libx264 @ 0x7fe479800600] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x7fe479800600] profile High, level 3.1
[libx264 @ 0x7fe479800600] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=abr mbtree=1 bitrate=1000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf55.19.104
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=-1--1, 1000 kb/s, 15360 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> libx264)
Press [q] to stop, [?] for help
frame=13780 fps= 35 q=-1.0 Lsize= 57239kB time=00:07:39.26 bitrate=1021.0kbits/s
video:57076kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.285284%
[libx264 @ 0x7fc50180a600] frame I:56 Avg QP: 2.82 size:706101
[libx264 @ 0x7fc50180a600] frame P:3473 Avg QP: 7.90 size: 2664
[libx264 @ 0x7fc50180a600] frame B:10251 Avg QP:14.77 size: 942
[libx264 @ 0x7fc50180a600] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 0x7fc50180a600] mb I I16..4: 15.2% 10.9% 73.9%
[libx264 @ 0x7fc50180a600] mb P I16..4: 0.0% 0.0% 0.2% P16..4: 0.8% 0.1% 0.4% 0.0% 0.0% skip:98.4%
[libx264 @ 0x7fc50180a600] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.2% 0.1% 0.3% direct: 0.1% skip:99.3% L0:49.2% L1:43.3% BI: 7.5%
[libx264 @ 0x7fc50180a600] final ratefactor: 5.65
[libx264 @ 0x7fc50180a600] 8x8 transform intra:9.1% inter:16.8%
[libx264 @ 0x7fc50180a600] coded y,uvDC,uvAC intra: 95.4% 97.6% 97.1% inter: 0.4% 0.5% 0.4%
[libx264 @ 0x7fc50180a600] i16 v,h,dc,p: 35% 16% 31% 19%
[libx264 @ 0x7fc50180a600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 14% 13% 4% 6% 9% 5% 8% 7%
[libx264 @ 0x7fc50180a600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 13% 11% 7% 7% 8% 7% 10% 7%
[libx264 @ 0x7fc50180a600] i8c dc,h,v,p: 38% 18% 34% 9%
[libx264 @ 0x7fc50180a600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fc50180a600] ref P L0: 79.1% 20.9%
[libx264 @ 0x7fc50180a600] ref B L0: 78.4% 21.6%
[libx264 @ 0x7fc50180a600] ref B L1: 84.4% 15.6%
[libx264 @ 0x7fc50180a600] kb/s:1017.91