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
https://ffmpeg.org/ffmpeg-bitstream-filters.html: The list of available bitstream filters and their usage.
NvDecDecoder
: NVDEC decoding requires the input video packets to be Annex B.BSF
: Same operation but for streaming processing.