Conversation
The chown to serviio:video never took effect. Changing a file's owner to another user needs root, the script runs as an ordinary user, and both output shares are exported root_squash, so running it under sudo would not help either -- root has less access there than we do. With the errors sent to /dev/null and no return code checked, the failure was invisible: the chmod on the following line still succeeded, so the files looked as though the ownership block had run. Set only the group, which an ordinary member of it is allowed to do. Serviio reads through the shared video group, so rp01:video 0664 grants it exactly what serviio:video 0664 did. Output directories also get the setgid bit so season subdirectories created later inherit the group. Failures are now logged rather than discarded. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
-hwaccel cuda was set once at startup and applied to every file. It is a decoder selection directive rather than a hint: it replaces the software decoder with the native hwaccel shim, which has no software path. Given a codec NVDEC cannot decode there is no fallback -- ffmpeg fails every packet in a loop and never stops. An AV1 source hit this today. The GPU is Turing, which has no AV1 decode block at all, so ffmpeg logged "Your platform doesn't support hardware accelerated AV1 decoding" and then "Error submitting packet to decoder: Function not implemented" once per packet, 3673 times in 45 seconds. It looked like a hang, and it was not: audio and subtitles kept encoding and were eventually muxed on their own. Left alone it would have written a video-less 97MB mp4, very likely exited 0, published that over the real film and moved the 1.7GB source to done/. Gate the flag on the probed codec instead. AV1 is added to the list only when the GPU reports compute capability 8.6 or higher, which is where NVDEC gained an AV1 decoder. -hwaccels cannot answer this: it reports that the method exists, never which codecs the silicon handles. The same file decodes through libdav1d at 11.9x realtime and encodes on NVENC normally, so nothing is lost beyond the decode speed. Also drop -loglevel from quiet to error. Quiet is what turned an ffmpeg failing loudly into seven minutes of silence. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs found in one
vc2 -mrun on 2026-09-19. Both failed silently because their errors were being sent to/dev/nullor suppressed by-loglevel quiet.1. Output ownership was never applied
chown $user:$groupon the output file and directory has been failing on every run. Changing a file's owner to another user requires root; the script runs as an ordinary user.sudowould not help either — the output shares are exportedroot_squash, so root has less access there than we do.With stderr discarded and no return code checked, this was invisible: the
chmodon the next line still succeeded, so the files looked as though the ownership block had run. Recent output isrp01:rp01; files from older runs areserviio:video.Set only the group, which an ordinary member of it is allowed to do. Serviio reads through the shared
videogroup, sorp01:video 0664grants exactly whatserviio:video 0664did. Output directories also get the setgid bit so season subdirectories inherit the group. Failures are now logged.2.
-hwaccel cudawas applied to codecs the GPU cannot decode-hwaccel cudawas set once at startup and used for every file. It is a decoder selection directive, not a hint: it replaces the software decoder with the native hwaccel shim, which has no software path. Given a codec NVDEC cannot decode there is no fallback — ffmpeg fails every packet in a loop and never stops.An AV1 source hit this. The GPU is Turing, which has no AV1 decode block:
That block repeated 3673 times in 45 seconds, at ~180% CPU with no video written. It looked like a hang, and it was not: audio and subtitles kept encoding and were eventually muxed on their own. The abandoned temp file was 97 MB of audio and subtitles with no video stream, 4996s into a 5106s runtime. Left alone the run would very likely have exited 0, published that over the real film and moved the 1.7 GB source to
done/.Gate the flag on the probed
$vCodecinstead. AV1 joins the list only when the GPU reports compute capability >= 8.6, where NVDEC gained an AV1 decoder.ffmpeg -hwaccelscannot answer this — it reports that the method exists, never which codecs the silicon handles.Also drops
-loglevelfromquiettoerror. Quiet is what turned an ffmpeg failing loudly into seven minutes of silence;-statsstill provides the progress line.Verification
bash -nandshellcheck -S warningclean.chgrp video+chmodconfirmed to succeed as an ordinary user on both the plex and QNAP exports.vc2 -mre-run printsNVDEC has no av1 decoder; decoding in softwareand proceeds.🤖 Generated with Claude Code