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

immich transcoding videos already in the correct format #15402

Closed
1 of 3 tasks
Cereal916 opened this issue Jan 17, 2025 · 9 comments
Closed
1 of 3 tasks

immich transcoding videos already in the correct format #15402

Cereal916 opened this issue Jan 17, 2025 · 9 comments

Comments

@Cereal916
Copy link

The bug

Ive used handbreak to format my family videos using the h.265 10-bit (NVEnc) setting at 1080p. When I look at the codec information in VLC it says the videos are "MPEG-H Part2/HEVC (H.256) (hvc1)". Immich has the transcode policy set to "Only videos not in the accepted format" and the accepted video codec is "HEVC".

I'm new to video transcoding, what am I missing?

The OS that Immich Server is running on

Debian 12

Version of Immich Server

v1.124.2

Version of Immich Mobile App

na

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich-server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    devices:
      - /dev/dri:/dev/dri
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    environment:
      - DB_PASSWORD=${DB_PASSWORD}
    networks:
      - nginx-network
      - immich-internal-network
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich-machine-learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    restart: always
    environment:
      - DB_PASSWORD=${DB_PASSWORD}
    networks:
      - immich-internal-network
    healthcheck:
      disable: false

  redis:
    container_name: immich-redis
    image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
    networks:
      - immich-internal-network
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich-postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    networks:
      - immich-internal-network
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
        Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
        --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
        echo "checksum failure count is $$Chksum";
        [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: >-
      postgres
      -c shared_preload_libraries=vectors.so
      -c 'search_path="$$user", public, vectors'
      -c logging_collector=on
      -c max_wal_size=2GB
      -c shared_buffers=512MB
      -c wal_compression=on
    restart: always

volumes:
  model-cache:

networks:
  nginx-network:
    name: nginx-network
  immich-internal-network:
    name: immich-internal-network

Your .env content

UPLOAD_LOCATION=*************
DB_DATA_LOCATION=*************
IMMICH_VERSION=release
DB_PASSWORD=************
DB_USERNAME=***********
DB_DATABASE_NAME=*************

Reproduction steps

  1. Settings > Video Transcoding settings > Transcode Policy > Transcode Policy >"Only videos not in an accepted format"
  2. Settings > Video Transcoding settings > Transcode Policy > Accepted video codecs > HEVC
  3. Settings > Video Transcoding settings > Transcode Policy > Accepted audio codecs > check all
  4. Settings > Video Transcoding settings > Transcode Policy > Accepted containers > select none
  5. Go to jobs and pause "transcoding videos"
  6. Upload provided video
  7. You will see a job get added.

Relevant log output

[Nest] 7  - 01/17/2025, 2:23:54 AM VERBOSE [Microservices:MetadataService] Exif Tags
[Nest] 7  - 01/17/2025, 2:23:54 AM VERBOSE [Microservices:MetadataService] Object:
{
  "SourceFile": "/usr/src/app/upload/upload/0fea26eb-0579-491c-aa04-bcf760ada932/31/79/317921bf-1472-4b56-9646-210901066bfa.mp4",
  "errors": [],
  "tz": "UTC",
  "tzSource": "defaultVideosToUTC",
  "PreviewDuration": 0,
  "SelectionDuration": 0,
  "TrackDuration": 1.001,
  "MediaDuration": 1.024,
  "ExifToolVersion": 13,
  "FileName": "317921bf-1472-4b56-9646-210901066bfa.mp4",
  "Directory": "/usr/src/app/upload/upload/0fea26eb-0579-491c-aa04-bcf760ada932/31/79",
  "FileSize": "1870 kB",
  "FileModifyDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 15,
    "hour": 21,
    "minute": 12,
    "second": 31,
    "tzoffsetMinutes": -480,
    "rawValue": "2025:01:15 21:12:31-08:00",
    "zoneName": "UTC-8",
    "inferredZone": false
  },
  "FileAccessDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 18,
    "minute": 23,
    "second": 54,
    "tzoffsetMinutes": -480,
    "rawValue": "2025:01:16 18:23:54-08:00",
    "zoneName": "UTC-8",
    "inferredZone": false
  },
  "FileInodeChangeDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 18,
    "minute": 23,
    "second": 54,
    "tzoffsetMinutes": -480,
    "rawValue": "2025:01:16 18:23:54-08:00",
    "zoneName": "UTC-8",
    "inferredZone": false
  },
  "FilePermissions": "-rw-r--r--",
  "FileType": "MP4",
  "FileTypeExtension": "mp4",
  "MIMEType": "video/mp4",
  "MajorBrand": "MP4 v2 [ISO 14496-14]",
  "MinorVersion": "0.2.0",
  "CompatibleBrands": [
    "mp42",
    "dby1",
    "iso2",
    "mp41"
  ],
  "MovieHeaderVersion": 0,
  "CreateDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 5,
    "minute": 12,
    "second": 31,
    "tzoffsetMinutes": 0,
    "rawValue": "2025:01:16 05:12:31",
    "zoneName": "UTC",
    "inferredZone": true
  },
  "ModifyDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 5,
    "minute": 12,
    "second": 31,
    "tzoffsetMinutes": 0,
    "rawValue": "2025:01:16 05:12:31",
    "zoneName": "UTC",
    "inferredZone": true
  },
  "TimeScale": 1000,
  "PreferredRate": 1,
  "PreferredVolume": "100.00%",
  "PreviewTime": "0 s",
  "PosterTime": "0 s",
  "SelectionTime": "0 s",
  "CurrentTime": "0 s",
  "NextTrackID": 4,
  "TrackHeaderVersion": 0,
  "TrackCreateDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 5,
    "minute": 12,
    "second": 31,
    "tzoffsetMinutes": 0,
    "rawValue": "2025:01:16 05:12:31",
    "zoneName": "UTC",
    "inferredZone": true
  },
  "TrackModifyDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 5,
    "minute": 12,
    "second": 31,
    "tzoffsetMinutes": 0,
    "rawValue": "2025:01:16 05:12:31",
    "zoneName": "UTC",
    "inferredZone": true
  },
  "TrackID": 1,
  "TrackLayer": 0,
  "TrackVolume": "0.00%",
  "ImageWidth": 1920,
  "ImageHeight": 1080,
  "GraphicsMode": "srcCopy",
  "OpColor": "0 0 0",
  "CompressorID": "hvc1",
  "SourceImageWidth": 1440,
  "SourceImageHeight": 1080,
  "XResolution": 72,
  "YResolution": 72,
  "BitDepth": 24,
  "ColorProfiles": "nclx",
  "ColorPrimaries": "BT.709",
  "TransferCharacteristics": "BT.709",
  "MatrixCoefficients": "BT.709",
  "VideoFullRangeFlag": 0,
  "PixelAspectRatio": "4:3",
  "BufferSize": 0,
  "MaxBitrate": 13997354,
  "AverageBitrate": 13997354,
  "VideoFrameRate": 29.97,
  "AudioFormat": "mp4a",
  "Track2Name": "Surround",
  "Track2Title": "Surround",
  "MatrixStructure": "1 0 0 0 1 0 0 0 1",
  "MediaHeaderVersion": 0,
  "MediaCreateDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 5,
    "minute": 12,
    "second": 31,
    "tzoffsetMinutes": 0,
    "rawValue": "2025:01:16 05:12:31",
    "zoneName": "UTC",
    "inferredZone": true
  },
  "MediaModifyDate": {
    "_ctor": "ExifDateTime",
    "year": 2025,
    "month": 1,
    "day": 16,
    "hour": 5,
    "minute": 12,
    "second": 31,
    "tzoffsetMinutes": 0,
    "rawValue": "2025:01:16 05:12:31",
    "zoneName": "UTC",
    "inferredZone": true
  },
  "MediaTimeScale": 48000,
  "MediaLanguageCode": "und",
  "HandlerDescription": "Surround",
  "Balance": 0,
  "AudioChannels": 6,
  "AudioBitsPerSample": 16,
  "AudioSampleRate": 48000,
  "Track3Name": "Surround",
  "Track3Title": "Surround",
  "HandlerType": "Metadata",
  "HandlerVendorID": "Apple",
  "Encoder": "HandBrake 1.9.0 2024120100",
  "MediaDataSize": 1866534,
  "MediaDataOffset": 3260,
  "ImageSize": "1920x1080",
  "Megapixels": 2.1,
  "AvgBitrate": "14.6 Mbps",
  "Rotation": 0,
  "warnings": [],
  "Orientation": 1,
  "Duration": "00:00:01.024"
}
[Nest] 7  - 01/17/2025, 2:23:54 AM VERBOSE [Microservices:MetadataService] Asset 14a44c8f-dc85-4b87-8a19-ba2d29676e8d date time is 2025-01-16T05:12:31Z
[Nest] 7  - 01/17/2025, 2:23:54 AM VERBOSE [Microservices:MetadataService] Asset 14a44c8f-dc85-4b87-8a19-ba2d29676e8d timezone is UTC (via defaultVideosToUTC)
[Nest] 7  - 01/17/2025, 2:23:54 AM VERBOSE [Microservices:MetadataService] Asset 14a44c8f-dc85-4b87-8a19-ba2d29676e8d has a local time of 2025-01-16T05:12:31.000Z
[Nest] 7  - 01/17/2025, 2:23:54 AM   DEBUG [Microservices:APIKeyService] Attempting to rename file: upload/upload/0fea26eb-0579-491c-aa04-bcf760ada932/31/79/317921bf-1472-4b56-9646-210901066bfa.mp4 => upload/library/admin/2025/2025-01-16/2011-10-31 191450.mp4
[Nest] 7  - 01/17/2025, 2:23:54 AM   DEBUG [Microservices:MediaRepository] ffmpeg -n 10 /usr/bin/ffmpeg -skip_frame nointra -sws_flags accurate_rnd+full_chroma_int -i upload/library/admin/2025/2025-01-16/2011-10-31 191450.mp4 -y -fps_mode vfr -frames:v 1 -update 1 -v verbose -vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,format=yuv420p upload/thumbs/0fea26eb-0579-491c-aa04-bcf760ada932/14/a4/14a44c8f-dc85-4b87-8a19-ba2d29676e8d-preview.webp
[Nest] 7  - 01/17/2025, 2:23:54 AM   DEBUG [Microservices:MediaRepository] ffmpeg -n 10 /usr/bin/ffmpeg -skip_frame nointra -sws_flags accurate_rnd+full_chroma_int -i upload/library/admin/2025/2025-01-16/2011-10-31 191450.mp4 -y -fps_mode vfr -frames:v 1 -update 1 -v verbose -vf fps=12:eof_action=pass:round=down,thumbnail=12,select=gt(scene\,0.1)-eq(prev_selected_n\,n)+isnan(prev_selected_n)+gt(n\,20),trim=end_frame=2,reverse,scale=-2:480:flags=lanczos+accurate_rnd+full_chroma_int:out_range=pc upload/thumbs/0fea26eb-0579-491c-aa04-bcf760ada932/14/a4/14a44c8f-dc85-4b87-8a19-ba2d29676e8d-thumbnail.webp
[Nest] 7  - 01/17/2025, 2:23:56 AM   DEBUG [Microservices:PersonService] 0 faces detected in upload/thumbs/0fea26eb-0579-491c-aa04-bcf760ada932/14/a4/14a44c8f-dc85-4b87-8a19-ba2d29676e8d-preview.webp

