PyAV icon indicating copy to clipboard operation
PyAV copied to clipboard

Add flush method to OutputContainer to force a flush of the buffer

Open koenvo opened this issue 5 years ago • 2 comments

In some cases it's useful to force a flush of the current output buffer. The code is borrowed from the hlsenc.c

koenvo avatar Jan 25 '19 10:01 koenvo

Could you please elaborate on the "some cases"? Do you want to do this when closing the file? At other times?

Also it looks as though this only applies to the case where Python I/O is used, won't it crash if proxy.ptr.pb is not set?

jlaine avatar Jan 25 '19 12:01 jlaine

At other times. I want to use pyav to remux a live stream from one container format to another one (fMP4), and pass the output in real time to a downstream application. I want to package the output data per GOP.

Altho I need to use it with the Python I/O it also works when using av.open("filename.ext", "w").

koenvo avatar Jan 25 '19 13:01 koenvo

I don't really see a reason to have this

WyattBlue avatar Nov 12 '23 04:11 WyattBlue