コンテンツにスキップ
#0917
ContainersExec

The transcode starts on the last write, not the first

A 64GB card offloads into the ingest folder over the edit bay's Wi-Fi. That is thousands of writes per file, and a transcode that starts on the first one produces garbage.

A watcher on the ingest path: recursive, include */.mxf, coalesce_ms 500. The kernel's inotify sees every write; the watcher folds them into one modified event per half second, each carrying new_size_bytes. The ingest script reads the SSE stream, and when a file's size has not moved for two events it hands the path to the transcode script, which the exec service caps at two at a time.

If the script's connection drops mid-offload, it reconnects with since_id and replays what it missed from the watcher's retained history.

No polling loop stat'ing the folder every ten seconds, no ".done" file convention the camera op forgets.

The pipeline starts on the last write, not the first.