Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#207 closed defect (fixed)

Drawtext filter displays static date (date doesn't update)

Reported by: xj25vm Owned by: michael
Priority: important Component: avfilter
Version: git Keywords: libavfilter drawtext
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

I'm using latest (at the moment) FFmpeg version: git-N-29946-g27614b1.

When trying to overlay updating date/time on a video using the drawtext filter, the initial time is displayed from when the command was run - but the time does not further update. I've tested this with nightly from 08/March/2011 and it was working fine. I don't know when did it brake.

Here is the command I use:

ffmpeg -fflags +genpts -t 600 -f mjpeg -r 8 -s 640x480 \

-i http://localhost:8080/?action=stream -vcodec mpeg4 \
-vf drawtext="fontfile=/usr/share/fonts/TTF/mitra.ttf:x=70:y=455: \
text='\%H\:\%M\:\%S | \%a \%d/\%b/\%Y | S500ATV | camera 0': \
fontcolor=0xFFFFFFFF:fontsize=18: \
shadowcolor=0x000000EE:shadowx=1:shadowy=1" \
-b 1500000 -r 8 video_file.avi

The input stream is an mjpeg stream generated with mjpeg_streamer from a usb webcam.

Here is the console output with -v 9 -loglevel 99:

ffmpeg version git-N-29946-g27614b1, Copyright (c) 2000-2011 the FFmpeg developers

built on May 15 2011 20:38:44 with gcc 4.5.2
configuration: --prefix=/usr --enable-filter=drawtext --enable-libfreetype --enable-libx264 --enable-gpl
libavutil 51. 2. 1 / 51. 2. 1
libavcodec 53. 5. 0 / 53. 5. 0
libavformat 53. 0. 3 / 53. 0. 3
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 5. 0 / 2. 5. 0
libswscale 0. 14. 0 / 0. 14. 0
libpostproc 51. 2. 0 / 51. 2. 0

[mjpeg @ 0x8cd7e00] buffer too small, expanding to 39696 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39696
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39694
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39656
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39650
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39644
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39510
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39503
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39484
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39064
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 247 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39058
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38810 bytes (310475 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8ccbba0] max_analyze_duration reached
[mjpeg @ 0x8ccbba0] Estimating duration from bitrate, this may be inaccurate
Input #0, mjpeg, from 'http://localhost:8080/?action=stream':

Duration: N/A, bitrate: N/A

Stream #0.0, 42, 1/1200000: Video: mjpeg, yuvj422p, 640x480, 1/8, 8 fps, 8 tbr, 1200k tbn, 8 tbc

Incompatible pixel format 'yuvj422p' for codec 'mpeg4', auto-selecting format 'yuv420p'
[buffer @ 0x8ce11e0] w:640 h:480 pixfmt:yuvj422p tb:1/1000000 sar:0/1
[drawtext @ 0x8ce0ca0] Setting value '/usr/share/fonts/TTF/mitra.ttf' for key 'fontfile'
[drawtext @ 0x8ce0ca0] Setting value '70' for key 'x'
[drawtext @ 0x8ce0ca0] Setting value '455' for key 'y'
[drawtext @ 0x8ce0ca0] Setting value '%H:%M:%S | %a %d/%b/%Y | S465ATV | camera 0' for key 'text'
[drawtext @ 0x8ce0ca0] Setting value '0xFFFFFFFF' for key 'fontcolor'
[drawtext @ 0x8ce0ca0] Setting value '18' for key 'fontsize'
[drawtext @ 0x8ce0ca0] Setting value '0x000000EE' for key 'shadowcolor'
[drawtext @ 0x8ce0ca0] Setting value '1' for key 'shadowx'
[drawtext @ 0x8ce0ca0] Setting value '1' for key 'shadowy'
[drawtext @ 0x8ce0be0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'Parsed filter 0 drawtext'
[scale @ 0x8cdbee0] w:640 h:480 fmt:yuvj422p -> w:640 h:480 fmt:yuv420p flags:0xa0000004
Output #0, avi, to '/var/iroko/videos/2011-05-16/09-40_camera0.avi':

Metadata:

ISFT : Lavf53.0.3
Stream #0.0, 0, 1/8: Video: mpeg4, yuv420p, 640x480, 1/8, q=2-31, 1500 kb/s, 8 tbn, 8 tbc

Stream mapping:

Stream #0.0 -> #0.0

Press [q] to stop, ? for help
[mjpeg @ 0x8cd7e00] buffer too small, expanding to 39696 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39696
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39694
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39656
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39650
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39644
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39510
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39503
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39484
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39064
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 247 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39058
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38810 bytes (310475 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8cd7e00] buffer too small, expanding to 39740 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39740
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39738
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39700
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39694
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39688
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39554
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39547
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39528
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39108
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 230 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39102
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38871 bytes (310967 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8cd7e00] buffer too small, expanding to 39780 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39780
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39778
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39740
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39734
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39728
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39594
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39587
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39568
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39148
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 206 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39142
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38935 bytes (311474 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8cd7e00] buffer too small, expanding to 39836 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39836
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39834
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39796
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39790
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39784
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39650
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39643
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39624
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39204
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 215 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39198
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38982 bytes (311849 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39776
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39774
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39736
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39730
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39724
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39590
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39583
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39564
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39144
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 235 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39138
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38902 bytes (311214 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39744
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39742
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39704
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39698
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39692
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39558
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39551
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39532
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39112
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 228 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39106
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38877 bytes (311015 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39732
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39730
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39692
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39686
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39680
[mjpeg @ 0x8cd7e00] index=0
[mjpeg @ 0x8cd7e00] qscale[0]: 2
[mjpeg @ 0x8cd7e00] index=1
[mjpeg @ 0x8cd7e00] qscale[1]: 4
[mjpeg @ 0x8cd7e00] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39546
[mjpeg @ 0x8cd7e00] marker parser used 5 bytes (40 bits)
[mjpeg @ 0x8cd7e00] marker=c0 avail_size_in_buf=39539
[mjpeg @ 0x8cd7e00] sof0: picture: 640x480
[mjpeg @ 0x8cd7e00] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x8cd7e00] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x8cd7e00] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x8cd7e00] pix fmt id 21111100
[mjpeg @ 0x8cd7e00] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x8cd7e00] marker=c4 avail_size_in_buf=39520
[mjpeg @ 0x8cd7e00] class=0 index=0 nb_codes=12
[mjpeg @ 0x8cd7e00] class=0 index=1 nb_codes=12
[mjpeg @ 0x8cd7e00] class=1 index=0 nb_codes=251
[mjpeg @ 0x8cd7e00] class=1 index=1 nb_codes=251
[mjpeg @ 0x8cd7e00] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39100
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] escaping removed 230 bytes
[mjpeg @ 0x8cd7e00] marker=da avail_size_in_buf=39094
[mjpeg @ 0x8cd7e00] component: 0
[mjpeg @ 0x8cd7e00] component: 1
[mjpeg @ 0x8cd7e00] component: 2
[mjpeg @ 0x8cd7e00] marker parser used 38863 bytes (310903 bits)
[mjpeg @ 0x8cd7e00] marker=d9 avail_size_in_buf=102
[mjpeg @ 0x8cd7e00] mjpeg decode frame unused 102 bytes
[mjpeg @ 0x8cd7e00] marker=d8 avail_size_in_buf=39740
[mjpeg @ 0x8cd7e00] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39738
[mjpeg @ 0x8cd7e00] marker parser used 36 bytes (288 bits)
[mjpeg @ 0x8cd7e00] marker=fe avail_size_in_buf=39700
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=dd avail_size_in_buf=39694
[mjpeg @ 0x8cd7e00] restart interval: 0
[mjpeg @ 0x8cd7e00] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x8cd7e00] marker=db avail_size_in_buf=39688
[mjpeg @ 0x8cd7e00] index=0

