Giter Site home page Giter Site logo

inject-hevc-dhdr-metadata's Introduction

Inject dynamic hdr metadata of hevc video for macOS

This script will extract dolby vision (dv) or hdr10plus metadata from a hevc .mkv/.mp4 video,
copy the content of another hdr10 compatible hevc .mkv/.mp4 video with same length and same resolution,
and then output those content to a new .mkv video with the dv/hdr10plus metadata injected.

The purpose of this script is to fix the missing/incorrect dv/hdr10plus metadata on some re-encoded videos especially those encoded by ffmpeg.
Some ffmpeg seems to encode a dv hdr video to a new video having the same dv profile with dv metadata.
However, that new video has no dv metadata in fact (its dv metadata is 0 byte)(tested on 2024-07-19).
Therefore, additional work is needed to inject the dv metadata to that new video.
And this script is mainly for this purpose.

How to Use :

Run the command script directly.
It will request your input for both the path of video with dv/hdr10plus metadata and the path of source video which its content will be copied.
Then it will request your input for the path of output (work) folder.
After that, the script will run and a new copied video will be injected with dv metadata at the end.

If you are using terminal, you can run the command script with arguments as follows.

Argument1: full path of source video 1 (.mkv/.mp4). Its dv/hdr10plus metadata would be extracted [Optional]
Argument2: full path of source video 2 (.mkv/.mp4). Its video and audio would be copied [Optional]
Argument3: full path of output (work) folder [Optional]



Download :

cd ~/Desktop && git clone https://github.com/alpha-0/inject-hevc-dhdr-metadata.git && \
chmod 755 ~/Desktop/inject-hevc-dhdr-metadata/inject-hevc-dhdr-metadata.command

Setup and Run :

Edit the file "inject-hevc-dhdr-metadata.command" by any text editor such as "TextEdit.app".

Find the "Settings" section and edit some values if needed.

Find the "Settings of Required Tools" section and edit those path of tools.

Make sure the required tools are installed in the corresponding path.

Save the file.

And then run the file directly.

Required Tools :

ffmpeg (exec) : multimedia framework. The latest build is recommended ( https://www.ffmpeg.org/download.html )
( To build ffmpeg static binary for intel mac, you may interest on this repository:
https://github.com/alpha-0/ffmpeg-static-OSX-with-hdr10plus )

dovi_tool (exec) : CLI tool for working with Dolby Vision ( https://github.com/quietvoid/dovi_tool )

hdr10plus_tool (exec) : CLI utility to work with HDR10+ in HEVC files ( https://github.com/quietvoid/hdr10plus_tool )

MKVToolNix (app) : a set of tools to create, alter and inspect mkv file ( https://mkvtoolnix.download/downloads.html )

To Report Bug :

Please Report to https://github.com/alpha-0/inject-hevc-dhdr-metadata/issues

inject-hevc-dhdr-metadata's People

Contributors

alpha-0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.