andyk
Member
Inspired by this, I coded a little awk script to generate a VideoRedo chapter file from the ffprobe output. Here it is for anyone interested. It assumes 25 fps, although that's not really important. It's been working so far and gets you near the start and end of ads - useful for Channel 4 HD stuff anyway.
C-like:
'
BEGIN{ FS=","; st=-1;}
{if (st==-1) {st=$1; ch=$2}}
{t=$1-st}
ch!=$2 {
h=int(t/3600);
m=int((t-h*3600)/60);
s=int(t-h*3600-m*60);
f=(t-(int(t)))*25;
printf(%pf%,h,m,s,f);
ch=$2
}'