You can refer to c++ code about saving output to file create_encode_file_bin in sources/apps/apps-common/src/deepstream_sink_bin.c
You just need modify it to python style.
You can refer to c++ code about saving output to file create_encode_file_bin in sources/apps/apps-common/src/deepstream_sink_bin.c
You just need modify it to python style.