Jump to content

[PORTABLE] Emby Optimizer V21 : Automatisez l'encodage de votre bibliothèque (HEVC 10-bit)


Recommended Posts

WDPR4100
Posted

Bonjour à tous,

Je partage avec vous un outil "Portable" (sans installation) conçu pour optimiser votre bibliothèque Emby. Il permet de convertir vos vidéos en HEVC 10-bit tout en conservant l'intégralité de votre contenu (multilingue et sous-titres) avec un gain d'espace massif.

📂 Architecture du Pack

Pour que le script fonctionne, vous devez respecter cette structure de dossiers (basée sur une architecture isolée) :

  • ENCODAGE.ps1 : Le script PowerShell (le cerveau de l'outil).

  • Temp_Source : Déposez ici vos fichiers originaux à traiter.

  • Fichier Final : C'est ici que vos vidéos optimisées apparaîtront.

  • Tools : Doit contenir HandBrakeCLI.exe et ffprobe.exe.

  • Logs_Audit : Contient vos rapports de scan et l'historique d'encodage.


🚀 Points forts de cette version

  • Conservation Totale : Le script détecte et conserve toutes les pistes audio et tous les sous-titres sans exception.

  • Optimisation Audio : Chaque piste est convertie en AAC (192 kbps). Cela garantit une compatibilité "Direct Play" sur 99% des clients Emby (Web, Smart TV, Mobile) tout en réduisant le poids.

  • Sécurité : Vos originaux dans Temp_Source ne sont jamais supprimés. Le script crée une copie optimisée dans le dossier final.

  • Intelligence : Un système de logs évite de ré-encoder inutilement un fichier déjà traité.


🛠️ Pourquoi ces réglages pour Emby ?

  • HEVC 10-bit (x265) : C'est le standard actuel. Le 10-bit élimine les effets de "banding" (marques dans les dégradés de couleurs) fréquents sur les fichiers compressés en 8-bit.

  • Encodage GPU ou CPU : C'est le réglage idéal aux choix

    Le résultat : Un fichier beaucoup plus léger à qualité égale, ce qui est crucial pour le streaming à distance (Upload) sans buffering.

  • Audio "Universal AAC" : En convertissant toutes les pistes en AAC, on élimine le besoin de transcodage audio sur le serveur Emby, économisant ainsi les ressources de votre machine.


📋 Mode d'emploi

  • Placez vos fichiers dans Temp_Source. (dossier et même sous-dossier pas de souci.

  • Faites un clic droit sur ENCODAGE.ps1 > Exécuter avec PowerShell.

  • Menu interactif :

    [A] Audit : Scanne la source pour lister ce qui n'est pas encore en HEVC 10-bit.

    [G] GPU (NVIDIA) : Utilise NVENC pour une vitesse foudroyante.

    [C] CPU (x265) : Utilise le processeur pour une vitesse plus lente.


🔍 Comment ça marche "sous le capot" ? (Explication technique)

Le script pilote deux outils majeurs via la console :

  • Le Scan (ffprobe) : Le script analyse chaque vidéo pour voir si elle est déjà en HEVC 10-bit. Si c'est le cas, il l'ignore intelligemment.

  • L'Encodage (HandBrakeCLI) : Il utilise la commande --audio all couplée à -E av_aac. Cela signifie : "Prends chaque piste audio que tu trouves, quelle que soit la langue, et transforme-la en AAC 192k".

  • Le Tracking : À chaque succès, un fichier .txt est créé dans le dossier Logs_Audit. Si vous relancez le script plus tard, il compare la liste des fichiers avec ces logs pour ne traiter que les nouveautés.


 

Bon encodage à tous !

ENCODAGE EMBY.zip

MediaIntelNUC
Posted

Bonjour ! J'ai testé cet outil men j'ai rencontré deux erreurs. La première est que HandBrake n'était pas disponible (j'avais choisi l'encodage CPU) et aucun log n'a été créé, mais j'ai réussi à copier les informations depuis la fenêtre PowerShell et je joins un fichier texte avec ces détails. Je n'ai apporté aucune modification à la structure des dossiers. De plus, j'ai remarqué qu'un dossier est créé sous C:\Users, nommé C:\Users\fayca\Downloads\ENCODAGE EMBY\Temp_Source. Si l'outil est censé être "portable", ne devrait-il pas traiter tous les fichiers au sein de sa propre structure de dossiers ?

Cordialement, N.

English:

Hi! I tried this out but ran into two errors. The first was that HandBrake was unavailable (I selected CPU encoding) and no log file was created, but I managed to copy the information from the PowerShell window and have attached a text file with those details. I haven't changed anything in the folder structure. Also, I noticed that a folder is being created in C:\Users named C:\Users\fayca\Downloads\ENCODAGE EMBY\Temp_Source. If this is meant to be "portable," shouldn't all files be handled within its own folder structure?

Best regards, N.

 

1, compatibility id 1-error-log.txt

WDPR4100
Posted

@MediaIntelNUCEn effet, le chemin doit correspondre à celui de ta machine. J’ai corrigé le chemin d’accès. Concernant l’encodage, que ce soit avec HandBrake en GPU ou FFmpeg en CPU, il n’y a pas de souci particulier. Vérifie simplement les permissions et exécute le script en mode administrateur.

============================================
      EMBY OPTIMIZER V22 (PORTABLE)
============================================
 Dossier Root : C:\Users\root\Downloads\ENCODAGE EMBY
 Source       : C:\Users\root\Downloads\ENCODAGE EMBY\Temp_Source
--------------------------------------------
[G] ENCODAGE GPU (NVIDIA NVENC)
[C] ENCODAGE CPU (x265 High Quality)
[A] AUDIT (Scan des fichiers)
--------------------------------------------
[Q] QUITTER
--------------------------------------------

--- LANCEMENT ENCODAGE CPU (x265) ---
--------------------------------------------
[TRAVAIL] -> Aladdin - 1x01 - Les 1001 plumes.mkv
[01:27:17] Compile-time hardening features are enabled
[01:27:17] nvenc: version 13.0 is available
[01:27:17] nvdec: is available
[01:27:17] CUDA Version: 8.6
[01:27:17] vcn: not available on this system
[01:27:19] qsv: is available on this system
[01:27:19] hb_init: starting libhb thread
[01:27:19] thread 2 started ("libhb")
HandBrake 1.10.2 (2025090600) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening C:\Users\root\Downloads\ENCODAGE EMBY\Temp_Source\Aladdin - 1x01 - Les 1001 plumes.mkv...
[01:27:19] CPU: 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz
[01:27:19]  - Intel microarchitecture Tiger Lake
[01:27:19]  - logical processor count: 8
[01:27:19] Intel Quick Sync Video support: yes, gpu list: 0
[01:27:19] Intel Quick Sync Video integrated adapter with index 0
[01:27:19] Impl mfx-gen library path: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_9711ec5d8e932518\libmfx64-gen.dll
[01:27:19]  - Intel Media SDK hardware: API 2.14 (minimum: 1.3)
[01:27:19]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[01:27:19]  - H.264 encoder: yes
[01:27:19]     - preferred implementation: hardware (1) via D3D11
[01:27:19]     - capabilities (hardware):  lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[01:27:19]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[01:27:19]     - preferred implementation: hardware (1) via D3D11
[01:27:19]     - capabilities (hardware):  lowpower breftype icq vsinfo masteringinfo cllinfo opt1 opt2+mbbrc+extbrc+repeatpps+ib_adapt+nmpslice
[01:27:19]  - AV1 encoder: no
[01:27:19] hb_scan: path=C:\Users\root\Downloads\ENCODAGE EMBY\Temp_Source\Aladdin - 1x01 - Les 1001 plumes.mkv, title_index=1
Input #0, matroska,webm, from 'C:\Users\root\Downloads\ENCODAGE EMBY\Temp_Source\Aladdin - 1x01 - Les 1001 plumes.mkv':
  Metadata:
    creation_time   : 2026-04-29T16:46:43.000000Z
    ENCODER         : Lavf61.7.100
  Duration: 00:21:41.42, start: -0.021000, bitrate: 674 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, smpte170m/bt470bg/bt709), 640x480 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn (default)
      Metadata:
        DURATION        : 00:21:41.360000000
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
      Metadata:
        DURATION        : 00:21:41.418000000
[01:27:19] scan: decoding previews for title 1
[01:27:19] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 Unknown (AAC LC, 2.0 ch)
Scanning title 1 of 1, preview 1, 10.00 %[01:27:19] using container PAR 1:1
[01:27:19] scan: 10 previews, 640x480, 25.000 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 1:1, color profile: 5-1-6, chroma location: left
[01:27:20] scan: supported video decoders: avcodec qsv hwaccel
Scanning title 1 of 1, preview 10, 100.00 %[01:27:20] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: C:\Users\root\Downloads\ENCODAGE EMBY\Temp_Source\Aladdin - 1x01 - Les 1001 plumes.mkv
  + duration: 00:21:41
  + size: 640x480, pixel aspect: 1/1, display aspect: 1.33, 25.000 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: duration 00:21:41
  + audio tracks:
    + 1, Unknown (AAC LC, 2.0 ch) (iso639-2: und)
  + subtitle tracks:
Warning: Could not find audio track 2, skipped
Warning: Could not find audio track 3, skipped
Warning: Could not find audio track 4, skipped
Warning: Could not find audio track 5, skipped
[01:27:20] Starting work at: Thu Apr 30 01:27:20 2026

[01:27:20] 1 job(s) to process
[01:27:20] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Encoder": 1327312000,
                "Name": "Stereo",
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:eac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 21,
                    "Seconds": 41,
                    "Ticks": 117127620
                },
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "C:\\Users\\root\\Downloads\\ENCODAGE EMBY\\Fichier Final\\Aladdin - 1x01 - Les 1001 plumes.mkv",
        "InlineParameterSets": false,
        "Mux": "mkv",
        "Options": {
            "IpodAtom": false,
            "Optimize": false
        }
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 11,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 20,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 480,
                    "width": 640
                }
            }
        ]
    },
    "Metadata": {
0E2n6c-o0d4i-n2g9:T 1t6a:s4k6 :-413 .o0f0 0-010,0 Z0".
0 0   % },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "HWDecode": 0,
        "KeepDuplicateTitles": false,
        "Path": "C:\\Users\\root\\Downloads\\ENCODAGE EMBY\\Temp_Source\\Aladdin - 1x01 - Les 1001 plumes.mkv",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "AdapterIndex": -1,
        "AsyncDepth": 0,
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 6,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 5,
        "ColorRange": 1,
        "ColorTransfer": 1,
        "Encoder": "x265_10bit",
        "HardwareDecode": 0,
        "MultiPass": false,
        "PasshtruHDRDynamicMetadata": 6,
        "Preset": "medium",
        "Quality": 22.0,
        "Turbo": false
    }
}
[01:27:20] Starting Task: Encoding Pass
[01:27:20] work: skipping crop/scale filter
[01:27:20] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[01:27:20] Auto Passthru: fallback is AAC (avcodec)
[01:27:20] Auto Passthru: using AAC Passthru for track 1
[01:27:20] job configuration:
[01:27:20]  * source
[01:27:20]    + C:\Users\root\Downloads\ENCODAGE EMBY\Temp_Source\Aladdin - 1x01 - Les 1001 plumes.mkv
[01:27:20]    + title 1, chapter(s) 1 to 1
[01:27:20]    + container: matroska,webm
kEbnpcso0]    + data rate: 674
d[i0n1g::2 7t:a2s0k]  1  *o fd e1s,t i0n.a0t0i o%n
[01:27:20]    + C:\Users\root\Downloads\ENCODAGE EMBY\Fichier Final\Aladdin - 1x01 - Les 1001 plumes.mkv
[01:27:20]    + container: Matroska (libavformat)
[01:27:20]  * video track
[01:27:20]    + decoder: hevc 10-bit (yuv420p10le)
[01:27:20]    + filter
[01:27:20]      + Framerate Shaper (mode=0)
[01:27:20]        + frame rate: same as source (around 25.000 fps)
[01:27:20]    + Output geometry
[01:27:20]      + storage dimensions: 640 x 480
[01:27:20]      + pixel aspect ratio: 1 : 1
[01:27:20]      + display dimensions: 640 x 480
[01:27:20]    + encoder: H.265 10-bit (libx265)
[01:27:20]      + preset:  medium
[01:27:20]      + quality: 22.00 (RF)
[01:27:20]      + color profile: 5-1-6
[01:27:20]      + color range: tv
[01:27:20]      + chroma location: left
[01:27:20]  * audio track 1
[01:27:20]    + name: Stereo
[01:27:20]    + decoder: Unknown (AAC LC, 2.0 ch) (track 1, id 0x1)
[01:27:20]      + samplerate: 48000 Hz
[01:27:20]    + AAC Passthru
[01:27:20] sync: expecting 32535 video frames
x265 [info]: HEVC encoder version 4.1+190-c8ceb6b
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(8 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
Ex265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
nx265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00 c
ox265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
dx265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0i
nx265 [info]: References / ref-limit  cu / depth  : 3 / off / on
gx265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
:x265 [info]: Rate Control / qCompress            : CRF-22.0 / 0.60
tx265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvpa
sx265 [info]: tools: b-intra strong-intra-smoothing deblock saok
 1 of 1, 0.00 %[01:27:21] sync: first pts audio 0x1 is 0
[01:27:21] sync: first pts video is 1890
[01:27:21] sync: Chapter 1 at frame 1 time 1890
Encoding: task 1 of 1, 1.36 % (34.34 fps, avg 32.27 fps, ETA 00h16m35s)

 

Capture d’écran 2026-04-30 012512.png

ENCODAGE.ps1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...