mrshoenel / mkvinfo2json Goto Github PK
View Code? Open in Web Editor NEWMkvInfo2Json is a tool to recursively scan directories for MKV files and extract meta-information using mkvinfo that is then stored as JSON.
License: MIT License
MkvInfo2Json is a tool to recursively scan directories for MKV files and extract meta-information using mkvinfo that is then stored as JSON.
License: MIT License
at the beginning of the output you add �[32m
to make the font look green.
I used > to pipe the output into a file
Yeah, I know there is the -o option which does not add any chars to the output.
Other software detects if it is writing to console or into file...
since the output is not pretty printed, why bother coloring it?
thank you very much
Add the inversion; import json tag file into mkv.
Hi,
thanks for creating this great tool. I am new to json, but I believe it is the best way to interpret complex information like mkvinfo output. (20 years ago I would have used XML queries)
I just tried extracting audio track info from a bunch of files, but it does not work.
This
$ mkvinfo file.mkv
+ EBML-Kopf
|+ EBML-Version: 1
|+ EBML-Leseversion: 1
|+ Maximale EBML-ID-Länge: 4
|+ Maximale Länge des EBML-Längenattributes: 8
|+ Dokumententyp: matroska
|+ Dokumententyp, Version: 4
|+ Dokumententyp, Leseversion: 2
+ Segment: Größe 303956766
|+ Seekkopf (Untereinträge werden ausgelassen)
|+ Segment-Information
| + Zeitstempelskalierungsfaktor: 1000000
| + Multiplexeranwendung: libebml v1.3.0 + libmatroska v1.4.1
| + Schreibende Anwendung: mkvmerge v6.4.1 ('Omega Point') built on Sep 16 2013 22:05:10
| + Dauer: 00:20:44.928000000
| + Datum: 2013-10-12 11:34:09 UTC
| + Segment-UID: 0x99 0x8b 0xab 0x59 0x28 0x8c 0xd3 0x9a 0x97 0x6e 0x2d 0xfc 0x46 0x0d 0x90 0x9c
| + Titel: 07x06 Der Schmetterlings-Defekt (2012)
|+ Spuren
| + Spur
| + Spurnummer: 1 (Spur-ID für Mkvmerge & Mkvextract: 0)
| + Spur-UID: 2561628302
| + Spurtyp: Video
| + »Anzeige erzwingen«-Schalter: 1
| + Framebündelungs-Schalter: 0
| + Minimaler Zwischenspeicher: 1
| + Codec-ID: V_MPEG4/ISO/AVC
| + Private Codec-Daten: Größe 55 (H.264-Profil: High @L4.1)
| + Standarddauer: 00:00:00.040000000 (25.000 Bilder/Felder pro Sekunde im Falle einer Videospur)
| + Sprache: eng
| + Videospur
| + Breite in Pixeln: 720
| + Höhe in Pixeln: 404
| + Anzeigebreite: 720
| + Anzeigehöhe: 404
| + Spur
| + Spurnummer: 2 (Spur-ID für Mkvmerge & Mkvextract: 1)
| + Spur-UID: 7779615915173145498
| + Spurtyp: Audio
| + Codec-ID: A_AC3
| + Standarddauer: 00:00:00.032000000 (31.250 Bilder/Felder pro Sekunde im Falle einer Videospur)
| + Sprache: ger
| + Audiospur
| + Abtastrate: 48000
| + Kanäle: 6
| + »Standardspur«-Schalter: 1
| + Name: Deutsch
| + Spur
| + Spurnummer: 3 (Spur-ID für Mkvmerge & Mkvextract: 2)
| + Spur-UID: 2979035302
| + Spurtyp: Audio
| + »Standardspur«-Schalter: 0
| + Codec-ID: A_AC3
| + Standarddauer: 00:00:00.032000000 (31.250 Bilder/Felder pro Sekunde im Falle einer Videospur)
| + Audiospur
| + Abtastrate: 48000
| + Kanäle: 6
| + »Anzeige erzwingen«-Schalter: 0
| + »Originalsprache«-Schalter: 1
| + Name: Englisch
|+ EBML-Platzhalter: Größe 5100
|+ Cluster
results in
{
"filePath": "file.mkv",
"dirName": "/path/",
"fileSize": 303956830,
"head": {
"EBML-Version": 1,
"EBML-Leseversion": 1,
"Maximale EBML-ID-Länge": 4,
"Maximale Länge des EBML-Längenattributes": 8,
"Dokumententyp": "matroska",
"Dokumententyp, Version": 4,
"Dokumententyp, Leseversion": 2
},
"segInfo": {
"Seekkopf (Untereinträge werden ausgelassen)": null,
"Segment-Information": null,
"Zeitstempelskalierungsfaktor": 1000000,
"Multiplexeranwendung": "libebml v1.3.0 + libmatroska v1.4.1",
"Schreibende Anwendung": "mkvmerge v6.4.1 ('Omega Point') built on Sep 16 2013 22:05:10",
"Dauer": "00:20:44.928000000",
"Datum": "2013-10-12 11:34:09 UTC",
"Segment-UID": "0x99 0x8b 0xab 0x59 0x28 0x8c 0xd3 0x9a 0x97 0x6e 0x2d 0xfc 0x46 0x0d 0x90 0x9c",
"Titel": "title",
"Spuren": null,
"Spur": null,
"Spurnummer": "3 (Spur-ID für Mkvmerge & Mkvextract: 2)",
"Spur-UID": 2979035302,
"Spurtyp": "Audio",
"»Anzeige erzwingen«-Schalter": 0,
"Framebündelungs-Schalter": 0,
"Minimaler Zwischenspeicher": 1,
"Codec-ID": "A_AC3",
"Private Codec-Daten": "Größe 55 (H.264-Profil: High @L4.1)",
"Standarddauer": "00:00:00.032000000 (31.250 Bilder/Felder pro Sekunde im Falle einer Videospur)",
"Sprache": "ger",
"Videospur": null,
"Breite in Pixeln": 720,
"Höhe in Pixeln": 404,
"Anzeigebreite": 720,
"Anzeigehöhe": 404,
"Audiospur": null,
"Abtastrate": 48000,
"Kanäle": 6,
"»Standardspur«-Schalter": 0,
"Name": "Englisch",
"»Originalsprache«-Schalter": 1,
"EBML-Platzhalter": "Größe 5100",
"Cluster": null
},
"segTracks": [],
"chapters": []
},
might it be because my system is set to German?
setting LANG and LANGUAGE to EN did not change the mkvinfo language.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.