]> git.sesse.net Git - ffmpeg/blobdiff - doc/muxers.texi
Merge commit '64ed397635ef2666b0ca0c8d8c60a8bc44581d82'
[ffmpeg] / doc / muxers.texi
index 965a4bb12419aef7b2454e8ba74111873fad026b..4b11908f79a74cccd742a6b14b0f9a8a6489919e 100644 (file)
@@ -645,7 +645,7 @@ of the generated segments. May not work with some combinations of
 muxers/codecs. It is set to @code{0} by default.
 @end table
 
-@section Examples
+@subsection Examples
 
 @itemize
 @item
@@ -727,10 +727,11 @@ Write an mp3 with an ID3v2.3 header and an ID3v1 footer:
 ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3
 @end example
 
-Attach a picture to an mp3:
+To attach a picture to an mp3 file select both the audio and the picture stream
+with @code{map}:
 @example
-ffmpeg -i input.mp3 -i cover.png -c copy -metadata:s:v title="Album cover"
--metadata:s:v comment="Cover (Front)" out.mp3
+ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1
+-metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3
 @end example
 
 @section ogg
@@ -748,4 +749,39 @@ situations, giving a small seek granularity at the cost of additional container
 overhead.
 @end table
 
+@section tee
+
+The tee muxer can be used to write the same data to several files or any
+other kind of muxer. It can be used, for example, to both stream a video to
+the network and save it to disk at the same time.
+
+It is different from specifying several outputs to the @command{ffmpeg}
+command-line tool because the audio and video data will be encoded only once
+with the tee muxer; encoding can be a very expensive process. It is not
+useful when using the libavformat API directly because it is then possible
+to feed the same packets to several muxers directly.
+
+The slave outputs are specified in the file name given to the muxer,
+separated by '|'. If any of the slave name contains the '|' separator,
+leading or trailing spaces or any special character, it must be
+@ref{quoting_and_escaping, escaped}.
+
+Options can be specified for each slave by prepending them as a list of
+@var{key}=@var{value} pairs separated by ':', between square brackets. If
+the options values contain a special character or the ':' separator, they
+must be @ref{quoting_and_escaping, escaped}; note that this is a second
+level escaping.
+
+Example: encode something and both archive it in a WebM file and stream it
+as MPEG-TS over UDP:
+
+@example
+ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee
+  "archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
+@end example
+
+Note: some codecs may need different options depending on the output format;
+the auto-detection of this can not work with the tee muxer. The main example
+is the @option{global_header} flag.
+
 @c man end MUXERS