[BUG] Two-pass encoding ffmpeg log files persist #895

Closed
opened 2026-02-04 23:24:29 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @raisinbear on GitHub (May 29, 2023).

The bug

Thanks for all the great updates in the past few weeks! This thing is really taking off 😀

This issue is nothing serious, but should be noted. I just messed with the two pass video encoding feature (I'm using h264, but suppose it is the same for other codecs) and found a ffmpeg 1st pass log file in the encoded-video folder after successful encoding. This file is not needed anymore and persists even when deleting the uploaded video.

grafik

The OS that Immich Server is running on

Debian 11

Version of Immich Server

v.1.58.0

Version of Immich Mobile App

v.1.58.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

not relevant

Your .env content

not relevant

Reproduction steps

1. Enable two-pass encoding for videos.
2. Check `encoded-video` folder in server fs and find a second file with suffix `.mbtree` that is not needed anymore nor deleted when deleting the uploaded video.

Additional information

No response

Originally created by @raisinbear on GitHub (May 29, 2023). ### The bug Thanks for all the great updates in the past few weeks! This thing is really taking off 😀 This issue is nothing serious, but should be noted. I just messed with the two pass video encoding feature (I'm using h264, but suppose it is the same for other codecs) and found a `ffmpeg` 1st pass log file in the `encoded-video` folder after successful encoding. This file is not needed anymore and persists even when deleting the uploaded video. ![grafik](https://github.com/immich-app/immich/assets/68740188/3893cf78-c5f1-4ab4-8d1b-1b0cd0dbd4fc) ### The OS that Immich Server is running on Debian 11 ### Version of Immich Server v.1.58.0 ### Version of Immich Mobile App v.1.58.0 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML not relevant ``` ### Your .env content ```Shell not relevant ``` ### Reproduction steps ```bash 1. Enable two-pass encoding for videos. 2. Check `encoded-video` folder in server fs and find a second file with suffix `.mbtree` that is not needed anymore nor deleted when deleting the uploaded video. ``` ### Additional information _No response_
OVERLORD added the 🗄️server label 2026-02-04 23:24:29 +03:00
Author
Owner

@alextran1502 commented on GitHub (May 29, 2023):

@mertalev hi Mert, are you aware of this issue?

@alextran1502 commented on GitHub (May 29, 2023): @mertalev hi Mert, are you aware of this issue?
Author
Owner

@mertalev commented on GitHub (May 29, 2023):

Yes, I've noticed it as well. There can be one log file left for some reason. I'll look into why it doesn't get deleted.

@mertalev commented on GitHub (May 29, 2023): Yes, I've noticed it as well. There can be one log file left for some reason. I'll look into why it doesn't get deleted.
Author
Owner

@brighteyed commented on GitHub (May 29, 2023):

Yes, I've noticed it as well. There can be one log file left for some reason. I'll look into why it doesn't get deleted.

I've just investigated this issue. The following settings result in the creation of the mbtree files by ffmpeg:

  • h264 video codec
  • 2-pass transcoding
  • constrained quality (i.e. max bitrate != 0)
  • veryfast or slower preset

That file remains on the disk after the video encoding is completed. I see 2 possible solutions: add --no-mbtree option or delete this file explicitly

@brighteyed commented on GitHub (May 29, 2023): > Yes, I've noticed it as well. There can be one log file left for some reason. I'll look into why it doesn't get deleted. I've just investigated this issue. The following settings result in the creation of the `mbtree` files by `ffmpeg`: * h264 video codec * 2-pass transcoding * constrained quality (i.e. max bitrate != 0) * `veryfast` or slower preset That file remains on the disk after the video encoding is completed. I see 2 possible solutions: add `--no-mbtree` option or delete this file explicitly
Author
Owner

@mertalev commented on GitHub (May 30, 2023):

Thanks for investigating it @brighteyed ! It would be fine to just delete that file too since it apparently helps with compression.

@mertalev commented on GitHub (May 30, 2023): Thanks for investigating it @brighteyed ! It would be fine to just delete that file too since it apparently helps with compression.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#895