3

The following script was working fine until I upgraded all my Raspberry Pis to Release 9:

#!/bin/bash

cd /home/pi/Videos/SecurityCam/
DToday=`date '+%Y%m%d-%H%M%S'`
fn="VID $DToday"
SubT="PP $PB $DToday"

avconv -f video4linux2 -i /dev/video0 -t 3600 -r 4 -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: \text=\'$SubT \%T \' : fontcolor=white@0.8: x=7: y=460" -vcodec libx264 -vb 2000k \-y ${fn}.avi

It is now choking on the %T. Why would that be and what is the right way to get a rolling timestamp in the video?

Chiwda
  • 914
  • 4
  • 25
  • 40

1 Answers1

1

try with this:

#!/bin/bash
cd /home/pi/Videos/SecurityCam/ || exit
DToday=$(date '+%Y%m%d-%H%M%S')
fn="VID $DToday"
SubT="PP $PB $DToday"

avconv -f video4linux2 -i /dev/video0 -t 3600 -r 4 -vf "drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: \text=\'$SubT \%T \' : fontcolor=white@0.8: x=7: y=460"
 -vcodec libx264 -vb 2000k -y "${fn}.avi"
PaulRM
  • 339
  • 2
  • 10
  • This doesn't work! And how is it different on the Timestamp issue than what I have shown? The \%T still doesn't work, so changing how the filename is specified doesn't make sense to me. – Chiwda Apr 10 '19 at 06:33