An ffmpeg log is not named the way upstream names one #182
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?
Minor, found in the dashboard's Logs list.
An ffmpeg job writes its log as
Upstream writes
—
TranscodeManager.StartFfMpeg,upstream/MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs:451-467.The prefix itself is right: this job copied the video and encoded the audio, and
upstream calls that
DirectStream-too (Remux-only when both are copies).What differs is everything after it. Ours names the job; upstream names the
clock, the source and a fresh guid, so the list a dashboard shows sorts by when
a play happened and two plays of one source never share a name.
How to know it is done
The log a play leaves is named the way upstream names it, and the Logs list
orders and reads the same against both servers.
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
c2ed437, with the review's findings inbdfc113.Measured rather than read: the reference instance at the pin was made to
transcode and wrote
which is what
log_file_namenow spells. Three things the review corrected ontop of the first pass:
Upstream interpolates its parameter, so a request that named none leaves the
field blank between two underscores; ours filled it in.
test pins the whole name. It asserted only the lengths of the parts before,
which a
%d-%m-%Yor a UTC clock would both have passed.is false — only the progressive one does.
GET /Videos/{A}/hls1/main/0.ts?mediaSourceId={B}starts a job here where upstream throws. That is a separate difference and is
not this issue.
One thing this makes matter that did not before: a name is now unique per start
rather than per output path, so nothing overwrites and the directory grows.
sweep_logsanswersOk(0)— the Clean Log Directory task deletes nothing —which is the next thing to look at.
Correction to the note above: the log sweeper is not a stub.
sweep_logsanswering
Ok(0)isNoHousekeeping, the null implementation a server builtwith no directories is given. The real one is
crates/ephyra-server/src/maintenance.rs:89— it takeslog_file_retention_days, floors it atLOGS_KEPT_AT_LEAST_DAYS, and sweepsthe log directory. So the directory is kept in hand and nothing follows from a
name being unique per start.