You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to PyAV and trying to process an input container (highway.mp4, 15.1MB). I have attached the codec information extracted from VLC as an image.
My goal is to extract packets from the input and directly mux them into an output container (test_output.mp4) with a custom configuration (codec, FPS, height, width, etc.), without using the template argument in add_stream. However, the output video is generated with blank frames while retaining the same size and duration as the input.
I have tried different codecs and added various parameters, but the issue persists.
Additionally, I encountered another issue: the video_stream object is non-serializable.
Environment
for packet in input_.demux(in_stream):
if packet.dts is None:
continue
packet.stream = out_stream
output.mux(packet)
input_.close()
output.close()
Expected Behavior
The output video should contain valid frames, not blank ones.
The video_stream object should be serializable.
Actual Behavior
The output video has blank frames with the same size and duration as the input.
The video_stream object is non-serializable.
Steps Taken to Troubleshoot
Tried multiple codecs (mpeg4, libaom-av1, mp4v, avc1, libx264).
Tested different parameter configurations.
No success in resolving the blank frame issue.
Request for Help
What could be causing the blank frames in the output?
How can I serialize the video_stream object?
Any suggestions or corrections to my approach?
Activity