I'm trying add timestamp to output file from FFMPEG but I'm getting this error.
Filtergraph 'drawtext=fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf:text='\%T': [email protected]: x=7: y=460' was defined for video output stream 0:0 but codec copy was selected.
Filtering and streamcopy cannot be used together
And my command is:
ffmpeg -i rtsp://admin:[email protected]:554/11 -vf "drawtext=fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf:text='\%T': [email protected]: x=7: y=460" -acodec copy -vcodec copy test.avi
And the output:
ffmpeg version N-75939-g6eaf97c Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libfreetype
libavutil 55. 3.100 / 55. 3.100
libavcodec 57. 5.100 / 57. 5.100
libavformat 57. 3.100 / 57. 3.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 11.100 / 6. 11.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100 Input #0, rtsp, from 'rtsp://user:@192.168.1.52:554/11':
Metadata:
title : 10 Duration: N/A, start: 0.159000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p, 1280x720, 25.08 tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: adpcm_g726, 8000 Hz, mono, s16, 16 kb/s Filtergraph 'drawtext=fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf:text='\%T': [email protected]: x=7: y=460' was defined for video output stream 0:0 but codec copy was selected. Filtering and streamcopy cannot be used together.
Where I'm doing a mistake ?
Thank you for all reply :)
-vcodec copy
== streamcopy. You need to re-encode to add a text overlay so choose one encoder likelibx264
etc. – aergistalffmpeg -codecs
) – aergistal