]> git.sesse.net Git - ffmpeg/blobdiff - doc/bitstream_filters.texi
vf_dnn_processing: remove parameter 'fmt'
[ffmpeg] / doc / bitstream_filters.texi
index 5efb8e0ee886c6b7f87c909714aaae1d70a05f02..8fe5b3ad75968483af6d4aa93eeb8d77bd757640 100644 (file)
@@ -37,6 +37,61 @@ raw ADTS AAC or an MPEG-TS container to MP4A-LATM, to an FLV file, or
 to MOV/MP4 files and related formats such as 3GP or M4A. Please note
 that it is auto-inserted for MP4A-LATM and MOV/MP4 and related formats.
 
+@section av1_metadata
+
+Modify metadata embedded in an AV1 stream.
+
+@table @option
+@item td
+Insert or remove temporal delimiter OBUs in all temporal units of the
+stream.
+
+@table @samp
+@item insert
+Insert a TD at the beginning of every TU which does not already have one.
+@item remove
+Remove the TD from the beginning of every TU which has one.
+@end table
+
+@item color_primaries
+@item transfer_characteristics
+@item matrix_coefficients
+Set the color description fields in the stream (see AV1 section 6.4.2).
+
+@item color_range
+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).
+@table @samp
+@item tv
+Limited range.
+@item pc
+Full range.
+@end table
+
+@item chroma_sample_position
+Set the chroma sample location in the stream (see AV1 section 6.4.2).
+This can only be set for 4:2:0 streams.
+
+@table @samp
+@item vertical
+Left position (matching the default in MPEG-2 and H.264).
+@item colocated
+Top-left position.
+@end table
+
+@item tick_rate
+Set the tick rate (@emph{num_units_in_display_tick / time_scale}) in
+the timing info in the sequence header.
+@item num_ticks_per_picture
+Set the number of ticks in each picture, to indicate that the stream
+has a fixed framerate.  Ignored if @option{tick_rate} is not also set.
+
+@item delete_padding
+Deletes Padding OBUs.
+
+@end table
+
 @section chomp
 
 Remove zero padding at the end of a packet.
@@ -48,21 +103,24 @@ DTS-HD.
 
 @section dump_extra
 
-Add extradata to the beginning of the filtered packets.
+Add extradata to the beginning of the filtered packets except when
+said packets already exactly begin with the extradata that is intended
+to be added.
 
+@table @option
+@item freq
 The additional argument specifies which packets should be filtered.
 It accepts the values:
 @table @samp
-@item a
-add extradata to all key packets, but only if @var{local_header} is
-set in the @option{flags2} codec context field
-
 @item k
+@item keyframe
 add extradata to all key packets
 
 @item e
+@item all
 add extradata to all packets
 @end table
+@end table
 
 If not specified it is assumed @samp{k}.
 
@@ -74,6 +132,10 @@ the header stored in extradata to the key packets:
 ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
 @end example
 
+@section eac3_core
+
+Extract the core from a E-AC-3 stream, dropping extra channels.
+
 @section extract_extradata
 
 Extract the in-band extradata.
@@ -92,6 +154,60 @@ When this option is enabled, the long-term headers are removed from the
 bitstream after extraction.
 @end table
 
+@section filter_units
+
+Remove units with types in or not in a given set from the stream.
+
+@table @option
+@item pass_types
+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 '-'.
+
+@item remove_types
+Identical to @option{pass_types}, except the units in the given set
+removed and all others passed through.
+@end table
+
+Extradata is unchanged by this transformation, but note that if the stream
+contains inline parameter sets then the output may be unusable if they are
+removed.
+
+For example, to remove all non-VCL NAL units from an H.264 stream:
+@example
+ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT
+@end example
+
+To remove all AUDs, SEI and filler from an H.265 stream:
+@example
+ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
+@end example
+
+@section hapqa_extract
+
+Extract Rgb or Alpha part of an HAPQA file, without recompression, in order to create an HAPQ or an HAPAlphaOnly file.
+
+@table @option
+@item texture
+Specifies the texture to keep.
+
+@table @option
+@item color
+@item alpha
+@end table
+
+@end table
+
+Convert HAPQA to HAPQ
+@example
+ffmpeg -i hapqa_inputfile.mov -c copy -bsf:v hapqa_extract=texture=color -tag:v HapY -metadata:s:v:0 encoder="HAPQ" hapq_file.mov
+@end example
+
+Convert HAPQA to HAPAlphaOnly
+@example
+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
+@end example
+
 @section h264_metadata
 
 Modify metadata embedded in an H.264 stream.
