Skip to content

Compressed bitstream rewriter

Register name used to load filter: bsrw
This filter is not checked during graph resolution and needs explicit loading.
Filters of this class can connect to each-other.

This filter rewrites some metadata of various bitstream formats.
The filter can currently modify the following properties in video bitstreams:

  • MPEG-4 Visual:

    • sample aspect ratio
    • profile and level
  • AVC|H264, HEVC and VVC:

    • sample aspect ratio
    • profile, level, profile compatibility
    • video format, video fullrange
    • color primaries, transfer characteristics and matrix coefficients (or remove all info)
  • ProRes:

    • sample aspect ratio
    • color primaries, transfer characteristics and matrix coefficients

Values are by default initialized to -1, implying to keep the related info (present or not) in the bitstream.
A sar value of 0/0 will remove sample aspect ratio info from bitstream if possible.

The filter can currently modify the following properties in the stream configuration but not in the bitstream:

  • HEVC: profile IDC, profile space, general compatibility flags
  • VVC: profile IDC, general profile and level indication

The filter will work in passthrough mode for all other codecs and media types.

Options

cprim (cprm, default: -1, Enum: reserved0|BT709|undef|reserved3|BT470M|BT470G|SMPTE170|SMPTE240|FILM|BT2020|SMPTE428|SMPTE431|SMPTE432|EBU3213, updatable): color primaries according to ISO/IEC 23001-8 / 23091-2

ctfc (ctfc, default: -1, Enum: reserved0|BT709|undef|reserved3|BT470M|BT470BG|SMPTE170|SMPTE249|Linear|Log100|Log316|IEC61966|BT1361|sRGB|BT2020_10|BT2020_12|SMPTE2084|SMPTE428|STDB67, updatable): color transfer characteristics according to ISO/IEC 23001-8 / 23091-2

cmx (cmxc, default: -1, Enum: GBR|BT709|undef|FCC|BT601|SMPTE170|SMPTE240|YCgCo|BT2020|BT2020cl|YDzDx, updatable): color matrix coeficients according to ISO/IEC 23001-8 / 23091-2

sar (frac, default: -1/-1, updatable): aspect ratio to rewrite

m4vpl (sint, default: -1, updatable): set ProfileLevel for MPEG-4 video part two

fullrange (bool, default: false, updatable): video full range flag

novsi (bool, default: false, updatable): remove video_signal_type from VUI in AVC|H264 and HEVC

novuitiming (bool, default: false, updatable): remove timing_info from VUI in AVC|H264 and HEVC

prof (sint, default: -1, updatable): profile indication for AVC|H264

lev (sint, default: -1, updatable): level indication for AVC|H264, level_idc for VVC

pcomp (sint, default: -1, updatable): profile compatibility for AVC|H264

pidc (sint, default: -1, updatable): profile IDC for HEVC and VVC

pspace (sint, default: -1, updatable): profile space for HEVC

gpcflags (sint, default: -1, updatable): general compatibility flags for HEVC

rmsei (bool, default: false, updatable): remove SEI messages from bitstream for AVC|H264, HEVC and VVC

vidfmt (enum, default: -1, updatable): video format for AVC|H264, HEVC and VVC (component|pal|ntsc|secam|mac|undef)

Was this page helpful?