Support SEI side_data parsing
Created by: choice17
Overview
Thank you for developing/maintaining pyav! I would like to make a feature request to support sei side data parsing for h264 hevc.
Existing FFmpeg API
FFmpeg is now support SEI type side_data for 4.3 https://github.com/FFmpeg/FFmpeg/blame/master/libavutil/frame.h#L187
However, there is no such enum / definition for SEI.
https://github.com/PyAV-Org/PyAV/blob/main/av/sidedata/sidedata.pyx#L18
Expected PyAV API
Example:
Refer to motion vector side data example in
https://github.com/PyAV-Org/PyAV/blob/main/tests/test_decode.py#L53
def frame_iter(video):
#streams = [s for s in video.streams if s.type == b'video']
#print(streams)
streams = video.streams.video
for packet in video.demux(streams):
print(packet, packet.buffer_size, packet.buffer_ptr,dir(packet))
for frame in packet.decode():
yield frame
video = av.open(sys.argv[1])
print(video, video.streams.video)
frames = frame_iter(video)
for frame in frames:
sei = frame.side_data.get(av.AV_FRAME_DATA_SEI_UNREGISTERED)
print(sei.data)
- FFmpeg:
version 4.3.X