The following attributes are supported by "Media::Convert::Pipe".
inputs
The objects to read from. Must be "Media::Convert::Asset" objects. If more than one object is passed, a
value for the "map" attribute may be required to tell ffmpeg which audio/video stream to read from which
file.
More input objects can be added using the "add_input" method, and they can all be removed using the
"clear_inputs" object.
output
The object to write to. Must be a "Media::Convert::Asset" object. Required.
If any properties differ between the input objects and the output object (e.g., the codec, pixel format,
audio sample frequency, video resolution, etc etc etc), "Media::Convert::Pipe" will add the necessary
command-line options to the ffmpeg command line to convert the video from the input file to the output
file.
map
Array of "Media::Convert::Map" objects, used to manipulate which audio and video streams exactly will be
written to the output file (and in which order, etc).
For more info: see Media::Convert::Map.
Maps can be cleared with "clear_map" and added to with "add_map".
vcopy
Boolean. If true, explicitly tell "Media::Convert" to copy video without transcoding it.
Normally, "Media::Convert" should not request a transcode if all attributes of the input file and the
output file are exactly the same. Getting this right may sometimes be problematic, however. In such
cases, it can be good to explicitly say that the video should not be transcoded. That's what this
property is for.
acopy
The same as "vcopy", but for audio rather than video.
vskip
Tell "Media::Convert" that the output file should not contain any video (i.e., that it should skip
handling of any video). This is implied if the output container does not support video streams (e.g., the
.wav format), but is required if it does.
askip
The same as "vskip", but for audio rather than video.
multipass
Boolean. If true, the "run" method performs a two-pass encode, rather than a single-pass encode.
Two-pass encodes may generate a better end result, but require more time to perform.
progress
Normally, "Media::Convert::Pipe" shows (and runs) the ffmpeg command. Any output of the ffmpeg command
is shown on stdout.
If this attribute is set to a coderef, then the following happens:
The ffmpeg command line that is executed gains "-progress /dev/stdout" parameters
The output of the ffmpeg command is parsed, and the completion percentage calculated (and all other
output suppressed),
The coderef that was passed to this attribute is executed with the completion percentage as the only
parameter whenever the percentage changes.