How to Append MP4 Chunks to a Single Blob in Azure Blob Storage Without Playback Issues?

I’m building a service using the MediaRecorder API to record a user’s webcam media stream. For compatibility, I’m using the MIME type video/mp4; codecs=avc1.64001F,mp4a.40.2 which supports recording and playback in both Chrome and Safari.

To prevent loss of recorded footage in case of unexpected interruptions (e.g., browser crash, power shutdown), I plan to upload each recorded chunk to Azure Blob Storage every second.

However, I want to manage the recording as a single video blob instead of creating multiple blobs for each start/stop of the recording session, simulating the feel of a single, uninterrupted video file. To achieve this, I’m considering using an append blob in Azure.

The issue is that this approach may result in playback issues due to metadata or timestamp conflicts within the merged chunks on Azure.

How can I resolve this problem?

(Note: I’d prefer not to use solutions involving ffmpeg, mp4box, or other WASM libraries due to dependency on user computer performance. Additionally, implementing a separate server for MP4 file merging is also a last-resort solution due to the added complexity.)