ffmpeg

package
v2.0.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultArgs

func DefaultArgs() []string

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand() *Command

func (Command) Args

func (c Command) Args() []string

func (*Command) Run

func (c *Command) Run(ctx context.Context) error

func (*Command) Start

func (c *Command) Start(ctx context.Context) (<-chan progress.Progress, error)

func (*Command) Wait

func (c *Command) Wait() error

func (*Command) WithAbortOn

func (c *Command) WithAbortOn(a string) *Command

WithAbortOn Stop and abort on various conditions. The following flags are available:

empty_output: No packets were passed to the muxer, the output is empty.

empty_output_stream: No packets were passed to the muxer in some of the output streams.

func (*Command) WithAccurateSeek

func (c *Command) WithAccurateSeek() *Command

WithAccurateSeek this option enables or disables accurate seeking in input files with the -ss option. It is enabled by default, so seeking is accurate when transcoding. Use -noaccurate_seek to disable it, which may be useful e.g. when copying some streams and transcoding the others.

func (*Command) WithApad

func (c *Command) WithApad(a string) *Command

WithApad pad the output audio stream(s). This is the same as applying -af apad. Argument is a string of filter parameters composed the same as with the apad filter. -shortest must be set for this output for the option to take effect.

func (*Command) WithAspectRatio

func (c *Command) WithAspectRatio(aspect string) *Command

WithAspectRatio set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)

func (*Command) WithAttachment

func (c *Command) WithAttachment(filename string) *Command

WithAttachment adds an attachment to the output file.

func (*Command) WithAudioBitstreamFilters

func (c *Command) WithAudioBitstreamFilters(filters string) *Command

WithAudioBitstreamFilters sets the audio bitstream filters.

func (*Command) WithAudioChannelLayout

func (c *Command) WithAudioChannelLayout(layout string) *Command

WithAudioChannelLayout sets the channel layout.

func (*Command) WithAudioChannels

func (c *Command) WithAudioChannels(channels int) *Command

WithAudioChannels sets the number of audio channels.

func (*Command) WithAudioCodec

func (c *Command) WithAudioCodec(codec string) *Command

WithAudioCodec sets the audio codec.

func (*Command) WithAudioDriftThreshold

func (c *Command) WithAudioDriftThreshold(threshold int) *Command

WithAudioDriftThreshold sets the audio drift threshold.

func (*Command) WithAudioFilters

func (c *Command) WithAudioFilters(filters string) *Command

WithAudioFilters creates a complex filtergraph.

func (*Command) WithAudioFrames

func (c *Command) WithAudioFrames(frames int) *Command

WithAudioFrames sets the number of audio frames to record.

func (*Command) WithAudioGuessLayoutMax

func (c *Command) WithAudioGuessLayoutMax(max int) *Command

WithAudioGuessLayoutMax sets the maximum number of channels to try to guess the channel layout.

func (*Command) WithAudioPad

func (c *Command) WithAudioPad() *Command

WithAudioPad adds "padding" audio frames.

func (*Command) WithAudioPreset

func (c *Command) WithAudioPreset(preset string) *Command

WithAudioPreset sets the audio options to the indicated preset.

func (*Command) WithAudioProfile

func (c *Command) WithAudioProfile(profile string) *Command

WithAudioProfile sets the audio profile.

func (*Command) WithAudioQuality

func (c *Command) WithAudioQuality(quality int) *Command

WithAudioQuality sets the audio quality.

func (*Command) WithAudioRate

func (c *Command) WithAudioRate(rate int) *Command

WithAudioRate sets the audio sampling rate.

func (*Command) WithAudioSampleFormat

func (c *Command) WithAudioSampleFormat(format string) *Command

WithAudioSampleFormat sets the sample format.

func (*Command) WithAudioTag

func (c *Command) WithAudioTag(tag string) *Command

WithAudioTag sets the audio tag.

func (*Command) WithAutoConversionFilters

func (c *Command) WithAutoConversionFilters() *Command

