-
Notifications
You must be signed in to change notification settings - Fork 425
Closed as not planned
Labels
Description
Overview
I would like to be able to add side data to Frames. Specifically closed caption data (Type.A53_CC).
Existing FFmpeg API
Expected PyAV API
I would like to add side data to selected frames, for example by adding a new API Frame.side_data.add().
Example (modified examples/numpy/generate_video.py):
stream = container.add_stream("libx264", rate=fps)
...
for frame_i in range(total_frames):
...
frame = av.VideoFrame.from_ndarray(img, format="rgb24")
if (frame_i % fps) == 0:
# Add closed caption
data = bytearray()
...
frame.side_data.add(data, Type.A53_CC)
Investigation
I tried the attached patches to generate video with 608 style closed captions by modifying the generate video example.
I didn't manage to get the Frame.side_data updated correctly.