master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.4k stars 147 forks source link

Resuming after read-only permission error: Assertion Failed #771

Open Kab1r opened 1 year ago

Kab1r commented 1 year ago

Ran av1an on a file owned by another user with 0600 (rw-------), but the temp directory was accessible. As expected, the final ffmpeg concat fails:

 FFmpeg concatenation failed with output: Output {
    status: ExitStatus(
        unix_wait_status(
            256,
        ),
    ),
    stdout: "",
    stderr: "/path/to/file.mkv: Permission denied\n",
}
command: "ffmpeg" "-y" "-hide_banner" "-loglevel" "error" "-f" "concat" "-safe" "0" "-i" "/path/to/.xxxxxxx/concat" "-i" "/path/to/.xxxxxxx/audio.mkv" "-map" "0" "-map" "1" "-c" "copy" "/path/to/file.mkv"

Then after fixing the permissions, av1an fails with an assertion error instead of resuming:

thread '<unnamed>' panicked at 'assertion failed: !self.chunk_queue.is_empty()', av1an-core/src/broker.rs:105:5

I was able to manually rerun the ffmpeg concat, but this should be a resumable error.