Additional information

2011-10-31.191450.mp4

Originally asked on reddit, was directed here: https://www.reddit.com/r/immich/comments/1i2mink/comment/m7hr2fi/?context=3

@mmomjian
Copy link
Contributor

The jobs in the logs provided are the thumbnail and preview generation, not a full transcode. Having jobs appear is normal. If you look in the encoded-video folder I expect you will not find this file, if that's not the case we can reopen. Thank you

@mmomjian mmomjian closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2025
@Cereal916
Copy link
Author

Cereal916 commented Jan 17, 2025

The jobs in the logs provided are the thumbnail and preview generation, not a full transcode. Having jobs appear is normal. If you look in the encoded-video folder I expect you will not find this file, if that's not the case we can reopen. Thank you

They didnt show in the logs because I had transcoding paused, the log provided showed what looks like the metadata for the file. If I resume transcoding I see the transcoding logs as follows:

[Nest] 17  - 01/17/2025, 3:07:13 AM   DEBUG [Api:JobService~93qckcps] Handling command: queue=videoConversion,force=false
[Nest] 17  - 01/17/2025, 3:07:13 AM   DEBUG [Api:LoggingInterceptor~93qckcps] PUT /api/jobs/videoConversion 200 3.69ms ::ffff:192.168.86.37
command=resume command=resume force=false
[Nest] 17  - 01/17/2025, 3:07:13 AM VERBOSE [Api:LoggingInterceptor~93qckcps] 
[Nest] 7  - 01/17/2025, 3:07:14 AM     LOG [Microservices:MediaService] Transcoding video 78b82a70-e194-4435-9b41-7578e09be310 without hardware acceleration
[Nest] 7  - 01/17/2025, 3:07:14 AM   DEBUG [Microservices:MediaRepository] ffmpeg -n 10 /usr/bin/ffmpeg -i upload/library/admin/2025/2025-01-16/2011-10-31 191450.mp4 -y -c:v hevc -c:a copy -movflags faststart -fps_mode passthrough -map 0:0 -map 0:1 -tag:v hvc1 -v verbose -vf format=yuv420p -preset faster -crf 23 upload/encoded-video/0fea26eb-0579-491c-aa04-bcf760ada932/78/b8/78b82a70-e194-4435-9b41-7578e09be310.mp4
[Nest] 7  - 01/17/2025, 3:07:14 AM   DEBUG [Microservices:MediaRepository] Transcoding 20.00% done for output 78b82a70-e194-4435-9b41-7578e09be310.mp4
[Nest] 17  - 01/17/2025, 3:07:14 AM   DEBUG [Api:LoggingInterceptor~w3nmrtof] GET /api/jobs 200 5.27ms ::ffff:192.168.86.37
[Nest] 17  - 01/17/2025, 3:07:15 AM   DEBUG [Api:JobService~7mrp2vu9] Handling command: queue=videoConversion,force=false
[Nest] 17  - 01/17/2025, 3:07:15 AM   DEBUG [Api:LoggingInterceptor~7mrp2vu9] PUT /api/jobs/videoConversion 200 1.22ms ::ffff:192.168.86.37
command=pause command=pause force=false
[Nest] 17  - 01/17/2025, 3:07:15 AM VERBOSE [Api:LoggingInterceptor~7mrp2vu9] 
[Nest] 7  - 01/17/2025, 3:07:15 AM   DEBUG [Microservices:MediaRepository] Transcoding 93.33% done for output 78b82a70-e194-4435-9b41-7578e09be310.mp4
[Nest] 7  - 01/17/2025, 3:07:15 AM   DEBUG [Microservices:MediaRepository] Transcoding 100.00% done for output 78b82a70-e194-4435-9b41-7578e09be310.mp4
[Nest] 7  - 01/17/2025, 3:07:15 AM     LOG [Microservices:MediaService] Successfully encoded 78b82a70-e194-4435-9b41-7578e09be310

