module inscription newsletter haut de page forum mobile

Ateliers et Formations

[Tuto] Nikon Raw metadata

Discussion dans 'Nikon' créé par moutchou, 16 Avril 2026, à 21:59.

  1. moutchou

    Points Repaire:
    2 050
    Recos reçues:
    3
    Messages:
    300
    Appréciations:
    +12 / 73 / -0
    Salut,

    Je lance ce sujet pour tous ceux, comme moi qui parfois ont du mal à avoir accès aux metadata de leurs rushes. En particulier pour des fichiers N-Raw c'est parfois compliqué de savoir comment ça a été filmé quelques temps après.

    Pour obtenir les infos, j'utilise exiftool pour les afficher. En revanche il s'agit d'un outil en ligne de commande, ce qui n'est pas très pratique. Du coup j'ai voulu le packager pour le rendre disponible en menu contextuel sous Windows (Clique droit --> show metadata). Rien de bien sorcier, mais voilà la procédure au cas où ça intéresse quelqu'un:
    1. Téléchargez exiftool, renommez l'outil en supprimant le (-k) du nom. Posez ça dans un répertoire. Disons "C:\Tools\ShowMetadataPortable"
    2. Installez le SDK .NET8.0 (Télécharger .NET 8.0 (Linux, macOS et Windows) | .NET
    3. Créez les 3 fichiers CS indiqués ci-dessous et posez dans un répertoire. Disons "C:\Tools\SourceCodeMetadata"
    4. Lancez PowerShell
    5. Tapez "cd C:\Tools\SourceCodeMetadata"
    6. Tapez "dotnet build -c Release". Ca doit se terminer par un succès: "Build succeeded with 1 warning(s) in 5.4s"
    7. Tapez "dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true". Ca doit également se terminer par une ligne avec "Succeeded" (faites pas attention aux warnings).
    8. Vous pouvez maintenant copier le fichier ShowMetadata.exe dans le répertoire "C:\Tools\SourceCodeMetadata\bin\Release\net8.0-windows\win-x64\publish" et le coller dans le répertoire "C:\Tools\ShowMetadataPortable". Vous devez donc y trouver désormais le fichier "ShowMedata.exe", le fichier "exiftool.exe" et un répertoire nommé "exiftool_files"
    9. Créer le fichier .reg tel que décrit ci-dessous. Vous pouvez changer le répertoire de lancement, pour adapter l'emplacement où se trouve les fichiers détaillés à l'étape 8. Vous pouvez lancer le fichier REG.
    Et voilà !!

    Maintenant si vous faites un clic-droit sur un fichier vous avez le menu "Show metadata". Parfois il faut en plus choisir "Show more options"; c'est mon cas.

    upload_2026-4-16_21-49-45.png

    Puis le menu "Show metadata" est disponible.

    upload_2026-4-16_21-50-15.png

    Vous avez alors la fenêtre de metadata qui apparaît.

    upload_2026-4-16_21-51-15.png

    ExifTool Version Number : 13.56
    File Name : YMK_0605.NEV
    Directory : C:/Users/youss/Videos/TEMPORAIRE
    File Size : 466 MB
    File Modification Date/Time : 2026:03:19 20:28:19+01:00
    File Access Date/Time : 2026:04:16 21:49:07+02:00
    File Creation Date/Time : 2026:04:16 21:49:07+02:00
    File Permissions : -rw-rw-rw-
    File Type : MP4
    File Type Extension : mp4
    MIME Type : video/mp4
    Major Brand : Unknown (niko)
    Minor Version : 0.0.1
    Compatible Brands : niko
    Movie Header Version : 0
    Modify Date : 2026:03:19 19:28:18
    Time Scale : 24000
    Duration : 11.14 s
    Preferred Rate : 1
    Preferred Volume : 100.00%
    Preview Time : 0 s
    Preview Duration : 0 s
    Poster Time : 0 s
    Selection Time : 0 s
    Selection Duration : 0 s
    Current Time : 0 s
    Next Track ID : 3
    Track Header Version : 0
    Track Create Date : 2026:03:19 19:28:18
    Track Modify Date : 2026:03:19 19:28:18
    Track ID : 1
    Track Duration : 11.14 s
    Track Layer : 0
    Track Volume : 0.00%
    Image Width : 4040
    Image Height : 2276
    Media Language Code : und
    Graphics Mode : srcCopy
    Op Color : 0 0 0
    Compressor ID : NRAW
    Source Image Width : 4040
    Source Image Height : 2276
    X Resolution : 72
    Y Resolution : 72
    Compressor Name : NIKON RAW
    Bit Depth : 24
    Color Profiles : nclx
    Color Primaries : BT.709
    Transfer Characteristics : BT.709
    Matrix Coefficients : BT.709
    Video Full Range Flag : Full
    Video Frame Rate : 23.976
    Matrix Structure : 1 0 0 0 1 0 0 0 1
    Media Header Version : 0
    Media Create Date : 2026:03:19 19:28:18
    Media Modify Date : 2026:03:19 19:28:18
    Media Time Scale : 48000
    Media Duration : 11.14 s
    Handler Type : Audio Track
    Balance : 0
    Audio Format : lpcm
    Make : NIKON CORPORATION
    Model : NIKON ZR
    Software : NIKON ZR Ver.01.10
    Create Date : 2026:03:19 20:28:18
    Date/Time Original : 2026:03:19 20:28:18
    Frame Count : 267
    Frame Rate : 23.976
    Frame Width : 4032
    Frame Height : 2268
    Audio Channels : 2
    Audio Bits Per Sample : 32
    Audio Sample Rate : 48000
    Nikon Date Time : 2026:03:19 20:28:18
    Electronic VR : Off
    Exposure Time : 1/25
    F Number : 5.6
    Exposure Program : Manual
    Exposure Compensation : 0
    Metering Mode : Multi-segment
    Focal Length : 24.0 mm
    Serial Number : 7801808
    Lens Info : 24-120mm f/4
    Lens Make : NIKON
    Lens Model : NIKKOR Z 24-120mm f/4 S
    Lens Serial Number : 20321216
    Maker Note Version : 2.11
    White Balance : PRESET1
    Focus Mode : AF-S
    Crop Hi Speed : 16:9 Crop (6064x4040 cropped to 6064x3416 at pixel 0,312)
    VR Info Version : 0200
    Vibration Reduction : On
    VR Mode : Sport
    VR Type : In-body
    Active D-Lighting : Off
    Picture Control Version : 0311
    Picture Control Name : N-Log
    Picture Control Base : N-Log
    Picture Control Adjust : Quick Adjust
    Picture Control Quick Adjust : n/a
    Sharpness : n/a
    Mid Range Sharpness : n/a
    Clarity : n/a
    Contrast : n/a
    Brightness : n/a
    Saturation : n/a
    Hue : n/a
    Filter Effect : n/a
    Toning Effect : n/a
    Toning Saturation : n/a
    Picture Control Data : (Binary data 108 bytes, use -b option to extract)
    Time Zone : +01:00
    Daylight Savings : No
    Date Display Format : Y/M/D
    ISO : 8063
    ISO Expansion : Off
    ISO2 : 8063
    ISO Expansion 2 : Off
    Vignette Control : Normal
    White Balance Fine Tune : 0 0
    Lens Type : AF
    Lens : 24-120mm f/4
    Flash Mode : Did Not Fire
    Lens Data Version : 0802
    Lens Firmware Version : 1.1.0
    Max Aperture : 4.0
    Focus Distance : 0.528 m
    Lens Position Absolute : 31409
    Lens Mount Type : Z-mount
    Shutter Count : 94
    Vari Program :
    High ISO Noise Reduction : Normal
    AF Info 2 Version : 0402
    AF Detection Method : Hybrid
    AF Area Mode : Auto
    AF Coordinates Available : Yes
    AF Area X Position : 0
    AF Area Y Position : 0
    Focus Result : Out of Focus
    Thumbnail Image : (Binary data 8358 bytes, use -b option to extract)
    Preview Image : (Binary data 434986 bytes, use -b option to extract)
    Preview Image 1 : (Binary data 54108 bytes, use -b option to extract)
    Media Data Size : 464976376
    Media Data Offset : 524296
    Aperture : 5.6
    Image Size : 4040x2276
    Megapixels : 9.2
    Shutter Speed : 1/25
    Auto Focus : On
    Contrast Detect AF : Off
    Lens Spec : 24-120mm f/4 AF
    Avg Bitrate : 334 Mbps
    Rotation : 0
    Focal Length 35mm Equiv : 24.0 mm
    Lens ID : NIKKOR Z 24-120mm f/4 S
    Light Value : 3.3

    C'est vraiment fait à la va-vite.
    Il y a sûrement des options qu'on peut rajouter: le CTRL+F pour la recherche par exemple, filtrer pour ne rendre disponible l'option que sur les fichiers pris en charge par exiftool, regrouper les infos par bloc etc...
    Si besoin je vous laisse le faire, ou alors si j'ai le temps je les ajoute à la demande
    Il suffira alors de refaire les actions 3 à 8 avec les fichiers CS modifiés.

    N'hésitez pas à me dire ça a fonctionné pour vous !
    --------------------------------------------------



    Program.cs
    ---------------
    Code:
    using System;
    using System.Diagnostics;
    using System.IO;
    using System.Text;
    using System.Windows.Forms;
    namespace ShowMetadata {
      internal static class Program {
        [STAThread]
        static void Main(string[] args) {
          if (args.Length == 0 || !File.Exists(args[0])) {
            MessageBox.Show("Fichier invalide.", "Show metadata",
                            MessageBoxButtons.OK, MessageBoxIcon.Error);
            return;
          }
          string filePath = args[0];
          // Répertoire où se trouve ShowMetadata.exe
          string appDir = AppDomain.CurrentDomain.BaseDirectory;
          // ExifTool local
          string exifToolPath = Path.Combine(appDir, "exiftool.exe");
          if (!File.Exists(exifToolPath)) {
            MessageBox.Show(
                "exiftool.exe est introuvable.\n" +
                    "Il doit être dans le même dossier que ShowMetadata.exe",
                "Show metadata", MessageBoxButtons.OK, MessageBoxIcon.Error);
            return;
          }
          var psi = new ProcessStartInfo { FileName = exifToolPath,
                                           Arguments = $"\"{filePath}\"",
                                           RedirectStandardOutput = true,
                                           RedirectStandardError = true,
                                           UseShellExecute = false,
                                           CreateNoWindow = true,
                                           StandardOutputEncoding = Encoding.UTF8 };
          string output;
          string error;
          using (var process = Process.Start(psi)!) {
            output = process.StandardOutput.ReadToEnd();
            error = process.StandardError.ReadToEnd();
            process.WaitForExit();
          }
          // DEBUG VISUEL
          if (string.IsNullOrWhiteSpace(output)) {
            MessageBox.Show(
                "ExifTool n'a retourné aucune donnée.\n\nErreur éventuelle:\n" +
                    error,
                "Show metadata - diagnostic");
          }
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
          Application.Run(new MetadataForm(output, filePath));
        }
      }
    }
    
    metadata.cs
    Code:
    using System;
    using System.Drawing;
    using System.IO;
    using System.Windows.Forms;
    
    namespace ShowMetadata
    {
        public class MetadataForm : Form
        {
            private RichTextBox richTextBox;
    
            public MetadataForm(string metadata, string filePath)
            {
                Text = "Show metadata – " + Path.GetFileName(filePath);
                Width = 900;
                Height = 700;
    
                richTextBox = new RichTextBox
                {
                    Dock = DockStyle.Fill,
                    ReadOnly = true,
                    Font = new Font("Consolas", 10),
                    BackColor = Color.FromArgb(30, 30, 30),
                    ForeColor = Color.White,
                    BorderStyle = BorderStyle.None
                };
    
                Controls.Add(richTextBox);
    
                ApplyColoring(metadata);
            }
    
            private void ApplyColoring(string metadata)
            {
                richTextBox.SuspendLayout();
                richTextBox.Clear();
    
                var lines = metadata.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None);
    
                foreach (var line in lines)
                {
                    // Ligne vide
                    if (string.IsNullOrWhiteSpace(line))
                    {
                        richTextBox.AppendText(Environment.NewLine);
                        continue;
                    }
    
                    // Ligne de type "Nom : Valeur"
                    int colonIndex = line.IndexOf(':');
    
                    if (colonIndex > 0)
                    {
                        string name = line.Substring(0, colonIndex).TrimEnd();
                        string value = line.Substring(colonIndex + 1).TrimStart();
    
                        // Nom
                        AppendColoredText(name, Color.DeepSkyBlue);
    
                        // Espaces jusqu'au :
                        AppendColoredText(" : ", Color.Gray);
    
                        // Valeur
                        AppendColoredText(value, Color.Gainsboro);
                    }
                    else
                    {
                        // Cas inattendu → texte normal
                        AppendColoredText(line, Color.Gainsboro);
                    }
    
                    richTextBox.AppendText(Environment.NewLine);
                }
    
                richTextBox.SelectionStart = 0;
                richTextBox.SelectionLength = 0;
                richTextBox.ResumeLayout();
            }
    
            private void AppendColoredText(string text, Color color)
            {
                richTextBox.SelectionStart = richTextBox.TextLength;
                richTextBox.SelectionLength = 0;
                richTextBox.SelectionColor = color;
                richTextBox.AppendText(text);
                richTextBox.SelectionColor = richTextBox.ForeColor;
            }
        }
    }
    
    ShowMetadata.csproj
    Code:
    <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
    
      <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net8.0-windows</TargetFramework>
        <UseWindowsForms>true</UseWindowsForms>
        <Nullable>enable</Nullable>
      </PropertyGroup>
    
    </Project>
    
    AddContextMenu.reg
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell\ShowMetadata]
    @="Show metadata"
    "Icon"="C:\\Tools\\ShowMetadataPortable\\ShowMetadata.exe"
    
    [HKEY_CLASSES_ROOT\*\shell\ShowMetadata\command]
    @="\"C:\\Tools\\ShowMetadataPortable\\ShowMetadata.exe\" \"%1\""
    
     
Chargement...

Partager cette page

Vous souhaitez annoncer sur le Repaire ? Contactez-nous