-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix: add setpts=N filter before fps=12 in thumbnail generation #25079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Do you have an example video that fails with the previous command and succeeds with this? |
Yes, specific example videos are attached in the issue #24254 Link to one of them: |
|
previous command and log: new command and log |
|
@mertalev Did you have the Chance to Review the Code? I have a similar issue and Hope this PR could solve it. |
Description
Add setpts=N reassigns the timestamp(PTS) of every frame to match its sequential frame number after -skip_frame, it removes the time gaps, making the stream continuous.
It tricks subsequent filters (like thumbnail or reverse) into treating the sparse frames as a standard, tightly packed video, preventing buffer overlows and segmentation faults.
Fixes #24254
How Has This Been Tested?
Run new ffmpeg command line in docker container to confirm there is no segment fault.
Run immich thumbnail job on missing files, no error log.
Re-run immich thumbnail job on missing files, no new job to run.
Run tests in [server/src/services/media.service.spec.ts, all passed.
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)Please describe to which degree, if any, an LLM was used in creating this pull request.
Use gemini to help debug and explain ffmpeg parameters, modify code by hand.
...