splitmuxsink / mp4mux creating invalid fMP4 files
I've been trying to create adaptive HLS transcodes on a Jetson Nano and the HLS spec suggests fMP4 is the right container format for HEVC but it seems like 'moof' boxes aren't being output at all. I'm seeing what seems to be a corrupt 'd ' box instead.
I'm running a single decode with a set of video encodes and a copied audio track as follows:
/home/ubuntu/gst-1.16.0/bin/gst-launch-1.0 \
souphttpsrc is-live=true location="${URL}" ! \
tsparse set-timestamps=false ! tsdemux name=demux \
demux. ! queue2 ! mpegvideoparse ! omxmpeg2videodec ! tee name=vid \
demux. ! decodebin ! audioconvert ! avenc_ac3_fixed ! ac3parse ! tee name=audio \
splitmuxsink name=mux_1 location="${PREFIX}h265_1_%05d.mp4" max-size-time=2000000000 \
async-finalize=true muxer-factory=mp4mux muxer-properties="properties,streamable=true,fragment-duration=2000" send-keyframe-requests=true \
vid. ! nvvidconv ${RES} ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080" ! \
omxh265enc iframeinterval=60 control-rate=1 ! \
"video/x-h265, level=(string)high5" ! h265parse ! mux_1. \
audio. ! queue ! mux_1.audio_0
...
I have actually seen some valid files produced with moof boxes, but it's very rare. Can anyone tell me if I'm doing anything wrong? Based on gstqtmux.c, I am suspecting the code is writing to a bad offset somewhere, but my container knowledge is quite limited.