spdl.io.apply_bsf

apply_bsf(packets: AudioPackets, bsf: str) AudioPackets[source]
apply_bsf(packets: VideoPackets, bsf: str) VideoPackets
apply_bsf(packets: ImagePackets, bsf: str) ImagePackets

Apply bit stream filter to packets.

The primal usecase of BFS in SPDL is to convert the H264 video packets to Annex B for video decoding.

Example - One-off demuxing

src = “foo.mp4” packets = spdl.io.demux_video(src) packets = spdl.io.apply_bsf(packets)

Parameters:
  • packets – Packets (audio/video/image) object

  • bsf – A bitstream filter description.

See also