| 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 `\:`). |
| | 86 | If 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 | {{{ |
| | 89 | ffmpeg -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 | |