Skip to content
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

[BUG] Videos without audio are not transcoded #2732

Closed
1 of 3 tasks
subract opened this issue Jun 12, 2023 · 1 comment
Closed
1 of 3 tasks

[BUG] Videos without audio are not transcoded #2732

subract opened this issue Jun 12, 2023 · 1 comment
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer

Comments

@subract
Copy link

subract commented Jun 12, 2023

The bug

I want to upload videos from my drone, which have no audio track. However, these videos are never transcoded by the server. The relevant check is in server/src/domain/media/media.service.ts:

    if (!mainVideoStream || !mainAudioStream || !containerExtension) {
      return false;
    }

Because this check occurs before the ffmpegConfig.transcode configuration is checked, the issue persists even when the transcode policy is set to "All videos" in the ffmpeg settings.

I can probably take a crack at this issue when I have some time - it seems like it will just require a handful of changes in that file to make it sufficient for a file to have just a video track and still be eligible for transcoding. I believe the transcode policy should simply ignore the target audio codec in that case, and the -acodec option for ffmpeg should be omitted (though in my testing, it seems to work fine even when the -acodec option is included.

Thank you! The project is truly incredible.

The OS that Immich Server is running on

Docker on Debian 10

Version of Immich Server

v1.60.0

Version of Immich Mobile App

v1.60.0 build.100

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

networks:
  immich:
  web:

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start-server.sh"]
    volumes:
      - ${IMMICH_UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    networks:
      immich:
    restart: unless-stopped
 ...

Your .env content

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD=<redacted>
DB_DATABASE_NAME=immich
IMMICH_UPLOAD_LOCATION=/ssd/app/immich/upload
TYPESENSE_API_KEY=<redacted>
IMMICH_API_URL_EXTERNAL=<redacted>
IMMICH_VERSION=v1.60.0
LOG_LEVEL=verbose

Reproduction steps

1. Upload a video without an audio track (for example, this [sample video from Pexels](https://www.pexels.com/video/drops-of-liquid-on-a-tray-to-be-use-as-samples-3195394/)
2. Watch the microservices logs and see that a transcoded asset is not generated

Additional information

No response

@subract subract added bug Something isn't working needs triage Bug that needs triage from maintainer labels Jun 12, 2023
@brighteyed
Copy link
Contributor

Fixed by #3147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer
Projects
None yet
Development

No branches or pull requests

2 participants