#!/bin/bash
# extract all logo sizes from markad.log

VIDEO="/media/Video/VDR"

grep -r "cMarkAdStandalone::ProcessMarkOverlap(): overlap gap to marks are valid, before stop mark" --include "markad.log" $VIDEO | awk -F  " " '{printf "%s:%s:%s:%s\n", $1, $17, $21, $23}' | awk -F  ":" '{printf "%s -> before stop %s after start %s length %s\n", $1, $3, $4, $5}' | sort --numeric-sort -k5,5 | tail -n 15
echo
echo
echo
grep -r "cMarkAdStandalone::ProcessMarkOverlap(): overlap gap to marks are valid, before stop mark" --include "markad.log" $VIDEO | awk -F  " " '{printf "%s:%s:%s:%s\n", $1, $17, $21, $23}' | awk -F  ":" '{printf "%s -> before stop %s after start %s length %s \n", $1, $3, $4, $5}' | sort --numeric-sort -k8,8 | tail -n 15
echo
echo
echo
grep -r "cMarkAdStandalone::ProcessMarkOverlap(): overlap gap to marks are valid, before stop mark" --include "markad.log" $VIDEO | awk -F  " " '{printf "%s:%s:%s:%s\n", $1, $17, $21, $23}' | awk -F  ":" '{printf "%s ->  before stop %s after start %s length %s \n", $1, $3, $4, $5}' | sort -r --numeric-sort -k8,8 | tail -n 15