@alextran1502
Copy link
Contributor

Let me investigate this

@alextran1502 alextran1502 reopened this Jan 17, 2025
@mmomjian
Copy link
Contributor

Thanks. The additional logs are helpful. Can you please run ffprobe on both the original and encoded output?

@mertalev
Copy link
Contributor

mertalev commented Jan 17, 2025

The audio format is m4a, which is not an accepted audio codec. It will transcode the audio stream and copy the video stream for these videos. You can confirm that by checking the FFmpeg command that the server logs at debug level.

@Cereal916
Copy link
Author

Cereal916 commented Jan 17, 2025

Thanks. The additional logs are helpful. Can you please run ffprobe on both the original and encoded output?

Original

  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2011-10-31 191450.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42dby1iso2mp41
    creation_time   : 2025-01-16T05:12:31.000000Z
    encoder         : HandBrake 1.9.0 2024120100
  Duration: 00:00:01.02, start: 0.000000, bitrate: 14607 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709), 1440x1080 [SAR 4:3 DAR 16:9], 13997 kb/s, 29.97 fps, 29.97 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2025-01-16T05:12:31.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 442 kb/s (default)
    Metadata:
      creation_time   : 2025-01-16T05:12:31.000000Z
      handler_name    : Surround
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      creation_time   : 2025-01-16T05:12:31.000000Z
      handler_name    : Surround
      vendor_id       : [0][0][0][0]
    Side data:
      audio service type: main

