Using h264 and aac, I've been trying to generate an mp4 and mpegts output in one command using the new tee muxer.

Either it complains about a lack of the aac_adtstoasc bsf, or if global_header is set a lack of the h264_mp4toannexb bsf. However, I can find no way to add a bsf for one output and not the other: adding it as usual applies to both outputs, and the muxer options (between []) do not accept bsfs.

Did the ffmpeg team a) document this feature poorly or b) render this combination of outputs impossible?

  • 1
    Before anyone asks, I'm pretty sure that if you can answer the question then my (gigantic) command line is not going to help.
    – OrangeDog
    Jun 10, 2013 at 16:24
  • Not only would the gigantic command line be useful; so would the gigantic console output.
    – llogan
    Jun 10, 2013 at 18:01

1 Answer 1


This is not possible in ffmpeg 2.0 or below. Support for bitstream filters with tee was added in 2.1.


Specify a list of bitstream filters to apply to the specified output. It is possible to specify to which streams a given bitstream filter applies, by appending a stream specifier to the option separated by /. If the stream specifier is not specified, the bistream filters will be applied to all streams in the output.

Several bitstream filters can be specified, separated by ","

-- Documentation

ffmpeg \
  -i in.mp4 \
  -c:v libx264 \
  -c:a libfaac \
  -flags +global_header \
  -bsf:v dump_extra \
  -map 0 \
  -f tee '[f=mp4:bsfs=aac_adtstoasc]out.mp4|[f=mpegts]out.ts'
  • N.B. for my setup, this was actually slower than three separate commands in sequence, so remember to test if you were assuming otherwise.
    – OrangeDog
    Mar 27, 2014 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.