coding-socks / matroska

A Matroska parser written in Go.
MIT License
3 stars 2 forks source link

[Question] About functionality of the programm #7

Open the-hotmann opened 3 months ago

the-hotmann commented 3 months ago

Reading the docs I was wondering if this tool also allows to just "modify" an existing MKV?

I would like to parse an MKV File and clean the titles.

For example:

VIDEO: "name of video"
AUDIO1: "Surround 7.1"
AUDIO2: "Surround 7.1"
AUDIO3: "Surround 5.1"
SUBTITLE1: 
SUBTITLE2: 
SUBTITLE3: 
SUBTITLE4: 
SUBTITLE5: 
SUBTITLE5: 

And I want to parse the file and set the title according of what this is. For example:

VIDEO: "" (shall never have a title)
AUDIO1: "TrueHD Atmos 7.1 24bits @3574kbps"
AUDIO2: "TrueHD Atmos 7.1 24bits @3539kbps"
AUDIO3: "DTS-HD MA 5.1 24bits @2466kbps"
SUBTITLE1: "Forced (SRT)"
SUBTITLE2: "Forced (VOB)"
SUBTITLE3: "Forced (PGS)"
SUBTITLE4: "Full (SRT)"
SUBTITLE5: "Full (VOB)"
SUBTITLE5: "Full (PGS)"

For "Forced" subtitles I also want to set the "forced" bit.

Is this genereally possible with this tool? Best regards :)

nerg4l commented 3 months ago

Hi @the-hotmann,

Due to lack of time, I never implemented encoding. I hope I can work on this in the future, but as of now, I would recommend https://github.com/hdt3213/rdb instead of this library.

the-hotmann commented 3 months ago

Hi @nerg4l,

Currently, I utilize go-mediainfo to obtain infos to generate the "nice names" of each track. To achieve this, I install libmediainfo0v5 & libmediainfo-dev on Alpine. To write it back to the MKV file I install mkvtoolnix utilize its tool mkvpropedit. While this method works effectively, it necessitates the ability to launch a shell within the container. Additionally, it prevents me from compiling the entire process into a single static binary. Nevertheless, it serves its purpose.

However, I've been exploring alternatives - specifically, a library that offers similar functionalities but can both read from and write to MKV files and is solely built in Golang.

Thank you for the recommendation and for your package :)