@@ -108,6 +224,10 @@ Insert or remove AUD NAL units in all access units of the stream.
 @item sample_aspect_ratio
 Set the sample aspect ratio of the stream in the VUI parameters.
 
+@item overscan_appropriate_flag
+Set whether the stream is suitable for display using overscan
+or not (see H.264 section E.2.1).
+
 @item video_format
 @item video_full_range_flag
 Set the video format in the stream (see H.264 section E.2.1 and
@@ -153,6 +273,18 @@ possibly separated by hyphens, and the string can be anything.
 For example, @samp{086f3693-b7b3-4f2c-9653-21492feee5b8+hello} will
 insert the string ``hello'' associated with the given UUID.
 
+@item delete_filler
+Deletes both filler NAL units and filler SEI messages.
+
+@item level
+Set the level in the SPS.  Refer to H.264 section A.3 and tables A-1
+to A-5.
+
+The argument must be the name of a level (for example, @samp{4.2}), a
+level_idc value (for example, @samp{42}), or the special name @samp{auto}
+indicating that the filter should attempt to guess the level from the
+input stream properties.
+
 @end table
 
 @section h264_mp4toannexb
@@ -235,6 +367,15 @@ will replace the current ones if the stream is already cropped.
 These fields are set in pixels.  Note that some sizes may not be
 representable if the chroma is subsampled (H.265 section 7.4.3.2.1).
 
+@item level
+Set the level in the VPS and SPS.  See H.265 section A.4 and tables
+A.6 and A.7.
+
+The argument must be the name of a level (for example, @samp{5.1}), a
+@emph{general_level_idc} value (for example, @samp{153} for level 5.1),
+or the special name @samp{auto} indicating that the filter should
+attempt to guess the level from the input stream properties.
+
 @end table
 
 @section hevc_mp4toannexb
@@ -407,6 +548,72 @@ ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv
 @section null
 This bitstream filter passes the packets through unchanged.
 
+@section prores_metadata
+
+Modify color property metadata embedded in prores stream.
+
+@table @option
+@item color_primaries
+Set the color primaries.
+Available values are:
+
+@table @samp
+@item auto
+Keep the same color primaries property (default).
+
+@item unknown
+@item bt709
+@item bt470bg
+BT601 625
+
+@item smpte170m
+BT601 525
+
+@item bt2020
+@item smpte431
+DCI P3
+
+@item smpte432
+P3 D65
+
+@end table
+
+@item transfer_characteristics
+Set the color transfer.
+Available values are:
+
+@table @samp
+@item auto
+Keep the same transfer characteristics property (default).
+
+@item unknown
+@item bt709
+BT 601, BT 709, BT 2020
+@end table
+
+
+@item matrix_coefficients
+Set the matrix coefficient.
+Available values are:
+
+@table @samp
+@item auto
+Keep the same colorspace property (default).
+
+@item unknown
+@item bt709
+@item smpte170m
+BT 601
+
+@item bt2020nc
+@end table
+@end table
+
+Set Rec709 colorspace for each frame of the file
+@example
+ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
+@end example
+
 @section remove_extra
 
 Remove extradata from packets.
@@ -443,7 +650,40 @@ Log trace output containing all syntax elements in the coded stream
 headers (everything above the level of individual coded blocks).
 This can be useful for debugging low-level stream issues.
 
-Supports H.264, H.265 and MPEG-2.
+Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending
+on the build only a subset of these may be available.
+
+@section truehd_core
+
+Extract the core from a TrueHD stream, dropping ATMOS data.
+
+@section vp9_metadata
+
+Modify metadata embedded in a VP9 stream.
+
+@table @option
+@item color_space
+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.
+@table @samp
+@item unknown
+@item bt601
+@item bt709
+@item smpte170
+@item smpte240
+@item bt2020
+@item rgb
+@end table
+
+@item color_range
+Set the color range value in the frame header.  Note that any value
+imposed by the color space will take precedence over this value.
+@table @samp
+@item tv
+@item pc
+@end table
+@end table
 
 @section vp9_superframe