Video processing: precise audio trim and correct frame timeline boundaries
We fixed video-processing failures caused by tiny audio tail padding or a final frame timestamp rounding up past the video end. Extracted audio is now trimmed to the playable interval, frames receive correct millisecond timestamps, and the processing log shows clearer, safer error explanations.
The multimodal input pipeline now handles video timeline boundaries more precisely. What changed: extracted audio is resampled to 16 kHz, then trimmed by sample count to the end of the playable interval. The original track offset is retained, and shorter tracks are not padded with silence. This removes AAC decoder tail padding outside the playable interval without changing the recorded video duration. Frame presentation timestamps are translated into the original origin and assigned to their containing millisecond by flooring. Previously, half-up rounding could push a valid final timestamp past the excluded end of the [0, durationMs) timeline. Invalid negative, out-of-range, end-exclusive, or unrepresentable timestamps are still rejected. Safe server diagnostics now include source/run IDs and numeric bounds without media content, raw FFmpeg output, or sensitive data. The processing log also has clearer explanations for invalid frame-timestamp and final-frame-scan failures. Audio and frame stages were versioned so retries do not reuse incompatible artifacts. The update is covered by unit tests and optional local native tests using generated H.264/AAC MP4 fixtures; those native tests are skipped when FFmpeg/ffprobe are unavailable.