WithAutoConversionFilters enable automatically inserting format conversion filters in all filter graphs, including those defined by -vf, -af, -filter_complex and -lavfi. If filter format negotiation requires a conversion, the initialization of the filters will fail. Conversions can still be performed by inserting the relevant conversion filter (scale, aresample) in the graph. On by default, to explicitly disable it you need to specify -noauto_conversion_filters.

func (*Command) WithBinPath

func (c *Command) WithBinPath(binPath string) *Command

WithBinPath sets the path to the ffmpeg binary.

func (*Command) WithBitexact

func (c *Command) WithBitexact() *Command

WithBitexact enable bitexact mode for (de)muxer and (de/en)coder

func (*Command) WithBitsPerRawSample

func (c *Command) WithBitsPerRawSample(b string) *Command

WithBitsPerRawSample declare the number of bits per raw sample in the given output stream to be value. Note that this option sets the information provided to the encoder/muxer, it does not change the stream to conform to this value. Setting values that do not match the stream properties may result in encoding failures or invalid output files.

func (*Command) WithBitstreamFilters

func (c *Command) WithBitstreamFilters(filters string) *Command

WithBitstreamFilters sets bitstream filters for matching streams.

func (*Command) WithBsf

func (c *Command) WithBsf(b string) *Command

WithBsf set bitstream filters for matching streams. bitstream_filters is a comma-separated list of bitstream filters. Use the -bsfs option to get the list of bitstream filters.

func (*Command) WithChannel

func (c *Command) WithChannel(channel string) *Command

WithChannel deprecated, use -channel

func (*Command) WithChromaIntraMatrix

func (c *Command) WithChromaIntraMatrix(matrix string) *Command

WithChromaIntraMatrix specify intra matrix coeffs

func (*Command) WithCodec

func (c *Command) WithCodec(codec string) *Command

WithCodec selects an encoder (when used before an output file) or a decoder (when used before an input file) for one or more streams. Codec is the name of a decoder/encoder or a special value copy (output only) to indicate that the stream is not to be re-encoded.

func (*Command) WithCopyInitialNonKeyframes

func (c *Command) WithCopyInitialNonKeyframes() *Command

WithCopyInitialNonKeyframes copies non-keyframes initially.

func (*Command) WithCopyOrDiscardFramesBeforeStartTime

func (c *Command) WithCopyOrDiscardFramesBeforeStartTime() *Command

WithCopyOrDiscardFramesBeforeStartTime copies or discards frames before start time.

func (*Command) WithCopyTB

func (c *Command) WithCopyTB(mode string) *Command

WithCopyTB copies input stream time base when stream copying.

func (*Command) WithCopyTS

func (c *Command) WithCopyTS() *Command

WithCopyTS copies timestamps.

func (*Command) WithCopyUnknown

func (c *Command) WithCopyUnknown() *Command

WithCopyUnknown allow input streams with unknown type to be copied instead of failing if copying such streams is attempted.

func (*Command) WithCopytb

func (c *Command) WithCopytb(m string) *Command

WithCopytb specify how to set the encoder timebase when stream copying. mode is an integer numeric value, and can assume one of the following values:

func (*Command) WithCopyts

func (c *Command) WithCopyts() *Command

WithCopyts do not process input timestamps, but keep their values without trying to sanitize them. In particular, do not remove the initial start time offset value.

func (*Command) WithDC

func (c *Command) WithDC(precision int) *Command

WithDC precision intra_dc_precision

func (*Command) WithDTSDeltaThreshold

func (c *Command) WithDTSDeltaThreshold(threshold int) *Command

WithDTSDeltaThreshold sets the timestamp discontinuity delta threshold.

func (*Command) WithDTSErrorThreshold

func (c *Command) WithDTSErrorThreshold(threshold int) *Command

WithDTSErrorThreshold sets the timestamp error delta threshold.

func (*Command) WithDataFrames

func (c *Command) WithDataFrames(number int) *Command

WithDataFrames set the number of data frames to record.

func (*Command) WithDebugTS

func (c *Command) WithDebugTS() *Command

WithDebugTS prints timestamp debugging info.

func (*Command) WithDeinterlace

func (c *Command) WithDeinterlace() *Command

WithDeinterlace this option is deprecated, use the yadif filter instead

