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....

FFmpeg: Filtering and streamcopy cannot be used together.

Postby peter_b » Wed Jun 19, 2019 4:23 pm

[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
  • 0

User avatar
peter_b
Chatterbox
 
Posts: 302
Joined: Tue Nov 12, 2013 2:05 am
Reputation: 3

Return to Knowledge Base

Who is online

Users browsing this forum: No registered users and 3 guests

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: Google [Bot] and 25 guests

Reputation System ©'