Class AVMainOptions
- java.lang.Object
-
- com.github.vbauer.avconv4java.core.AVOptions
-
- com.github.vbauer.avconv4java.option.AVMainOptions
-
public class AVMainOptions extends AVOptions
Main options.- See Also:
- Official doc: "5.6 Main options"
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFLAG_ATTACHMENTstatic java.lang.StringFLAG_DATA_FRAMESstatic java.lang.StringFLAG_DUMP_ATTACHMENTstatic java.lang.StringFLAG_DURATIONstatic java.lang.StringFLAG_FILE_FORMATstatic java.lang.StringFLAG_FILE_SIZE_LIMITstatic java.lang.StringFLAG_FILTERstatic java.lang.StringFLAG_FILTER_SCRIPTstatic java.lang.StringFLAG_FRAMES_COUNTstatic java.lang.StringFLAG_IMMEDIATELY_EXITstatic java.lang.StringFLAG_INPUT_TIME_OFFSETstatic java.lang.StringFLAG_METADATAstatic java.lang.StringFLAG_OVERWRITE_OUTPUTstatic java.lang.StringFLAG_PRESETstatic java.lang.StringFLAG_QUALITY_SCALEstatic java.lang.StringFLAG_SEEKstatic java.lang.StringFLAG_TARGETstatic java.lang.StringFORMAT_METADATA
-
Constructor Summary
Constructors Constructor Description AVMainOptions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AVMainOptionsattachment(java.lang.String fileName)‘-attach filename (output)’ Add an attachment to the output file.AVMainOptionsbuilders(AVOptions... builders)AVMainOptionsbuilders(java.util.Collection<AVOptions> builders)static AVMainOptionscreate()AVMainOptionsdataFrames(java.lang.Long dataFrames)‘-dframes number (output)’ Set the number of data frames to record.AVMainOptionsdumpAttachment(AVStreamType streamType, java.lang.String fileName)‘-dump_attachment[:stream_specifier] filename (input,per-stream)’ Extract the matching attachment stream into a file named filename.AVMainOptionsdumpAttachment(java.lang.String fileName)AVMainOptionsduration(java.lang.Long duration)AVMainOptionsduration(java.lang.String duration)‘-t duration (output)’ Stop writing the output after its duration reaches duration.AVMainOptionsfileFormat(AVFileFormatType formatType)‘-f fmt (input/output)’ Force input or output file format.AVMainOptionsfileFormat(java.lang.String formatTypeName)AVMainOptionsfileSizeLimit(java.lang.Long fileSize)‘-fs limit_size (output)’ Set the file size limit.AVMainOptionsfilter(AVStreamType streamType, java.lang.String filter, java.lang.Object... params)‘-filter[:stream_specifier] filter_graph (output,per-stream)’ filter_graph is a description of the filter graph to apply to the stream.AVMainOptionsfilter(java.lang.String filter, java.lang.Object... params)AVMainOptionsfilterScript(AVStreamType streamType, java.lang.String fileName)‘-filter_script[:stream_specifier] filename (output,per-stream)’ This option is similar to ‘-filter’, the only difference is that its argument is the name of the file from which a filtergraph description is to be read.AVMainOptionsfilterScript(java.lang.String fileName)AVMainOptionsflags(java.lang.Object... flags)AVMainOptionsflags(java.util.Collection<java.lang.Object> flags)AVMainOptionsframesCount(AVStreamType streamType, java.lang.Long count)‘-frames[:stream_specifier] framecount (output,per-stream)’ Stop writing to the stream after framecount frames.AVMainOptionsframesCount(java.lang.Long count)AVMainOptionsimmediatelyExit()‘-n (global)’ Immediately exit when output files already exist.AVMainOptionsinputTimeOffset(java.lang.Double position)AVMainOptionsinputTimeOffset(java.lang.String position)‘-itsoffset offset (input)’ Set the input time offset in seconds.AVMainOptionsmetadata(java.lang.String key, java.lang.Object value)‘-metadata[:metadata_specifier] key=value (output,per-metadata)’ Set a metadata key/value pair.AVMainOptionsoverwriteOutput()‘-y (global)’ Overwrite output files without asking.AVMainOptionspreset(AVStreamType streamType, java.lang.String preset)‘-pre[:stream_specifier] preset_name (output,per-stream)’ Specify the preset for matching stream(s).AVMainOptionspreset(java.lang.String preset)AVMainOptionsqualityScale(AVStreamType streamType, java.lang.Double quality)‘-q[:stream_specifier] q (output,per-stream)’ ‘-qscale[:stream_specifier] q (output,per-stream)’ Use fixed quality scale (VBR).AVMainOptionsqualityScale(java.lang.Double quality)AVMainOptionsseek(java.lang.Double position)AVMainOptionsseek(java.lang.String position)‘-ss position (input/output)’ When used as an input option (before -i), seeks in this input file to position.AVMainOptionstarget(AVTargetFileType targetFileType)‘-target type (output)’ Specify target file type (vcd, svcd, dvd, dv, dv50).AVMainOptionstarget(java.lang.String targetFileTypeName)
-
-
-
Field Detail
-
FLAG_FILE_FORMAT
public static final java.lang.String FLAG_FILE_FORMAT
- See Also:
- Constant Field Values
-
FLAG_OVERWRITE_OUTPUT
public static final java.lang.String FLAG_OVERWRITE_OUTPUT
- See Also:
- Constant Field Values
-
FLAG_IMMEDIATELY_EXIT
public static final java.lang.String FLAG_IMMEDIATELY_EXIT
- See Also:
- Constant Field Values
-
FLAG_DURATION
public static final java.lang.String FLAG_DURATION
- See Also:
- Constant Field Values
-
FLAG_FILE_SIZE_LIMIT
public static final java.lang.String FLAG_FILE_SIZE_LIMIT
- See Also:
- Constant Field Values
-
FLAG_SEEK
public static final java.lang.String FLAG_SEEK
- See Also:
- Constant Field Values
-
FLAG_INPUT_TIME_OFFSET
public static final java.lang.String FLAG_INPUT_TIME_OFFSET
- See Also:
- Constant Field Values
-
FLAG_METADATA
public static final java.lang.String FLAG_METADATA
- See Also:
- Constant Field Values
-
FLAG_TARGET
public static final java.lang.String FLAG_TARGET
- See Also:
- Constant Field Values
-
FLAG_DATA_FRAMES
public static final java.lang.String FLAG_DATA_FRAMES
- See Also:
- Constant Field Values
-
FLAG_FRAMES_COUNT
public static final java.lang.String FLAG_FRAMES_COUNT
- See Also:
- Constant Field Values
-
FLAG_QUALITY_SCALE
public static final java.lang.String FLAG_QUALITY_SCALE
- See Also:
- Constant Field Values
-
FLAG_FILTER
public static final java.lang.String FLAG_FILTER
- See Also:
- Constant Field Values
-
FLAG_FILTER_SCRIPT
public static final java.lang.String FLAG_FILTER_SCRIPT
- See Also:
- Constant Field Values
-
FLAG_PRESET
public static final java.lang.String FLAG_PRESET
- See Also:
- Constant Field Values
-
FLAG_ATTACHMENT
public static final java.lang.String FLAG_ATTACHMENT
- See Also:
- Constant Field Values
-
FLAG_DUMP_ATTACHMENT
public static final java.lang.String FLAG_DUMP_ATTACHMENT
- See Also:
- Constant Field Values
-
FORMAT_METADATA
public static final java.lang.String FORMAT_METADATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static AVMainOptions create()
-
flags
public AVMainOptions flags(java.util.Collection<java.lang.Object> flags)
-
flags
public AVMainOptions flags(java.lang.Object... flags)
-
builders
public AVMainOptions builders(java.util.Collection<AVOptions> builders)
-
builders
public AVMainOptions builders(AVOptions... builders)
-
fileFormat
public AVMainOptions fileFormat(AVFileFormatType formatType)
‘-f fmt (input/output)’ Force input or output file format. The format is normally autodetected for input files and guessed from file extension for output files, so this option is not needed in most cases.
-
fileFormat
public AVMainOptions fileFormat(java.lang.String formatTypeName)
-
overwriteOutput
public AVMainOptions overwriteOutput()
‘-y (global)’ Overwrite output files without asking.
-
immediatelyExit
public AVMainOptions immediatelyExit()
‘-n (global)’ Immediately exit when output files already exist.
-
duration
public AVMainOptions duration(java.lang.String duration)
‘-t duration (output)’ Stop writing the output after its duration reaches duration. duration may be a number in seconds, or in hh:mm:ss[.xxx] form.
-
duration
public AVMainOptions duration(java.lang.Long duration)
-
fileSizeLimit
public AVMainOptions fileSizeLimit(java.lang.Long fileSize)
‘-fs limit_size (output)’ Set the file size limit.
-
seek
public AVMainOptions seek(java.lang.String position)
‘-ss position (input/output)’ When used as an input option (before -i), seeks in this input file to position. Note the in most formats it is not possible to position exactly, so avconv will position to the closest position point before position. When transcoding and ‘-accurate_seek’ is enabled (the default), this extra segment between the position 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 filename), decodes but discards input until the timestamps reach position. position may be either in seconds or in hh:mm:ss[.xxx] form.
-
seek
public AVMainOptions seek(java.lang.Double position)
-
inputTimeOffset
public AVMainOptions inputTimeOffset(java.lang.String position)
‘-itsoffset offset (input)’ Set the input time offset in seconds. [-]hh:mm:ss[.xxx] syntax is also supported. The offset is added to the timestamps of the input files. Specifying a positive offset means that the corresponding streams are delayed by offset seconds.
-
inputTimeOffset
public AVMainOptions inputTimeOffset(java.lang.Double position)
-
metadata
public AVMainOptions metadata(java.lang.String key, java.lang.Object value)
‘-metadata[:metadata_specifier] key=value (output,per-metadata)’ Set a metadata key/value pair. An optional metadata_specifier may be given to set metadata on streams or chapters. See -map_metadata documentation for details. This option overrides metadata set with -map_metadata. It is also possible to delete metadata by using an empty value. For example, for setting the title in the output file: avconv -i in.avi -metadata title="my title" out.flv To set the language of the first audio stream: avconv -i INPUT -metadata:s:a:0 language=eng OUTPUT
-
dataFrames
public AVMainOptions dataFrames(java.lang.Long dataFrames)
‘-dframes number (output)’ Set the number of data frames to record. This is an alias for -frames:d.
-
target
public AVMainOptions target(AVTargetFileType targetFileType)
‘-target type (output)’ Specify target file type (vcd, svcd, dvd, dv, dv50). type may be prefixed with pal-, ntsc- or film- to use the corresponding standard. All the format options (bitrate, codecs, buffer sizes) are then set automatically. You can just type: avconv -i myfile.avi -target vcd /tmp/vcd.mpg Nevertheless you can specify additional options as long as you know they do not conflict with the standard, as in: avconv -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
-
target
public AVMainOptions target(java.lang.String targetFileTypeName)
-
framesCount
public AVMainOptions framesCount(AVStreamType streamType, java.lang.Long count)
‘-frames[:stream_specifier] framecount (output,per-stream)’ Stop writing to the stream after framecount frames.
-
framesCount
public AVMainOptions framesCount(java.lang.Long count)
-
qualityScale
public AVMainOptions qualityScale(AVStreamType streamType, java.lang.Double quality)
‘-q[:stream_specifier] q (output,per-stream)’ ‘-qscale[:stream_specifier] q (output,per-stream)’ Use fixed quality scale (VBR). The meaning of q is codec-dependent.
-
qualityScale
public AVMainOptions qualityScale(java.lang.Double quality)
-
filter
public AVMainOptions filter(AVStreamType streamType, java.lang.String filter, java.lang.Object... params)
‘-filter[:stream_specifier] filter_graph (output,per-stream)’ filter_graph is a description of the filter graph to apply to the stream. Use -filters to show all the available filters (including also sources and sinks). See also the ‘-filter_complex’ option if you want to create filter graphs with multiple inputs and/or outputs.
-
filter
public AVMainOptions filter(java.lang.String filter, java.lang.Object... params)
-
filterScript
public AVMainOptions filterScript(AVStreamType streamType, java.lang.String fileName)
‘-filter_script[:stream_specifier] filename (output,per-stream)’ This option is similar to ‘-filter’, the only difference is that its argument is the name of the file from which a filtergraph description is to be read.
-
filterScript
public AVMainOptions filterScript(java.lang.String fileName)
-
preset
public AVMainOptions preset(AVStreamType streamType, java.lang.String preset)
‘-pre[:stream_specifier] preset_name (output,per-stream)’ Specify the preset for matching stream(s).
-
preset
public AVMainOptions preset(java.lang.String preset)
-
attachment
public AVMainOptions attachment(java.lang.String fileName)
‘-attach filename (output)’ Add an attachment to the output file. This is supported by a few formats like Matroska for e.g. fonts used in rendering subtitles. Attachments are implemented as a specific type of stream, so this option will add a new stream to the file. It is then possible to use per-stream options on this stream in the usual way. Attachment streams created with this option will be created after all the other streams (i.e. those created with -map or automatic mappings). Note that for Matroska you also have to set the mimetype metadata tag: avconv -i INPUT -attach DejaVuSans.ttf -metadata:s:2 mimetype=application/x-truetype-font out.mkv (assuming that the attachment stream will be third in the output file).
-
dumpAttachment
public AVMainOptions dumpAttachment(AVStreamType streamType, java.lang.String fileName)
‘-dump_attachment[:stream_specifier] filename (input,per-stream)’ Extract the matching attachment stream into a file named filename. If filename is empty, then the value of the filename metadata tag will be used. E.g. to extract the first attachment to a file named ’out.ttf’: avconv -dump_attachment:t:0 out.ttf INPUT To extract all attachments to files determined by the filename tag: avconv -dump_attachment:t "" INPUT Technical note – attachments are implemented as codec extradata, so this option can actually be used to extract extradata from any stream, not just attachments.
-
dumpAttachment
public AVMainOptions dumpAttachment(java.lang.String fileName)
-
-