Conversation
When video processing failed (e.g., WebP encoder error on still frame), the original file could be lost, resulting in missing attachments. Root cause: - processVideo() deleted the original file immediately after ffmpeg conversion - If subsequent processImage() failed on still frame, the original was gone - finalizeCreation() error handler couldn't fall back to 'general' type Changes: - Removed premature unlink() from processVideo in process.ts - Added safe cleanup of original file in finalizeCreation after successful _placeFiles() in both success and error paths - Original file now persists through entire processing pipeline until all files are safely uploaded to storage This ensures the original file remains available for fallback processing if any step fails, preventing the "file was lost" scenario.
Some video files (e.g., MP4s with embedded album art) have attached_pic streams that can interfere with filter graph processing. Changed to: - Use V:0 stream specifier instead of v:0 to select first real video stream - Extract still frame with separate ffmpeg command after main conversion - Remove 'still' from split filter variants to avoid mapping conflicts - Simplify split filter logic when only one variant is needed
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.
Fixed
correct file extension (e.g.,
.mp4) instead of.tmpframe is now extracted in a separate ffmpeg command with explicit static
WebP codec.
video content - ffmpeg now correctly selects the main video stream,
excluding
attached_picstreams.