Peter Valencic Posted February 19, 2017 Share Posted February 19, 2017 Hi, for my project I need to stream a video from IP camera and add some text from sensors into the final video. From armbian console I have installed ffmpeg (apt-get install ffmpeg).. The program works except the text is not included into streamed video: Example: ffserver.conf HTTPPort 8090 HTTPBindAddress 0.0.0.0 MaxHTTPConnections 2000 MaxClients 1000 MaxBandwidth 10000 CustomLog - <Feed monitoring1.ffm> File /tmp/monitoring1.ffm FileMaxSize 50M ACL allow 127.0.0.1 ACL allow 192.168.0.0 192.168.255.255 </Feed> <Stream monitoring1.mjpg> Feed monitoring1.ffm Format mpjpeg VideoCodec mjpeg VideoFrameRate 22 VideoBufferSize 80 VideoSize 720x264 NoAudio </Stream> # Redirect index.html to the appropriate site <Redirect index.html> URL http://www.ffmpeg.org/ </Redirect> Then I start a simple example as: ffmpeg -i rtsp://mpv.cdn3.bigCDN.com:554/bigCDN/definst/mp4:bigbuckbunnyiphone_400.mp4 -vf drawtext="fontfile=/home/projekt/StreamTest/DejaVuSans.ttf: \ text='TEST TEST': fontcolor=white: fontsize=36: box=1: boxcolor=black@0.5: \ boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2" -codec:a copy http://localhost:8090/monitoring1.ffm In Armbian console I get: root@orangepipc:/home/projekt/StreamTest# ./test.sh ffmpeg version 3.2.2-1~bpo8+1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.9.2 (Debian 4.9.2-10) configuration: --prefix=/usr --extra-version='1~bpo8+1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --disable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-libopencv --enable-frei0r --enable-libx264 --enable-chromaprint --enable-shared libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [rtsp @ 0xb7a0a280] UDP timeout, retrying with TCP Input #0, rtsp, from 'rtsp://mpv.cdn3.bigCDN.com:554/bigCDN/definst/mp4:bigbuckbunnyiphone_400.mp4': Metadata: title : http/9aaa4066-cs.mi-cdn.io/streaming/streams/flash/bigbuckbunnyiphone_400.mp4 Duration: 00:09:56.46, start: 0.000000, bitrate: N/A Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp Stream #0:1: Video: h264 (Constrained Baseline), yuv420p(progressive), 320x180, 24 tbr, 90k tbn, 180k tbc [tcp @ 0xb7a11ca0] Connection to tcp://localhost:8090 failed (Connection refused), trying next address Last message repeated 1 times [swscaler @ 0xb7a61d10] deprecated pixel format used, make sure you did set range correctly Output #0, ffm, to 'http://localhost:8090/monitoring1.ffm': Metadata: title : http/9aaa4066-cs.mi-cdn.io/streaming/streams/flash/bigbuckbunnyiphone_400.mp4 creation_time : now encoder : Lavf57.56.100 Stream #0:0: Video: mjpeg, yuvj420p(pc), 720x264, q=2-31, 64 kb/s, 24 fps, 1000k tbn, 22 tbc Metadata: encoder : Lavc57.64.101 mjpeg Side data: cpb: bitrate max/min/avg: 128000/0/64000 buffer size: 655360 vbv_delay: -1 Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> mjpeg (native)) Press [q] to stop, [?] for help [mjpeg @ 0xb7b0f760] rc buffer underflowkB time=00:00:00.77 bitrate= 720.9kbits/s dup=0 drop=1 speed=1.51x Last message repeated 8 times [mjpeg @ 0xb7b0f760] rc buffer underflowkB time=00:00:01.27 bitrate= 720.9kbits/s dup=0 drop=2 speed=1.24x Last message repeated 6 times Past duration 0.719322 too large [mjpeg @ 0xb7b0f760] rc buffer underflow Past duration 0.795326 too large [mjpeg @ 0xb7b0f760] rc buffer underflow Past duration 0.893318 too large [mjpeg @ 0xb7b0f760] rc buffer underflow Last message repeated 1 times [mjpeg @ 0xb7b0f760] rc buffer underflowkB time=00:00:01.77 bitrate= 739.4kbits/s dup=0 drop=3 speed=1.15x Last message repeated 8 times [mjpeg @ 0xb7b0f760] rc buffer underflowkB time=00:00:02.18 bitrate= 750.9kbits/s dup=0 drop=3 speed=1.06x Last message repeated 3 times frame= 53 fps= 23 q=31.4 Lsize= 224kB time=00:00:02.36 bitrate= 776.3kbits/s dup=0 drop=4 speed=1.04x video:217kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.163595% Exiting normally, received signal 2. root@orangepipc:/home/projekt/StreamTest# This is the result of "streamed" video but without embedded text 'TEST TEST' Does anyone know what could be wrong? or how to get latest version of Ffmpeg? Link to comment Share on other sites More sharing options...
Recommended Posts