[PR #2138] [MERGED] feat(server): add faststart to ffmpeg options #9398

Closed
opened 2026-02-05 14:04:00 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/2138
Author: @michelheusschen
Created: 3/31/2023
Status: Merged
Merged: 3/31/2023
Merged by: @alextran1502

Base: mainHead: feat/server-ffmpeg-faststart


📝 Commits (1)

  • 751f12d feat(server): add faststart to ffmpeg options

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 server/apps/microservices/src/processors/video-transcode.processor.ts (+4 -0)

📄 Description

Typically, the moov atom in recorded videos is located at the end of files since the necessary information isn't available at the beginning of the recording. To play a mp4 file, browsers follow a general process:

  1. Start downloading file and assume moov atom is at start
  2. If moov atom not found, cancel request and start downloading end of file
  3. Use data in moov atom to start downloading file again

When the moov atom is located at the start of a file, only one request is necessary resulting in faster playback. This PR achieves exactly that at the cost of a second pass that slightly increases the transcoding time.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/2138 **Author:** [@michelheusschen](https://github.com/michelheusschen) **Created:** 3/31/2023 **Status:** ✅ Merged **Merged:** 3/31/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `feat/server-ffmpeg-faststart` --- ### 📝 Commits (1) - [`751f12d`](https://github.com/immich-app/immich/commit/751f12d64e3e478d90b068369e5b77dd42c8fb27) feat(server): add faststart to ffmpeg options ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/apps/microservices/src/processors/video-transcode.processor.ts` (+4 -0) </details> ### 📄 Description Typically, the moov atom in recorded videos is located at the end of files since the necessary information isn't available at the beginning of the recording. To play a mp4 file, browsers follow a general process: 1. Start downloading file and assume moov atom is at start 2. If moov atom not found, cancel request and start downloading end of file 3. Use data in moov atom to start downloading file again When the moov atom is located at the start of a file, only one request is necessary resulting in faster playback. This PR achieves exactly that at the cost of a second pass that slightly increases the transcoding time. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:04:00 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#9398