func (*Command) WithDisableAudio

func (c *Command) WithDisableAudio() *Command

WithDisableAudio disables audio.

func (*Command) WithDisableData

func (c *Command) WithDisableData() *Command

WithDisableData disable data

func (*Command) WithDisableVideo

func (c *Command) WithDisableVideo() *Command

WithDisableVideo disable video

func (*Command) WithDiscard

func (c *Command) WithDiscard(d string) *Command

WithDiscard allows discarding specific streams or frames from streams. Any input stream can be fully discarded, using value all whereas selective discarding of frames from a stream occurs at the demuxer and is not supported by all demuxers.

func (*Command) WithDiscardThreshold

func (c *Command) WithDiscardThreshold(discard int) *Command

WithIntra deprecated use -g 1

func (*Command) WithDtsDeltaThreshold

func (c *Command) WithDtsDeltaThreshold(d string) *Command

WithDtsDeltaThreshold timestamp discontinuity delta threshold, expressed as a decimal number of seconds.

func (*Command) WithDtsErrorThreshold

func (c *Command) WithDtsErrorThreshold(d string) *Command

WithDtsErrorThreshold timestamp error delta threshold, expressed as a decimal number of seconds.

func (*Command) WithDump

func (c *Command) WithDump() *Command

WithDump dump each input packet to stderr.

func (*Command) WithDuration

func (c *Command) WithDuration(duration string) *Command

