Changes between Version 18 and Version 19 of Creating multiple outputs


Ignore:
Timestamp:
Sep 9, 2016, 3:32:36 AM (3 years ago)
Author:
llogan
Comment:

add a tee select example

Legend:

Unmodified
Added
Removed
Modified
  • Creating multiple outputs

    v18 v19  
    7777The [https://ffmpeg.org/ffmpeg-formats.html#tee tee pseudo-muxer] was added to `ffmpeg` on 2013-02-03, and allows you to duplicate the output to multiple files with a single instance of `ffmpeg`.
    7878
     79The example below outputs an MKV file, and a UDP stream. Streams are separated by the `|` symbol. Options can be applied to an individual output: `[f=mpegts]` is equivalent to `-f mpegts` in a normal ffmpeg command-line. Multiple options can be separated with a `:`, which means that any `:` have to be escaped (so use `\:`).
     80
    7981{{{
    8082ffmpeg -i input.file -c:v libx264 -c:a mp2 \
     
    8284}}}
    8385
    84 The above outputs an MKV file, and a UDP stream. Streams are separated by the `|` symbol. Options can be applied to an individual output: `[f=mpegts]` is equivalent to `-f mpegts` in a normal ffmpeg command-line. Multiple options can be separated with a `:`, which means that any `:` have to be escaped (so use `\:`).
     86If you want to choose specific streams then use the `stream` option. In this next example there are various video streams being used by various outputs, but they will all use the same audio stream. Otherwise you would have to unnecessarily re-encode the same audio multiple times.
     87
     88{{{
     89ffmpeg -i input -filter_complex \
     90"[0:v]split=2[s0][s1]; \
     91 [s0]negate[v0]; \
     92 [s1]vflip[v1]" \
     93-map "[v0]" -map "[v1]" -map 0:a -c:v libx264 -c:a aac -f tee \
     94"[select=\'v:0,a\']local0.mkv| \
     95 [select=\'v:0,a\':f=flv]rtmp://server0/app/instance/playpath| \
     96 [select=\'v:1,a\']local1.mkv| \
     97 [select=\'v:1,a\':f=flv]rtmp://server1/app/instance/playpath"
     98}}}
     99
     100
    85101
    86102=== Piped processes ===