[FFmpeg-user] ffserver and drawtext not possible?
pb.g at gmx.de
pb.g at gmx.de
Sun Jul 3 22:07:31 CEST 2016
Hi, I currently try to stream my webcam to my browser and I want to display some text in the stream. It seems
ffserver does not handle -vf drawtext flags? I pass them to the ffmpeg command. If I use the ffmpeg command and use an output file instead of streaming to ffserver and I play this file I can see the text.
ffmpeg command:
ffmpeg -f v4l2 -input_format mjpeg -video_size 1920x1080 -i /dev/video0 -ss 00:00:05 -vf "drawtext=fontfile=/usr/share/fonts/freefont/FreeSerif.ttf:textfile=test.txt:fontsize=32 :fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2" http://localhost:8090/feed1.ffm
output:
ffmpeg version 2.8.7 Copyright (c) 2000-2016 the FFmpeg developers=(h-text_h)/2" built with gcc 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe' --disable-static --enable-avfilter --enable-avresample --disable-stripping --enable-nonfree --enable-version3 --enable-nonfree --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --enable-doc --disable-gnutls --enable-gpl --enable-hardcoded-tables --enable-iconv --disable-lzma --enable-network --enable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl --enable-vaapi --disable-vdpau --enable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --enable-libv4l2 --enable-libpulse --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libfdk-aac --enable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --enable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --disable-libvorbis --enable-libvpx --enable-libzvbi --disable-libbs2b --disable-libflite --enable-frei0r --enable-libfribidi --enable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --enable-libaacplus --disable-libfaac --disable-libsnappy --enable-libtheora --enable-libtwolame --disable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --disable-libxvid --enable-x11grab --disable-amd3dnow --disable-amd3dnowext --disable-fma4 --disable-xop --cpu=host
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[mjpeg @ 0x800080] Changeing bps to 8
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 31200.896823, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[swscaler @ 0x8171e0] deprecated pixel format used, make sure you did set range correctly
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
creation_time : 2016-07-03 22:01:33
encoder : Lavf56.40.101
Stream #0:0: Video: mjpeg, yuvj422p(pc), 1280x720, q=5-8, 200 kb/s, 30 fps, 1000k tbn, 1 tbc
Metadata:
encoder : Lavc56.60.100 mjpeg
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 3 fps=0.4 q=1.6 Lsize= 100kB time=00:00:03.00 bitrate= 273.1kbits/s dup=0 drop=47
video:95kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.911583%
my ffserver.conf:
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 10
MaxClients 10
MaxBandwidth 10000
CustomLog -
<Feed feed1.ffm>
File ./feed1.ffm
FileMaxSize 5M
ACL allow 127.0.0.1
</Feed>
<Stream test.mjpeg>
Feed feed1.ffm
NoDefaults
Format mpjpeg
NoAudio
VideoCodec mjpeg
VideoSize 1280x720
VideoFrameRate 1
VideoBitRate 200
VideoQMin 5
VideoQMax 8
#Preroll 5
#StartSendOnKey
AVOptionVideo flags +global_header
Metadata title LiveCam Dresden
Metadata author "Paul"
Metadata copyright "copy right!"
Metadata comment "1/2.7 CMOS OV2710 Sensor Test"
</Stream>
<Stream status.html>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
<Redirect index.html> # redirect index.html req. to this site
URL http://www.ffmpeg.org/
</Redirect>
output:
ffserver version 2.8.7 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe' --disable-static --enable-avfilter --enable-avresample --disable-stripping --enable-nonfree --enable-version3 --enable-nonfree --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --enable-doc --disable-gnutls --enable-gpl --enable-hardcoded-tables --enable-iconv --disable-lzma --enable-network --enable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl --enable-vaapi --disable-vdpau --enable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --enable-libv4l2 --enable-libpulse --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libfdk-aac --enable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --disable-libopus --disable-libquvi --enable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --disable-libvorbis --enable-libvpx --enable-libzvbi --disable-libbs2b --disable-libflite --enable-frei0r --enable-libfribidi --enable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --enable-libaacplus --disable-libfaac --disable-libsnappy --enable-libtheora --enable-libtwolame --disable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --disable-libxvid --enable-x11grab --disable-amd3dnow --disable-amd3dnowext --disable-fma4 --disable-xop --cpu=host
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Sun Jul 3 22:01:21 2016 FFserver started.
Sun Jul 3 22:01:33 2016 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 237647
Sun Jul 3 22:01:40 2016 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 102400
More information about the ffmpeg-user
mailing list