[FFmpeg-user] using an audio+video filter at the same time

Hans-Christoph Steiner hans at guardianproject.info
Wed Jul 18 02:33:12 CEST 2012


I'm trying to run an audio and video filter at the same time on a single
file, and am failing.  anyone have an example of how to do this?  I've
tried the lavfi approach and -filter:a and -vf

I'm using ffmpeg 0.10.4  on Linux Mint, built from source since I'm
trying to use our two custom filters af_aredact and vf_redact.

Here's my build info:
  configuration: --target-os=linux --enable-runtime-cpudetect
--enable-pic --disable-shared --enable-static --enable-small
--enable-version3 --enable-gpl --enable-memalign-hack --disable-doc
--enable-yasm --enable-decoder=mjpeg --enable-decoder=rawvideo
--enable-encoder=libx264 --enable-muxer=mp4 --enable-demuxer=image2
--enable-demuxer=mjpeg --enable-demuxer=mp4 --enable-demuxer=mov
--enable-parser=mjpeg --enable-filter=buffer --enable-filter=buffersink
--enable-filter=drawbox --enable-filter=overlay --enable-filter=redact
--enable-protocol=file --enable-hwaccels --enable-ffmpeg
--disable-ffplay --disable-ffprobe --disable-ffserver --disable-network
--enable-libx264 --enable-zlib --extra-cflags=-I../x264
--extra-ldflags=-L../x264


This works for the video filter and leaves the audio untouched:
./ffmpeg/ffmpeg -y -i test.mp4 \
    -filter:v 'redact=ffmpeg/redact_unsort.txt' \
    -acodec copy \
    output-test-vf_redact.mp4


This runs audio filter properly, but strips the video entirely:
./ffmpeg/ffmpeg \
    -f lavfi -i 'amovie=test.mp4,aredact=ffmpeg/aredact_unsort.txt' \
    -b:a 32k -strict experimental \
    -acodec aac -vcodec copy \
    -y output-test-af_aredact.mp4


This runs the video filter fine, but strips the audio entirely:
./ffmpeg/ffmpeg \
    -f lavfi -i 'amovie=test.mp4,aredact=ffmpeg/aredact_unsort.txt' \
    -f lavfi -i 'movie=test.mp4,redact=ffmpeg/redact_unsort.txt' \
    -acodec aac -b:a 32k -strict experimental \
    -vcodec libx264 -b:v 1000k -an -f mp4 \
    -y output-test-redact.mp4

.hc


More information about the ffmpeg-user mailing list