Pipeline for giving an MP4 file as an input and save the output to an MP4 file in deepstream python apps test 3

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.