Attachments (1)

strftime.mkv (190.5 KB) - added by Marcos Mello 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by xj25vm

I've just noticed that top shows the processor as 100% on one of the cores just for a single instance/process of ffmpeg. On the same platform, doing the same work, it used to be between 28% and 38% on one of the cores with the ffmpeg build from 8-March-2011. Could it be related to the drawtext filter bug?

I am on an Atom D510 processor at 1.66GHz (two cores showing as four because of hyperthreading).

comment:2 Changed 5 years ago by saste

  • Analyzed by developer set
  • Reproduced by developer set
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in commit:

commit ce207e050e38352541531e2f09d62c2f54680063
Author: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date: Mon May 16 20:11:50 2011 +0200

drawtext: fix strftime() text expansion


The feature was dropped after the filter was partially rewritten and
recommitted.


Fix issue #207.

As for the CPU usage issue, can you try to git bisect in order to determine which commit changed it? (but please do it in a separate ticket)

Also note that 100% CPU usage for ffmpeg is not so weird.

comment:3 Changed 5 years ago by Marcos Mello

I think some bug still remains, because the time isn't updated correctly.

Tested with git-N-29973-gf2962ac and the following command:

ffmpeg -i sign_irene_cif.y4m -vf drawtext="fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf: text='%T %D': x=10: y=10: fontsize=24: fontcolor=black: box=1: boxcolor=white@0.7" -vcodec libx264 -preset fast -crf 34 -threads 0 strftime.mkv

See the "strftime.mkv" attachment.

Changed 5 years ago by Marcos Mello

comment:4 Changed 5 years ago by xj25vm

Seems fixed for me with git-N-29973-gf2962ac. Still experiencing high cpu usage - with or without drawtext filter - but that's another bug. And I know that working with video can eat a lot of processor - but my point is that ffmpeg use to take 30%-40% of one core on the same platform for same application just few weeks ago. Now it needs 100% of one core. Will investigate further with git bisect as instructed and log a different bug.

Thanks Stefano.

comment:5 Changed 5 years ago by xj25vm

Sorry to keep on adding comments to this bug. Just a note that the high processor usage was actually due to the webcam I was using. There is weirdly a large difference of processor usage generated by ffmpeg, depending on which model of webcam I use (although the mjpeg stream goes first through mjpg_streamer, and although I was using same resolution, fps and bit rate). Anyway, it is really unlikely that this is a bug with ffmpeg or even down to ffmpeg - it looks like the characteristics of the mjpeg stream coming from some webcams are quite different from other webcams.

In conclusion, it's not a bug with ffmpeg.

Note: See TracTickets for help on using tickets.