FFmpeg: Filtering and streamcopy cannot be used together.

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 370
Joined: Tue Nov 12, 2013 2:05 am

FFmpeg: Filtering and streamcopy cannot be used together.

Post by peter_b »

[PROBLEM]
I was trying to generate framemd5 for video and audio in one step:

Code: Select all

$ ffmpeg -i bars.mov -map 0 -c copy -flags +ildct+ilme -field_order bb rewrap.mkv \
-an -f framemd5 bars.video.framemd5 \
-vn -c:a pcm_s24le -filter_complex "asetnsamples=n=48000" -f framemd5 bars.audio.framemd5
But the part for audio (that included "-filter_complex") triggers this error message:
Streamcopy requested for output stream 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used together.
This error message suggests that FFmpeg thinks "filter_complex" is to be applied to video too (stream 0:0), but we only want to apply it to audio.
How to tell FFmpeg that we don't touch video, but only want to group the audio samples for frameMD5 hashing them?


[SOLUTION]
It seems that "-filter_complex" for audio can be replaced by "-af" (audio filter) to make this work:

Code: Select all

$ ffmpeg -i bars.mov -map 0 -c copy -flags +ildct+ilme -field_order bb rewrap.mkv \
-an -f framemd5 bars.video.framemd5 \
-vn -c:a pcm_s24le -af "asetnsamples=n=48000" -f framemd5 bars.audio.framemd5
Works! :D
Post Reply