How to exclude specific videos from being transcoded?
For some videos I would prefer no transcoding at all as they are quite large. Are there some kind of exclusion patterns for video transcoding or another trick to achieve this?
11 Replies
:wave: Hey @N306,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:Nothing by size, no
By size would not help as there are also some larger videos I want to be transcoded. By name I hoped (or by format or so)? @Zeus
I would flag them manually with a tag before - thought there might be something like the exclusion patterns for external libraries but for transcoding? 🙂
No, doesn’t exist
Okey...thanks for the information...is there any workaround? E.g. using a filename the transcoder will ignore or so?
You can try a monkey patch: modifying Immich files right in the container (without recompilation/building) to exclude videos from transcoding based on a custom rule.
The patch below enables ignoring files having
_large
in file names. It adds custom "if - then" that checks file path.
Original handleVideoConversion
in sources https://github.com/immich-app/immich/blob/f15376a107f5cab7acca9ad8968afa6a0f9caaf2/server/src/services/media.service.ts#L466-L472
Log:
Thank you guys so much! ❤️ @Immich @Sergey Katsubo
Can I use the same trick to e.g. modify the swiping speed needed to turn around in 360 videos? 🥺
Can I use the same trick to e.g. modify the swiping speed needed to turn around in 360 videos? 🥺
Yes, you can! Try the monkey patch below.
Btw, you can create a Feature Request for exposing certain settings, such as move speed or zoom speed, for better UX.
(Maybe through the settings cog in sphere/panorama videos)
Related: https://github.com/immich-app/immich/pull/20595, https://github.com/immich-app/immich/pull/15747.
Monkey patch
Set 3x speed (default 1).
Server side:
Then in broswer
- Reload the page without cache to force loading new JS.
- Verify in Dev console > Debugger > Search for "moveSpeed:", it should contain the patched number.
To undo the change:
docker compose down immich-server
or re-run the patch with different speed value, e.g. 1.[Pull Request] chore: tweak photo sphere fov and zoom speed constants (immich-app/immich#20595)
[Pull Request] feat: resolution selection and default preview playback for 360° panorama videos (immich-app/immich#15747)
@Immich Thanks for the information! 🙂 Sadly this is no use case for me as I use Immich via touch devices or oj desktop with a mouse (dragging arround with a touchpad in a 360 sphere would drive me crazy on non-Apple devices as they don't support 3-finger-drag as it's patented).
My main issues still are:
1. 360 drag speed on touch devices is barely unusable slow on videos and images (compare with Google Maps e.g.) (a setting would be amazing here)
2. 360 images have the same preview image size as regular images making a quick zoom in zoom out necessary each time to not get a blurry image (as in 360 6k is the absolute minimum, even 8k just results in a 1080p image as you are just looking at a small frame of the whole image) → the current threads topic and I will try the fix above but it is just a temporary workaround as it is not embedded and maintained in the source code)
3. 3D360 image previews are displayed wrong (not converted to 2D as the non-preview files then do)
Sadly I have not the needed dev experience to fix that stuff :/ especially things like writing tests etc - finding the correct parameter via trial and error to tweak it might be possible though...