using gpac library, how to write only moof and mdat?

I am using this library : https://github.com/gpac/gpac
Full API documentation : https://doxygen.gpac.io/

I am trying to write m4a, m4v files like below
image

How to write only moof and mdat using Gpac Module API?

I am trying like below. but it failed to wrtie.

file_ptr = gf_isom_open("output.mp4", GF_ISOM_OPEN_WRITE, NULL);
gf_isom_set_brand_info(file_ptr, GF_ISOM_BRAND_MP42, 0);
gf_isom_setup_track_fragment
gf_isom_start_fragment
gf_isom_fragment_add_sample
fwrite((void*)&file_ptr->moof, 1, sizeof(GF_MovieFragmentBox), wfp);

It is right to find it myself, but time is urgent so please understand that I am asking questions.

Leave a Comment