A transcoding session carries no TranscodingInfo, so the dashboard names no reason #178
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by clicking through the throwaway instance in
TESTCONTAINER/whileplaying an episode in the pinned web client.
What it looks like
The dashboard's device card shows the title and the progress bar, and nothing
else. Its Transcoding dialog reads
with nothing under the heading. Upstream lists the reason there, and the card
carries the codecs and the bitrate.
What answers
GET /Sessionswhile an episode is playing over HLS:There is no
TranscodingInfokey at all — polled six times over nine seconds,absent every time — while
/videos/{id}/hls1/main/{n}.mp4segments were beingserved and
ffmpegwas running (FFmpeg.DirectStream-…lognames a job with-codec:v:0 copy … -codec:a:0 libfdk_aac).Why
encoding()(crates/ephyra-http/src/routes/session/sessions.rs:194) looks thejob up in the encoder registry by the session's device id and answers
Nonewhen nothing is filed under it, so the mapping — not the shape — is what is
missing.
map::session::transcodingand the DTO already exist, andcrates/ephyra-http/tests/writes.rs:279asserts a non-nullTranscodingInfo,so the route is right and the registry is not reached for a job started this
way.
Where to start
Whether an HLS job registers under the device id the session carries. The unit
coverage passes, so the gap is between the streaming route that starts the job
and the registry
encoding()reads.How to know it is done
/Sessionsduring an HLS play carriesTranscodingInfowith the codecs, thecontainer, the bitrate,
IsVideoDirect/IsAudioDirectandTranscodeReasons,and the dashboard's Transcoding dialog names a reason. A harness scenario that
plays and then reads
/Sessionswould hold this.House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin. Generated artifacts are regenerated, never edited.Fixed in
67fd44e, with two rounds of review fixes inde308acand28bdd65.The cause was not the reporting but the lifetime: a transcode races to the end
of the file long before the client has watched it — two minutes of ffmpeg for a
thirty-minute episode — and the moment it exited,
Jobs::by_devicestoppedanswering for the device, so the dashboard's Transcoding dialog emptied while
the client was still reading segments off disk.
Measured against the reference at the pin: a progressive transcode of a
five-second file leaves
TranscodingInfoon the session for as long as the joblives, with no ffmpeg process left. Upstream reports the job once more as it
exits (
OnFfMpegProcessExited→ReportTranscodingProgress).What puts it away is what the client says next. Upstream clears the device on a
report that is not a transcode and on one that says it stopped — and a running
encoder re-reports itself a moment later, so the clearing only sticks once
ffmpeg has exited. Both halves matter: the first pass at this suppressed an HLS
remux, which reports
DirectStreamfor its whole playback and which upstreamdescribes throughout.