[FFmpeg-user] post-encode stream mapping

Reuben Martin reuben.m at gmail.com
Sat Apr 12 20:07:11 CEST 2014


On Wednesday, April 09, 2014 08:20:06 AM Carl Eugen Hoyos wrote:
> Reuben Martin <reuben.m <at> gmail.com> writes:
> > Is it possible to map an encoded stream to multiple
> > muxers for the purpose of encoding once for multiple
> > outputs?
> 
> Did you test the tee muxer?
> 
 
I looked at the tee muxer, but it seems to have limits in how it can be used from the CLI. Perhaps I don't understand how to use it correctly.

Here's what I use currently:

ffmpeg -fflags +genpts -i rtmp://src/strm \
    -c:a libfdk_aac -vbr 3 -ac 2 -ar 48000 \
    -c:v libx264 -g 31 -crf 20 -profile:v high -preset:v medium -trellis 2 -s 1280x720 -f flv -rtmp_live live rtmp://127.0.0.1/publish/hd \
    -c:a libfdk_aac -vbr 3 -ac 2 -ar 48000 \
    -c:v libx264 -g 31 -crf 22 -profile:v high -preset:v medium -trellis 2 -s 640x360 -f flv  -rtmp_live live rtmp://127.0.0.1/publish/sd \
    -c:a libfdk_aac -vbr 3 -ac 2 -ar 48000 \
    -c:v libx264 -g 31 -crf 24 -profile:v high -preset:v fast -trellis 2 -s 320x180 -f flv -rtmp_live live rtmp://127.0.0.1/publish/ld



I'm not sure how I could use tee to only encode audio once. In theory it should work, but how I would instruct the CLI to do that mapping is not clear.

-Reuben


More information about the ffmpeg-user mailing list