Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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 '13 at 16:24
    
Not only would the gigantic command line be useful; so would the gigantic console output. –  LordNeckbeard Jun 10 '13 at 18:01
add comment

1 Answer

up vote 1 down vote accepted

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

‘bsfs[/spec]’

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'
share|improve this answer
    
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 at 14:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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