Class AVMainOptions

    • Constructor Detail

      • AVMainOptions

        public AVMainOptions()
    • Method Detail

      • 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)