#!/bin/sh stdbuf -i0 -o0 -e0 /opt/opendct/ffmpeg/ffmpeg -use_wallclock_as_timestamps 1 -r 10 -vcodec mjpeg -re -i http\://192.168.10.105/webcam/?action\=stream -f lavfi -i anullsrc -acodec ac3 -flush_packets 1 -vsync cfr -fflags +nobuffer+genpts+shortest -avoid_negative_ts make_non_negative -reset_timestamps 1 -r 29.97 -vcodec mpeg2video -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 224k -vf drawtext="fontsize=15:fontfile=/Library/Fonts/DroidSansMono.ttf:text='%{localtime\:%T}':fontsize=22:fontcolor='red':boxcolor=0x000000AA:box=1:x=7:y=7" -f mpegts -nostats pipe\:1