transcode
Run a transcode end-to-end. Suspends until done.
Parameters
input file path
output file path
video encoder spec. Null (with videoCopy false) gives audio-only output and drops any input video. When set but the input has no video stream, this throws.
filter graph description applied to the video stream. Null passes decoded frames straight into the encoder. Requires spec.
stream-copy the video instead of re-encoding (-c:v copy): bit-exact and near-free. Combine it with audioSpec to keep the video and re-encode only the audio. Mutually exclusive with spec/videoFilter. Trimming a copied video stream is keyframe-snapped, not frame-exact.
audio encoder spec. Null (with audioCopy false) drops audio. When set but the input has no audio stream, the output is silently video-only.
filter chain for the audio stream (e.g. volume=0.5,atempo=1.25). Null means plain resample and reformat to what the encoder needs.
stream-copy the audio instead of re-encoding (-c:a copy): bit-exact, near-free. Mutually exclusive with audioSpec/audioFilter.
stream-copy every subtitle stream into the output. Works for subtitle codecs the output container accepts (mkv: almost all; mp4: mov_text). Otherwise the muxer raises a typed error.
trim start, relative to the start of the content (see MediaSource.startTimeMicros). Output begins at the first frame at or after this point: frame-exact for re-encoded streams, at the preceding keyframe for copied ones. Output timestamps are rebased to zero.
trim end, on the same content-relative scale. Demuxing stops once the lead stream passes this.
container tags written into the output header (title, artist, …)
invoked every ~30 encoded video frames (or ~100 audio frames when audio-only) with a TranscodeProgress
Run a transcode end-to-end. Suspends until done.
Parameters
input file path
output file path
video encoder spec. Null (with videoCopy false) gives audio-only output and drops any input video. When set but the input has no video stream, this throws.
filter graph description applied to the video stream. Null passes decoded frames straight into the encoder. Requires spec.
stream-copy the video instead of re-encoding (-c:v copy): bit-exact and near-free. Combine it with audioSpec to keep the video and re-encode only the audio. Mutually exclusive with spec/videoFilter. Trimming a copied video stream is keyframe-snapped, not frame-exact.
audio encoder spec. Null (with audioCopy false) drops audio. When set but the input has no audio stream, the output is silently video-only.
filter chain for the audio stream (e.g. volume=0.5,atempo=1.25). Null means plain resample and reformat to what the encoder needs.
stream-copy the audio instead of re-encoding (-c:a copy): bit-exact, near-free. Mutually exclusive with audioSpec/audioFilter.
stream-copy every subtitle stream into the output. Works for subtitle codecs the output container accepts (mkv: almost all; mp4: mov_text). Otherwise the muxer raises a typed error.
trim start, relative to the start of the content (see MediaSource.startTimeMicros). Output begins at the first frame at or after this point: frame-exact for re-encoded streams, at the preceding keyframe for copied ones. Output timestamps are rebased to zero.
trim end, on the same content-relative scale. Demuxing stops once the lead stream passes this.
container tags written into the output header (title, artist, …)
invoked every ~30 encoded video frames (or ~100 audio frames when audio-only) with a TranscodeProgress
Run a transcode end-to-end. Suspends until done.
Parameters
input file path
output file path
video encoder spec. Null (with videoCopy false) gives audio-only output and drops any input video. When set but the input has no video stream, this throws.
filter graph description applied to the video stream. Null passes decoded frames straight into the encoder. Requires spec.
stream-copy the video instead of re-encoding (-c:v copy): bit-exact and near-free. Combine it with audioSpec to keep the video and re-encode only the audio. Mutually exclusive with spec/videoFilter. Trimming a copied video stream is keyframe-snapped, not frame-exact.
audio encoder spec. Null (with audioCopy false) drops audio. When set but the input has no audio stream, the output is silently video-only.
filter chain for the audio stream (e.g. volume=0.5,atempo=1.25). Null means plain resample and reformat to what the encoder needs.
stream-copy the audio instead of re-encoding (-c:a copy): bit-exact, near-free. Mutually exclusive with audioSpec/audioFilter.
stream-copy every subtitle stream into the output. Works for subtitle codecs the output container accepts (mkv: almost all; mp4: mov_text). Otherwise the muxer raises a typed error.
trim start, relative to the start of the content (see MediaSource.startTimeMicros). Output begins at the first frame at or after this point: frame-exact for re-encoded streams, at the preceding keyframe for copied ones. Output timestamps are rebased to zero.
trim end, on the same content-relative scale. Demuxing stops once the lead stream passes this.
container tags written into the output header (title, artist, …)
invoked every ~30 encoded video frames (or ~100 audio frames when audio-only) with a TranscodeProgress
Run a transcode end-to-end. Suspends until done.
Parameters
input file path
output file path
video encoder spec. Null (with videoCopy false) gives audio-only output and drops any input video. When set but the input has no video stream, this throws.
filter graph description applied to the video stream. Null passes decoded frames straight into the encoder. Requires spec.
stream-copy the video instead of re-encoding (-c:v copy): bit-exact and near-free. Combine it with audioSpec to keep the video and re-encode only the audio. Mutually exclusive with spec/videoFilter. Trimming a copied video stream is keyframe-snapped, not frame-exact.
audio encoder spec. Null (with audioCopy false) drops audio. When set but the input has no audio stream, the output is silently video-only.
filter chain for the audio stream (e.g. volume=0.5,atempo=1.25). Null means plain resample and reformat to what the encoder needs.
stream-copy the audio instead of re-encoding (-c:a copy): bit-exact, near-free. Mutually exclusive with audioSpec/audioFilter.
stream-copy every subtitle stream into the output. Works for subtitle codecs the output container accepts (mkv: almost all; mp4: mov_text). Otherwise the muxer raises a typed error.
trim start, relative to the start of the content (see MediaSource.startTimeMicros). Output begins at the first frame at or after this point: frame-exact for re-encoded streams, at the preceding keyframe for copied ones. Output timestamps are rebased to zero.
trim end, on the same content-relative scale. Demuxing stops once the lead stream passes this.
container tags written into the output header (title, artist, …)
invoked every ~30 encoded video frames (or ~100 audio frames when audio-only) with a TranscodeProgress