Encoded

  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '78b82a70-e194-4435-9b41-7578e09be310.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf61.1.100
  Duration: 00:00:01.02, start: 0.000000, bitrate: 2168 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709, progressive), 1440x1080 [SAR 4:3 DAR 16:9], 1716 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc61.3.100 libx265
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 442 kb/s (default)
    Metadata:
      handler_name    : Surround
      vendor_id       : [0][0][0][0]

@mertalev
Copy link
Contributor

Oh, the codec is actually AAC based on the logs you just shared. MP4A apparently refers to something else and doesn't have anything to do with M4A.

The issue I see here is that it's a 10-bit video (yuv420p10le), which means it needs to be transcoded for playback on some clients.

@Cereal916
Copy link
Author

Oh, the codec is actually AAC based on the logs you just shared. MP4A apparently refers to something else and doesn't have anything to do with M4A.

The issue I see here is that it's a 10-bit video (yuv420p10le), which means it needs to be transcoded for playback on some clients.

I tried the non 10-bit setting in Handbrake and it looks like you're right

[Nest] 7  - 01/17/2025, 6:09:58 AM   DEBUG [Microservices:MediaRepository] Transcoding NaN% done for output 5900fbfe-b61b-433e-9c12-d2a115148330.mp4
[Nest] 7  - 01/17/2025, 6:09:58 AM     LOG [Microservices:MediaService] Successfully encoded 5900fbfe-b61b-433e-9c12-d2a115148330

Any chance there will be a setting coming where I can disable transcoding for 10bit hevc? all of my devices support it, and dont want to completely disable transcoding, its still helpful for uploading videos on the fly.

@mertalev
Copy link
Contributor

#15122 should allow that, but it's very incomplete and will need to include some tweaks in the transcoding pipeline.

@bo0tzz bo0tzz closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants