I have file.mov
video. It has a lot of blank black color fragments that have different durations.
I need to replace black color fragments that show up for more than 5 seconds with transparency. Is that possible to add some alpha channel for that purpose?
Comment to Mulvya's answer:
Amazing solution. With #2 section everything ok.
With #1 section I created this code:
output=$(ffprobe -f lavfi -i "movie=file.mov,blackdetect=d=3.5" -show_entries tags=lavfi.black_start,lavfi.black_end -of compact=p=0 -v 0|awk '!/^$/')
echo $output
using awk '!/^$/'
to remove empty lines.
Here is the output I get:
tag:lavfi.black_start
repeats with same value several times, not having right structure with closing tag:lavfi.black_end
If I change blackdetect=d=3.5
to other value, for exaple d=10
, it outputs the same result as d=3.5
. How could I solve this issue having right tag:lavfi.black_start
,tag:lavfi.black_end
synthax with correct grepping d=
value?