[Ssc-dev] Redaction filter for ffmpeg.
Andrew Senior
andrew.senior at gmail.com
Thu Sep 1 20:48:11 EDT 2011
Hi Shawn,
I wrote a video filter (attached file) for ffmpeg that reads a text file
with redaction regions and timing and applies the redaction to the video.
I've only tried this on my windows laptop, not inside the android client
yet.
/* Use:
* put this file in the libavfilter directory
* add the line
REGISTER_FILTER (REDACT, redact, vf);
* to avfilter_register_all in libavfilter/allfilters.c,
* add
OBJS-$(CONFIG_REDACT_FILTER) += vf_redact.o
* to libavfilter/Makefile, and
CONFIG_REDACT_FILTER=yes
* to config.mak
*/
More "how-to" in the file
Sample command line- the parameter to the filter is just the filename of a
text file for now:
./ffmpeg.exe -i 'myvideo.mp4' -vf 'redact=redact_unsort.txt' -acodec copy
output.mp4
Here are a couple of sample config files:
# This is a set of coloured bars moving from left to right
# Each bar lasts for a second, overlapping for 0.5s with left and
# right neighbours.
# re-ordered to test the sorting of vf_redact
3,4,300,350,0,1000,white
0.5,1.5,50,100,0,1000,green
1.5,2.5,150,200,0,1000,blue
2,3,200,250,0,1000,cyan
3.5,4.5,350,400,0,1000,red
1,2,100,150,0,1000,yellow
4.5,5.5,450,500,0,1000,yellow
# another comment for testing
4,5,400,450,0,1000,green
2.5,3.5,250,300,0,1000,magenta
# another comment for testing
0,1,0,50,0,1000,red
0,3,50,400,50,100,pixel
2,4,150,200,100,150,pixel
3,6,150,500,200,310,pixel
1,5,100,400,150,200,red
5,9,0,70,0,80,green
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mayfirst.org/pipermail/ssc-dev/attachments/20110901/d248ada0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_redact.c
Type: text/x-csrc
Size: 10409 bytes
Desc: not available
URL: <http://lists.mayfirst.org/pipermail/ssc-dev/attachments/20110901/d248ada0/attachment.c>
More information about the Ssc-dev
mailing list