Opened 9 years ago
Closed 9 years ago
#4646 closed defect (invalid)
video filter drawtext does not work
Reported by: | ill | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | 2.7 | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
When using ffmpeg, the output files never have any text drawn on them, even though drawtext is specified.
Summary of the bug:
How to reproduce:
% ffmpeg -i input ... output ffmpeg version built on ...
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
$ ffmpeg -f pulse -i default -acodec vorbis -f video4linux2 -input_format mjpeg -s 960x720 -r 5 -i /dev/video0 -vcodec libx264 -map 0:a -map 1:v -vf "drawtext='fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf:fontcolor=white:fontsize=30:x=1:y=2:shadowx=1:shadowy=1:text=%{localtime\:%Y-%m-%d %H
\:%M
\:%S}'" -preset ultrafast -tune zerolatency http://127.0.0.1:8090/cam.ffm -f segment -segment_time 3600 -segment_atclocktime 1 -reset_timestamps 1 -vcodec copy -strict -2 -strftime 1 -acodec copy "/media/cam/%Y-%m-%d_%H-%M.mkv"
ffmpeg version 2.7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (SUSE Linux)
configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --datadir=/usr/share/ffmpeg --enable-avfilter --enable-libpulse --enable-libwebp --enable-libvpx --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libx265 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc --enable-gnutls --enable-libass --enable-frei0r --enable-libcelt --enable-libcdio --enable-ladspa
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
[pulse @ 0x1b93f60] pa_stream_get_latency() failed
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':
Duration: N/A, start: 1434787581.801592, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Input #1, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 22194.861206, bitrate: N/A
Stream #1:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 960x720, 0 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Codec AVOption preset (Configuration preset) specified for output file #0 (http://127.0.0.1:8090/cam.ffm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption tune (Tune the encoding params (cf. x264 --fullhelp)) specified for output file #0 (http://127.0.0.1:8090/cam.ffm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[swscaler @ 0x1b806e0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x1b8a6e0] deprecated pixel format used, make sure you did set range correctly
[segment @ 0x1ba29e0] Codec for stream 0 does not use global headers but container format requires global headers
[segment @ 0x1ba29e0] Codec for stream 1 does not use global headers but container format requires global headers
[matroska @ 0x1cf9c20] Codec for stream 0 does not use global headers but container format requires global headers
[matroska @ 0x1cf9c20] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, ffm, to 'http://127.0.0.1:8090/cam.ffm':
Metadata:
creation_time : now
encoder : Lavf56.36.100
Stream #0:0: Video: flv1 (flv), yuv420p, 960x720, q=5-15, 4000 kb/s, 5 fps, 1000k tbn, 5 tbc
Metadata:
encoder : Lavc56.41.100 flv
Stream #0:1: Video: mjpeg, yuvj422p(pc), 960x720, q=1-5, 64 kb/s, 5 fps, 1000k tbn, 2 tbc
Metadata:
encoder : Lavc56.41.100 mjpeg
Stream #0:2: Video: mjpeg, yuvj422p(pc), 640x480, q=10-20, 64 kb/s, 5 fps, 1000k tbn, 2 tbc
Metadata:
encoder : Lavc56.41.100 mjpeg
Output #1, segment, to '/media/cam/%Y-%m-%d_%H-%M.mkv':
Metadata:
encoder : Lavf56.36.100
Stream #1:0: Video: mjpeg, yuvj422p, 960x720, q=2-31, 0 kb/s, 5 fps, 5 tbr, 1k tbn, 5 tbc
Stream #1:1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (mjpeg (native) -> flv1 (flv))
Stream #1:0 -> #0:1 (mjpeg (native) -> mjpeg (native))
Stream #1:0 -> #0:2 (mjpeg (native) -> mjpeg (native))
Stream #1:0 -> #1:0 (copy)
Stream #0:0 -> #1:1 (copy)
Press [q] to stop, ? for help
[mjpeg @ 0x1bb65e0] rc buffer underflow
Last message repeated 1 times
[pulse @ 0x1b93f60] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[segment @ 0x1ba29e0] Non-monotonous DTS in output stream 1:1; previous: 1, current: -10; changing to 2. This may result in incorrect timestamps in the output file.
[segment @ 0x1ba29e0] Non-monotonous DTS in output stream 1:1; previous: 2, current: -13; changing to 3. This may result in incorrect timestamps in the output file.
[segment @ 0x1ba29e0] Non-monotonous DTS in output stream 1:1; previous: 3, current: -8; changing to 4. This may result in incorrect timestamps in the output file.
[mjpeg @ 0x1bb65e0] rc buffer underflow
[mjpeg @ 0x1bb65e0] rc buffer underflowq=-1.0 size= 72kB time=00:00:01.50 bitrate= 393.2kbits/s
[mjpeg @ 0x1bb65e0] rc buffer underflowq=-1.0 size= 124kB time=00:00:02.00 bitrate= 507.9kbits/s dup=0 drop=2
[mjpeg @ 0x1bb65e0] rc buffer underflowq=-1.0 size= 168kB time=00:00:02.50 bitrate= 550.5kbits/s dup=0 drop=6
[mjpeg @ 0x1bb65e0] rc buffer underflowq=-1.0 size= 216kB time=00:00:03.00 bitrate= 589.8kbits/s dup=0 drop=8
Change History (4)
comment:1 by , 9 years ago
Keywords: | drawtext added |
---|
comment:4 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing as invalid. You can re-open it if drawtext continues to fail if you omit stream copying of the video.
Also, you should always provide the most minimal command that reproduces the issue to make it easier to figure things out. Please take the time to properly format your command and console output next time so it is easier to read (use the code block button), and you can delete the existing instructions in the codebox when you make a bug report.
Please test current FFmpeg git head.