Sortix 1.1dev nightly manual
This manual documents Sortix 1.1dev nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUTBelow is a description of the currently available bitstream filters, with their parameters, if any.
- Insert or remove temporal delimiter OBUs in all temporal units of the stream.
- Insert a TD at the beginning of every TU which does not already have one.
- Remove the TD from the beginning of every TU which has one.
- Set the color description fields in the stream (see AV1 section 6.4.2).
- Set the color range in the stream (see AV1 section 6.4.2; note that this cannot be set for streams using BT.709 primaries, sRGB transfer characteristic and identity (RGB) matrix coefficients).
- Limited range.
- Full range.
- Set the chroma sample location in the stream (see AV1 section 6.4.2). This can only be set for 4:2:0 streams.
- Left position (matching the default in MPEG-2 and H.264).
- Top-left position.
- Set the tick rate (num_units_in_display_tick / time_scale) in the timing info in the sequence header.
- Set the number of ticks in each picture, to indicate that the stream has a fixed framerate. Ignored if tick_rate is not also set.
- Deletes Padding OBUs.
- The additional argument specifies which packets should be filtered. It accepts the values:
- add extradata to all key packets
- add extradata to all packets
ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
- When this option is enabled, the long-term headers are removed from the bitstream after extraction.
- List of unit types or ranges of unit types to pass through while removing all others. This is specified as a '|'-separated list of unit type values or ranges of values with '-'.
- Identical to pass_types, except the units in the given set removed and all others passed through.
ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUTTo remove all AUDs, SEI and filler from an H.265 stream:
ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
- Specifies the texture to keep.
ffmpeg -i hapqa_inputfile.mov -c copy -bsf:v hapqa_extract=texture=color -tag:v HapY -metadata:s:v:0 encoder="HAPQ" hapq_file.movConvert HAPQA to HAPAlphaOnly
ffmpeg -i hapqa_inputfile.mov -c copy -bsf:v hapqa_extract=texture=alpha -tag:v HapA -metadata:s:v:0 encoder="HAPAlpha Only" hapalphaonly_file.mov
- Insert or remove AUD NAL units in all access units of the stream.
- Set the sample aspect ratio of the stream in the VUI parameters.
- Set whether the stream is suitable for display using overscan or not (see H.264 section E.2.1).
- Set the video format in the stream (see H.264 section E.2.1 and table E-2).
- Set the colour description in the stream (see H.264 section E.2.1 and tables E-3, E-4 and E-5).
- Set the chroma sample location in the stream (see H.264 section E.2.1 and figure E-1).
- Set the tick rate (num_units_in_tick / time_scale) in the VUI parameters. This is the smallest time unit representable in the stream, and in many cases represents the field rate of the stream (double the frame rate).
- Set whether the stream has fixed framerate - typically this indicates that the framerate is exactly half the tick rate, but the exact meaning is dependent on interlacing and the picture structure (see H.264 section E.2.1 and table E-6).
- Set the frame cropping offsets in the SPS. These values
will replace the current ones if the stream is already cropped.
- Insert a string as SEI unregistered user data. The argument
must be of the form UUID+string, where the UUID is as hex digits
possibly separated by hyphens, and the string can be anything.
- Deletes both filler NAL units and filler SEI messages.
- Set the level in the SPS. Refer to H.264 section A.3 and
tables A-1 to A-5.
ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.tsPlease note that this filter is auto-inserted for MPEG-TS (muxer "mpegts") and raw H.264 (muxer "h264") output formats.
- Insert or remove AUD NAL units in all access units of the stream.
- Set the sample aspect ratio in the stream in the VUI parameters.
- Set the video format in the stream (see H.265 section E.3.1 and table E.2).
- Set the colour description in the stream (see H.265 section E.3.1 and tables E.3, E.4 and E.5).
- Set the chroma sample location in the stream (see H.265 section E.3.1 and figure E.1).
- Set the tick rate in the VPS and VUI parameters (num_units_in_tick / time_scale). Combined with num_ticks_poc_diff_one, this can set a constant framerate in the stream. Note that it is likely to be overridden by container parameters when the stream is in a container.
- Set poc_proportional_to_timing_flag in VPS and VUI and use this value to set num_ticks_poc_diff_one_minus1 (see H.265 sections 220.127.116.11 and E.3.1). Ignored if tick_rate is not also set.
- Set the conformance window cropping offsets in the SPS.
These values will replace the current ones if the stream is already
- Set the level in the VPS and SPS. See H.265 section A.4 and
tables A.6 and A.7.
ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.tsPlease note that this filter is auto-inserted for MPEG-TS (muxer "mpegts") and raw HEVC/H.265 (muxer "h265" or "hevc") output formats.
ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpgUnfortunately, these chunks are incomplete JPEG images, because they lack the DHT segment required for decoding. Quoting from < http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml>: Avery Lee, writing in the rec.video.desktop newsgroup in 2001, commented that "MJPEG, or at least the MJPEG in AVIs having the MJPG fourcc, is restricted JPEG with a fixed -- and *omitted* -- Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2, and it must use basic Huffman encoding, not arithmetic or progressive. . . . You can indeed extract the MJPEG frames and decode them with a regular JPEG decoder, but you have to prepend the DHT segment to them, or else the decoder won't have any idea how to decompress the data. The exact table necessary is given in the OpenDML spec." This bitstream filter patches the header of frames extracted from an MJPEG stream (carrying the AVI1 header ID and lacking a DHT segment) to produce fully qualified JPEG images.
ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg exiftran -i -9 frame*.jpg ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
- Set the display aspect ratio in the stream.
- Set the frame rate in the stream. This is constructed from a table of known values combined with a small multiplier and divisor - if the supplied value is not exactly representable, the nearest representable value will be used instead (see H.262 section 6.3.3 and table 6-4).
- Set the video format in the stream (see H.262 section 6.3.6 and table 6-6).
- Set the colour description in the stream (see H.262 section 6.3.6 and tables 6-7, 6-8 and 6-9).
ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
- A numeral string, whose value is related to how often output bytes will be modified. Therefore, values below or equal to 0 are forbidden, and the lower the more frequent bytes will be modified, with 1 meaning every byte is modified.
- A numeral string, whose value is related to how often packets will be dropped. Therefore, values below or equal to 0 are forbidden, and the lower the more frequent packets will be dropped, with 1 meaning every packet is dropped.
ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv
- nb_out_samples, n
- Set the number of samples per each output audio packet. The number is intended as the number of samples per each channel. Default value is 1024.
- pad, p
- If set to 1, the filter will pad the last audio packet with silence, so that it will contain the same number of samples (or roughly the same number of samples, see frame_rate) as the previous ones. Default value is 1.
- frame_rate, r
- This option makes the filter output a fixed number of packets per second instead of a fixed number of samples per packet. If the audio sample rate is not divisible by the frame rate then the number of samples will not be constant but will vary slightly so that each packet will start as close to the frame boundary as possible. Using this option has precedence over nb_out_samples.
ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
- Set the color primaries. Available values are:
- Keep the same color primaries property (default).
- BT601 625
- BT601 525
- DCI P3
- P3 D65
- Set the color transfer. Available values are:
- Keep the same transfer characteristics property (default).
- BT 601, BT 709, BT 2020
- SMPTE ST 2084
- ARIB STD-B67
- Set the matrix coefficient. Available values are:
- Keep the same colorspace property (default).
- BT 601
ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.movSet Hybrid Log-Gamma parameters for each frame of the file
ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov
- Set which frame types to remove extradata from.
- Remove extradata from non-keyframes only.
- Remove extradata from keyframes only.
- e, all
- Remove extradata from all frames.
- Set the color space value in the frame header. Note that any frame set to RGB will be implicitly set to PC range and that RGB is incompatible with profiles 0 and 2.
- Set the color range value in the frame header. Note that any value imposed by the color space will take precedence over this value.