WithDuration when used as an input option (before -i), limit the duration of data read from the input file. When used as an output option (before an output url), stop writing the output after its duration reaches duration. duration must be a time duration specification, see (ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual. -to and -t are mutually exclusive and -t has priority.

func (*Command) WithEncTimeBase

func (c *Command) WithEncTimeBase(e string) *Command

WithEncTimeBase set the encoder timebase. timebase can assume one of the following values:

func (*Command) WithExtractAttachment

func (c *Command) WithExtractAttachment(filename string) *Command

WithExtractAttachment extracts an attachment into a file.

func (*Command) WithFilter

func (c *Command) WithFilter(filter string) *Command

WithFilter sets stream filtergraph.

func (*Command) WithFilterComplex

func (c *Command) WithFilterComplex(f string) *Command

WithFilterComplex define a complex filtergraph, i.e. one with arbitrary number of inputs and/or outputs. For simple graphs – those with one input and one output of the same type – see the -filter options. filtergraph is a description of the filtergraph, as described in the “Filtergraph syntax” section of the ffmpeg-filters manual.

func (*Command) WithFilterComplexScript

func (c *Command) WithFilterComplexScript(f string) *Command

WithFilterComplexScript this option is similar to -filter_complex, the only difference is that its argument is the name of the file from which a complex filtergraph description is to be read.

func (*Command) WithFilterComplexThreads

func (c *Command) WithFilterComplexThreads(f string) *Command

WithFilterComplexThreads defines how many threads are used to process a filter_complex graph. Similar to filter_threads but used for -filter_complex graphs only. The default is the number of available CPUs.

func (*Command) WithFilterScript

func (c *Command) WithFilterScript(filename string) *Command

WithFilterScript sets read stream filtergraph description from a file.

func (*Command) WithFilterThreads

func (c *Command) WithFilterThreads(threads int) *Command

WithFilterThreads sets the number of non-complex filter threads.

func (*Command) WithFixedQualityScale

func (c *Command) WithFixedQualityScale(q int) *Command

WithFixedQualityScale sets fixed quality scale (VBR).

func (*Command) WithForceCodecTag

func (c *Command) WithForceCodecTag(tag string) *Command

WithForceCodecTag forces codec tag/fourcc.

func (*Command) WithForceDataCodec

func (c *Command) WithForceDataCodec(codec string) *Command

WithForceDataCodec forces data codec (‘copy’ to copy stream).

func (*Command) WithForceFPS

func (c *Command) WithForceFPS() *Command

WithForceFPS force the selected framerate, disable the best supported framerate selection

func (*Command) WithForceKeyFrames

func (c *Command) WithForceKeyFrames(timestamps string) *Command

WithForceKeyFrames force key frames at specified timestamps

func (*Command) WithFpsMode

func (c *Command) WithFpsMode(v string) *Command

WithFpsMode set video sync method.

func (*Command) WithFrameDropThreshold

func (c *Command) WithFrameDropThreshold(f string) *Command

WithFrameDropThreshold set frame drop threshold, which specifies how much behind video frames can be before they are dropped. In frame rate units, so 1.0 is one frame. The default is -1.1. One possible usecase is to avoid framedrops in case of noisy timestamps or to increase frame drop precision in case of exact timestamps.

func (*Command) WithFrameRate

func (c *Command) WithFrameRate(rate string) *Command

WithFrameRate set frame rate (Hz value, fraction or abbreviation)

func (*Command) WithFrameSize

func (c *Command) WithFrameSize(size string) *Command

WithFrameSize set frame size (WxH or abbreviation)

func (*Command) WithFrames

func (c *Command) WithFrames(number int) *Command

WithFrames sets the number of frames to record.

func (*Command) WithHLSKeyInfoPath

func (c *Command) WithHLSKeyInfoPath(path string) *Command

func (*Command) WithHLSSegmentFilename

func (c *Command) WithHLSSegmentFilename(filename string) *Command

func (*Command) WithHLSSegmentListSize

func (c *Command) WithHLSSegmentListSize(size int) *Command

func (*Command) WithHLSSegmentListType

func (c *Command) WithHLSSegmentListType(typ string) *Command

func (*Command) WithHLSSegmentStartNumber

func (c *Command) WithHLSSegmentStartNumber(number int) *Command

func (*Command) WithHLSSegmentTime

func (c *Command) WithHLSSegmentTime(seconds int) *Command

func (*Command) WithHWAccel

func (c *Command) WithHWAccel(name string) *Command

WithHWAccel use HW accelerated decoding

func (*Command) WithHWAccelDevice

func (c *Command) WithHWAccelDevice(device string) *Command

WithHWAccelDevice select a device for HW accelerationdevicename

func (*Command) WithHex

func (c *Command) WithHex() *Command

WithHex when dumping packets, also dump the payload.

func (*Command) WithISync

func (c *Command) WithISync() *Command

WithISync assigns an input as a sync source.

func (*Command) WithIgnoreUnknown

func (c *Command) WithIgnoreUnknown() *Command

WithIgnoreUnknown ignore input streams with unknown type instead of failing if copying such streams is attempted.

func (*Command) WithInitialDemuxDecodeDelay

func (c *Command) WithInitialDemuxDecodeDelay(seconds int) *Command

WithInitialDemuxDecodeDelay sets initial demux-decode delay.

func (*Command) WithInputPath

func (c *Command) WithInputPath(path string) *Command

WithInputPath sets the input path to the given path.

func (*Command) WithInputPipe

func (c *Command) WithInputPipe(r io.Reader) *Command

WithInputPipe sets the input pipe reader (stdin).

func (*Command) WithInputTsOffset

func (c *Command) WithInputTsOffset(offset string) *Command

WithInputTsOffset set the input ts offset.

func (*Command) WithInputTsScale

func (c *Command) WithInputTsScale(scale string) *Command

WithInputTsScale set the input ts scale.

func (*Command) WithInterMatrix

func (c *Command) WithInterMatrix(matrix string) *Command

WithInterMatrix specify inter matrix coeffs

func (*Command) WithIntraMatrix

func (c *Command) WithIntraMatrix(matrix string) *Command

WithIntraMatrix specify intra matrix coeffs

func (*Command) WithLavfi

func (c *Command) WithLavfi(l string) *Command

WithLavfi define a complex filtergraph, i.e. one with arbitrary number of inputs and/or outputs. Equivalent to -filter_complex.

func (*Command) WithLimitFileSize

func (c *Command) WithLimitFileSize(size int) *Command

WithOutputLimitFileSize sets the file size limit, expressed in bytes. No further chunk of bytes is written after the limit is exceeded. The size of the output file is slightly more than the requested file size.

func (*Command) WithMap

func (c *Command) WithMap(m string) *Command

WithMap creates one or more streams in the output file. This option has two forms for specifying the data source(s): the first selects one or more streams from some input file (specified with -i), the second takes an output from some complex filtergraph (specified with -filter_complex or -filter_complex_script).

func (*Command) WithMapChannel

func (c *Command) WithMapChannel(m string) *Command

WithMapChannel creates an audio channel from a given input to an output. If output_file_id.stream_specifier is not set, the audio channel will be mapped on all the audio streams.

func (*Command) WithMapChapters

func (c *Command) WithMapChapters(m string) *Command

WithMapChapters copy chapters from input file with index input_file_index to the next output file. If no chapter mapping is specified, then chapters are copied from the first input file with at least one chapter. Use a negative file index to disable any chapter copying.

func (*Command) WithMapMetadata

func (c *Command) WithMapMetadata(m string) *Command

WithMapMetadata sets metadata information of the next output file from infile. Note that those are file indices (zero-based), not filenames. Optional metadata_spec_in/out parameters specify, which metadata to copy. A metadata specifier can have the following forms:

func (*Command) WithMaxAlloc

func (c *Command) WithMaxAlloc(bytes int) *Command

WithMaxAlloc sets the maximum size of a single allocated block.

func (*Command) WithMaxBitrate

func (c *Command) WithMaxBitrate(bitrate int) *Command

WithMaxBitrate sets the max bitrate in kbit/s.

func (*Command) WithMaxErrorRate

func (c *Command) WithMaxErrorRate(m string) *Command

WithMaxErrorRate set fraction of decoding frame failures across all inputs which when crossed ffmpeg will return exit code 69. Crossing this threshold does not terminate processing. Range is a floating-point number between 0 to 1. Default is 2/3.

func (*Command) WithMaxMuxingQueueSize

func (c *Command) WithMaxMuxingQueueSize(m string) *Command

WithMaxMuxingQueueSize when transcoding audio and/or video streams, ffmpeg will not begin writing into the output until it has one packet for each such stream. While waiting for that to happen, packets for other streams are buffered. This option sets the size of this buffer, in packets, for the matching output stream.

func (*Command) WithMaximumDemuxDecodeDelay

func (c *Command) WithMaximumDemuxDecodeDelay(seconds int) *Command

WithMaximumDemuxDecodeDelay sets maximum demux-decode delay.

func (*Command) WithMetadata

func (c *Command) WithMetadata(metadata string) *Command

WithMetadata sets metadata information to the output file.

func (*Command) WithMuxdelay

func (c *Command) WithMuxdelay(m string) *Command

WithMuxdelay set the maximum demux-decode delay.

func (*Command) WithMuxingQueueDataThreshold

func (c *Command) WithMuxingQueueDataThreshold(m string) *Command

WithMuxingQueueDataThreshold this is a minimum threshold until which the muxing queue size is not taken into account. Defaults to 50 megabytes per stream, and is based on the overall size of packets passed to the muxer.

func (*Command) WithMuxpreload

func (c *Command) WithMuxpreload(m string) *Command

WithMuxpreload set the initial demux-decode delay.

func (*Command) WithOutputFormat

func (c *Command) WithOutputFormat(format string) *Command

WithOutputFormat sets the output format to the given format.

func (*Command) WithOutputPath

func (c *Command) WithOutputPath(path string) *Command

WithInputFormat sets the input format to the given format.

func (*Command) WithOutputPipe

func (c *Command) WithOutputPipe(w io.Writer) *Command

WithOutputPipe sets the output pipe writer to the given writer (stdout)

func (*Command) WithPSNR

func (c *Command) WithPSNR() *Command

WithPSNR calculate PSNR of compressed frames

func (*Command) WithPass

func (c *Command) WithPass(pass int) *Command

WithPass select the pass number (1 to 3)

func (*Command) WithPassLogFile

func (c *Command) WithPassLogFile(prefix string) *Command

WithPassLogFile select two pass log file name prefix

func (*Command) WithPixelFormat

func (c *Command) WithPixelFormat(format string) *Command

WithPixelFormat set pixel format

func (*Command) WithPreset

func (c *Command) WithPreset(preset string) *Command

WithPreset sets the preset for matching stream(s).

func (*Command) WithPresetFile

func (c *Command) WithPresetFile(filename string) *Command

WithPresetFile sets the preset file for matching stream(s).

func (*Command) WithQPHist

func (c *Command) WithQPHist() *Command

WithQPHist show QP histogram

func (*Command) WithRateControlOverride

func (c *Command) WithRateControlOverride(override string) *Command

WithRateControlOverride override rate control override for specific intervals

func (*Command) WithReadInputAtNativeFrameRate

func (c *Command) WithReadInputAtNativeFrameRate() *Command

WithReadInputAtNativeFrameRate reads input at native frame rate.

func (*Command) WithRecastMedia

func (c *Command) WithRecastMedia() *Command

WithRecastMedia forces a decoder of a different media type than the one detected or designated by the demuxer. Useful for decoding media data muxed as data streams.

func (*Command) WithReinitFilter

func (c *Command) WithReinitFilter() *Command

WithReinitFilter reinit filtergraph on input parameter changes.

func (*Command) WithReport

func (c *Command) WithReport() *Command

WithReport enables the ffmpeg report.

func (*Command) WithSdpFile

func (c *Command) WithSdpFile(s string) *Command

WithSdpFile print sdp information for an output stream to file. This allows dumping sdp information when at least one output isn’t an rtp stream. (Requires at least one of the output formats to be rtp).

func (*Command) WithSeekTimestamp

func (c *Command) WithSeekTimestamp() *Command

WithSeekTimestamp this option enables or disables seeking by timestamp in input files with the -ss option. It is disabled by default. If enabled, the argument to the -ss option is considered an actual timestamp, and is not offset by the start time of the file. This matters only for files which do not start from timestamp 0, such as transport streams.

func (*Command) WithShortest

func (c *Command) WithShortest() *Command

WithShortest finish encoding when the shortest output stream ends.

func (*Command) WithShortestBufDuration

func (c *Command) WithShortestBufDuration(s string) *Command

WithShortestBufDuration the -shortest option may require buffering potentially large amounts of data when at least one of the streams is "sparse" (i.e. has large gaps between frames – this is typically the case for subtitles).

func (*Command) WithStartAtZero

func (c *Command) WithStartAtZero() *Command

WithStartAtZero when used with copyts, shift input timestamps so they start at zero.

func (*Command) WithStartTimeOffset

func (c *Command) WithStartTimeOffset(offset string) *Command

WithStartTimeOffset when used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved. When used as an output option (before an output url), decodes but discards input until the timestamps reach position.

func (*Command) WithStatsEncPost

func (c *Command) WithStatsEncPost(s string) *Command

WithStatsEncPost write per-frame encoding information about the matching streams into the file given by path.

func (*Command) WithStatsEncPostFmt

func (c *Command) WithStatsEncPostFmt(s string) *Command

WithStatsEncPostFmt specify the format for the lines written with -stats_enc_pre / -stats_enc_post / -stats_mux_pre.

func (*Command) WithStatsEncPre

func (c *Command) WithStatsEncPre(s string) *Command

WithStatsEncPre write per-frame encoding information about the matching streams into the file given by path.

func (*Command) WithStatsEncPreFmt

func (c *Command) WithStatsEncPreFmt(s string) *Command

WithStatsEncPreFmt specify the format for the lines written with -stats_enc_pre / -stats_enc_post / -stats_mux_pre.

func (*Command) WithStatsMuxPre

func (c *Command) WithStatsMuxPre(s string) *Command

WithStatsMuxPre write per-frame encoding information about the matching streams into the file given by path.

func (*Command) WithStatsMuxPreFmt

func (c *Command) WithStatsMuxPreFmt(s string) *Command

WithStatsMuxPreFmt specify the format for the lines written with -stats_enc_pre / -stats_enc_post / -stats_mux_pre.

func (*Command) WithStopTime

func (c *Command) WithStopTime(time string) *Command

WithStopTime stop writing the output or reading the input at position. position must be a time duration specification.

func (*Command) WithStreamID

func (c *Command) WithStreamID(s string) *Command

WithStreamID assign a new stream-id value to an output stream. This option should be specified prior to the output filename to which it applies. For the situation where multiple output files exist, a streamid may be reassigned to a different value.

func (*Command) WithStreamLoop

func (c *Command) WithStreamLoop(number int) *Command

WithStreamLoop sets number of times input stream shall be looped. Loop 0 means no loop, loop -1 means infinite loop.

func (*Command) WithTVStandard

func (c *Command) WithTVStandard(standard string) *Command

WithTVStandard deprecated, use -standard

func (*Command) WithTag

func (c *Command) WithTag(t string) *Command

WithTag force a tag/fourcc for matching streams.

func (*Command) WithTarget

func (c *Command) WithTarget(typ string) *Command

WithTarget sets the target file type.

func (*Command) WithThreadQueueSize

func (c *Command) WithThreadQueueSize(t string) *Command

WithThreadQueueSize for input, this option sets the maximum number of queued packets when reading from the file or device. With low latency / high rate live streams, packets may be discarded if they are not read in a timely manner; setting this value can force ffmpeg to use a separate input thread and read packets as soon as they arrive. By default ffmpeg only does this if multiple inputs are specified.

func (*Command) WithTimeCode

func (c *Command) WithTimeCode(timecode string) *Command

WithTimeCode set initial TimeCode value.

func (*Command) WithTimeLimit

func (c *Command) WithTimeLimit(seconds int) *Command

WithTimeLimit sets the max runtime in seconds.

func (*Command) WithTimecode

func (c *Command) WithTimecode(t string) *Command

WithTimecode specify Timecode for writing. SEP is ’:’ for non drop timecode and ’;’ (or ’.’) for drop.

func (*Command) WithTimelimit

func (c *Command) WithTimelimit(t string) *Command

WithTimelimit exit after ffmpeg has been running for duration seconds in CPU user time.

func (*Command) WithTimestamp

func (c *Command) WithTimestamp(timestamp string) *Command

WithTimestamp sets the recording timestamp in the container.

func (*Command) WithTop

func (c *Command) WithTop(top int) *Command

WithTop top=1/bottom=0/auto=-1 field first

func (*Command) WithVStatsFile

func (c *Command) WithVStatsFile(file string) *Command

WithVStatsFile dumps video coding statistics to file.

func (*Command) WithVideoBitrate

func (c *Command) WithVideoBitrate(bitrate string) *Command

WithVideoBitrate set video bitrate (please use -b:v)

func (*Command) WithVideoBitstreamFilters

func (c *Command) WithVideoBitstreamFilters(filters string) *Command

WithVideoBitstreamFilters deprecated

func (*Command) WithVideoCodec

func (c *Command) WithVideoCodec(codec string) *Command

WithVideoCodec force video codec (‘copy’ to copy stream)

func (*Command) WithVideoFilters

func (c *Command) WithVideoFilters(filters string) *Command

WithVideoFilters set video filters

func (*Command) WithVideoFrames

func (c *Command) WithVideoFrames(frames int) *Command

WithVideoFrames set the number of video frames to record

func (*Command) WithVideoPreset

func (c *Command) WithVideoPreset(preset string) *Command

WithVideoPreset set the video options to the indicated preset

func (*Command) WithVideoProfile

func (c *Command) WithVideoProfile(profile string) *Command

func (*Command) WithVideoStats

func (c *Command) WithVideoStats() *Command

WithVideoStats dump video coding statistics to file

func (*Command) WithVideoStatsFile

func (c *Command) WithVideoStatsFile(file string) *Command

WithVideoStatsFile dump video coding statistics to file

func (*Command) WithVideoSync

func (c *Command) WithVideoSync(v string) *Command

WithVideoSync set video sync method.

func (*Command) WithVideoTag

func (c *Command) WithVideoTag(tag string) *Command

WithVideoTag force video tag/fourcc

func (*Command) WithVolume

func (c *Command) WithVolume(volume int) *Command

WithVolume sets the audio volume.

func (*Command) WithXError

func (c *Command) WithXError() *Command

WithXError exits on error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL