File: README.md

package info (click to toggle)
mediainfo 26.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,912 kB
  • sloc: cpp: 19,090; objc: 3,102; xml: 1,428; sh: 1,328; python: 263; makefile: 212
file content (461 lines) | stat: -rw-r--r-- 13,946 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# MediaInfo README

MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files.

[![MediaInfo_Checks](https://github.com/MediaArea/MediaInfo/actions/workflows/MediaInfo_Checks.yml/badge.svg)](https://github.com/MediaArea/MediaInfo/actions/workflows/MediaInfo_Checks.yml) [![MediaInfo-Qt Checks](https://github.com/MediaArea/MediaInfo/actions/workflows/MediaInfo-Qt_Checks.yml/badge.svg)](https://github.com/MediaArea/MediaInfo/actions/workflows/MediaInfo-Qt_Checks.yml) [![MediaInfo-Android Checks](https://github.com/MediaArea/MediaInfo/actions/workflows/MediaInfo-Android_Checks.yml/badge.svg)](https://github.com/MediaArea/MediaInfo/actions/workflows/MediaInfo-Android_Checks.yml)

## About

This repository contains the source code of the CLI and GUI for [MediaInfoLib](https://github.com/MediaArea/MediaInfoLib).

The CLI is available on various desktop operating systems.

There are a few different GUIs for Windows and Linux as shown below. Android and Apple's operating systems have their own GUIs too.

|                   | Windows                                                                     | Linux                                                                     |
| ----------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Qt GUI**        | <img src="Source/Resource/Image/Readme/Windows_Qt.png" width="250"/>        | <img src="Source/Resource/Image/Readme/Linux_Qt.png" width="250"/>        |
| **UWP GUI**       | <img src="Source/Resource/Image/Readme/Windows_UWP.png" width="250"/>       |                                                                           |
| **VCL GUI**       | <img src="Source/Resource/Image/Readme/Windows_VCL.png" width="250"/>       |                                                                           |
| **wxWidgets GUI** | <img src="Source/Resource/Image/Readme/Windows_wxWidgets.png" width="250"/> | <img src="Source/Resource/Image/Readme/Linux_wxWidgets.png" width="250"/> |

The CLI and GUIs are available for various CPU architectures.

## How to build MediaInfo

### Index

- [Build for Windows](#build-for-windows)
  - [Prerequisites](#prerequisites)
  - [Build Windows CLI](#build-windows-cli)
  - [Build Windows GUI](#build-windows-gui)
    - [Qt GUI](#qt-gui)
    - [VCL GUI](#vcl-gui)
    - [wxWidgets GUI](#wxwidgets-gui)
- [Build for macOS and Linux](#build-for-macos-and-linux)
  - [Dependencies under macOS](#dependencies-under-macos)
  - [Dependencies under Linux](#dependencies-under-linux)
  - [Build MediaInfo CLI](#build-mediainfo-cli)
  - [Build MediaInfo GUI](#build-mediainfo-gui)
  - [Build MediaInfo Qt GUI](#build-mediainfo-qt-gui)
- [Build for other operating systems](#build-for-other-operating-systems)

### Build for Windows

MediaInfo can be built on Windows for x86, x86-64/x64/amd64 and arm64 CPU architectures.

#### Prerequisites

The following are the common prerequisites that are required in order to build the CLI or any of the GUI on Windows.

##### Software

- Git for Windows (<https://gitforwindows.org/>) and/or GitHub Desktop (<https://desktop.github.com/>)
- Visual Studio 2022 Community Edition (<https://visualstudio.microsoft.com/vs/community/>) or other editions
  - Visual Studio 2026 can also be used. In this case, use the `.slnx` files in `MSVC2026` directories instead of the `.sln` files in `MSVC2022` directories throughout this guide.

##### Repositories

Create an empty folder and clone the following repositories using Git or GitHub Desktop:

- This repository (<https://github.com/MediaArea/MediaInfo>)
- <https://github.com/MediaArea/MediaInfoLib>
- <https://github.com/MediaArea/ZenLib>
- <https://github.com/MediaArea/zlib>

If you need Curl or the Graph Plugin, they may be obtained from [MediaArea-Utils-Binaries](https://github.com/MediaArea/MediaArea-Utils-Binaries) and [MediaInfo-Graph-Plugin-Binaries](https://github.com/MediaArea/MediaInfo-Graph-Plugin-Binaries) respectively.

The rest of this guide will assume that you are in this newly created folder. It is also assumed that you have the development tools in the `PATH` by either opening a developer command prompt, calling the appropriate batch file or manually adding them to `PATH`.

#### Build Windows CLI

To build with Visual Studio IDE, open `MediaInfo\Project\MSVC2022\MediaInfo.sln` and build **MediaInfo-CLI** project.

To build with command line:

```cmd
MSBuild -t:MediaInfo-CLI -p:Configuration=Release;Platform=x64 MediaInfo\Project\MSVC2022\MediaInfo.sln
```

To run the CLI:

```cmd
MediaInfo\Project\MSVC2022\x64\Release\MediaInfo.exe
```

The build script can also be used, where `<arch>` can be `Win32`, `x64` or `ARM64` and `<msvc>` can be `MSVC2022` or `MSVC2026`:

```powershell
.\MediaInfo\Release\Build_CLI_Windows.ps1 <arch> <msvc>
```

Similarly, the release script can be used to generate a zip package similar to the official release after the build script is run. Note that 7z and Curl from MediaArea-Utils-Binaries are required.

```powershell
.\MediaInfo\Release\Release_CLI_Windows.ps1 <arch> <msvc>
```

#### Build Windows GUI

There are multiple GUIs utilizing different GUI frameworks on Windows. Each of the GUIs have different designs and feature sets. The supported Windows versions and CPU architectures depend on the GUI frameworks.

##### Qt GUI

Install Qt for open source use (<https://www.qt.io/download-qt-installer-oss>) if you do not have Qt installed yet. It is recommended to use the latest version or at least 6.8.0 for Windows 11. Python is required to update the translation files. It may be installed from the Microsoft Store.

Prepare the prerequisites by running the following commands:

```cmd
MSBuild -t:MediaInfoDLL -p:Configuration=Release;Platform=x64 MediaInfoLib\Project\MSVC2022\MediaInfoLib.sln
call MediaInfo\Source\GUI\Qt\Qt_Translations_Updater\update_Qt_translations.cmd
```

The Qt GUI can be built by opening `MediaInfo\Project\QMake\GUI\MediaInfoQt.pro` in Qt Creator or by using the command line:

```cmd
qmake.exe MediaInfo\Project\QMake\GUI\MediaInfoQt.pro -spec win32-msvc "CONFIG+=qtquickcompiler" && jom.exe qmake_all
jom.exe
```

To run the GUI using Qt Creator, press `Ctrl` + `R`.

To run the GUI using command line, the Qt dependencies need to be deployed first:

```cmd
windeployqt --no-quick-import --no-translations --no-system-d3d-compiler --no-system-dxc-compiler --no-compiler-runtime --no-opengl-sw x64\MediaInfo.exe
```

Then the GUI can be run:

```cmd
x64\MediaInfo.exe
```

##### VCL GUI

Install C++Builder 12 Community Edition (<https://www.embarcadero.com/products/cbuilder/starter>) and install the following dependencies from `Tools` > `GetIt Package Manager`:

- VCL Windows Style - Windows11 Dark 1.0 by Embarcadero Technologies
- EdgeView2 SDK 1.0.2739.1 by Microsoft

Prepare the dependencies by running the following commands:

```cmd
MSBuild -t:MediaInfoDLL -p:Configuration=Release;Platform=x64 MediaInfoLib\Project\MSVC2022\MediaInfoLib.sln
xcopy /y MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo.dll MediaInfo\Project\BCB\GUI\Win64x\Release\
xcopy /y "C:\Program Files (x86)\Embarcadero\Studio\23.0\Redist\win64\WebView2Loader.dll" MediaInfo\Project\BCB\GUI\Win64x\Release\
robocopy MediaInfo\Source\Resource\Plugin MediaInfo\Project\BCB\GUI\Win64x\Release\Plugin /mir
call "C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\rsvars.bat"
MSBuild /t:Build /p:Configuration=Release;Platform=Win64x zlib\contrib\BCB\zlib.cbproj
MSBuild /t:Build /p:Configuration=Release;Platform=Win64x ZenLib\Project\BCB\Library\ZenLib.cbproj
```

The VCL GUI can be built by opening `MediaInfo\Project\BCB\GUI\MediaInfo_GUI.cbproj` in C++Builder or by using the command line:

```cmd
MSBuild /t:Build /p:Configuration=Release;Platform=Win64x MediaInfo\Project\BCB\GUI\MediaInfo_GUI.cbproj
```

To run the GUI:

```cmd
MediaInfo\Project\BCB\GUI\Win64x\Release\MediaInfo_GUI.exe
```

##### wxWidgets GUI

Clone <https://github.com/MediaArea/wxWidgets> to obtain the required wxWidgets source.

To build with Visual Studio IDE, open `MediaInfo\Project\MSVC2022\MediaInfo.sln` and build **MediaInfo-GUI** project.

To build with command line:

```cmd
MSBuild -t:MediaInfo-GUI -p:Configuration=Release;Platform=x64 MediaInfo\Project\MSVC2022\MediaInfo.sln
```

To run the GUI:

```cmd
MediaInfo\Project\MSVC2022\x64\Release\MediaInfo-GUI.exe
```

### Build for macOS and Linux

First, you must create a directory which will receive the MediaInfo directory, and ZenLib and MediaInfoLib if you decide to compile them yourself.

In this document, this directory will be referred as $BUILD_DIR.

#### Dependencies under macOS

##### MacPorts

Some dependencies are available with MacPorts. To install MacPorts:
<https://guide.macports.org/#installing>

```sh
port install autoconf automake libtool pkgconfig zlib wxWidgets-3.0
```

*MediaArea tools*

- [libzen](#zenlib)
- [libmediainfo](#mediainfolib)

#### Dependencies under Linux

##### Listing

*Build tools*

- git
- automake
- autoconf
- libtool
- pkgconfig
- make
- g++

*MediaArea tools*

- libzen0
- libmediainfo0

*CLI and GUI dependencies*

- zlib

*GUI only dependencies*

- wxwidgets

##### Ubuntu

*Build tools and CLI/GUI dependencies*

```sh
apt-get install git automake autoconf libtool pkg-config make g++ zlib1g-dev
```

*MediaArea tools*

Go to https://mediaarea.net/fr/MediaInfo/Download/Ubuntu and download the libmediainfo0, libmediainfo-dev, libzen0 and libzen-dev packages corresponding to your Ubuntu version. Then install them with :

```sh
dpkg -i libmediainfo* libzen*
```

*GUI only dependencies*

```sh
apt-get install libwxgtk3.2-dev
```

##### Fedora

*Build tools and CLI/GUI dependencies*

```sh
sudo yum install git automake autoconf libtool pkgconfig make gcc-c++ zlib-devel
```

*MediaArea tools*

Go to <https://mediaarea.net/fr/MediaInfo/Download/Fedora> and download the libmediainfo0, libmediainfo-devel, libzen0 and libzen-devel packages corresponding to your Fedora version and CPU architecture. Then install them with :

```sh
sudo yum install libmediainfo*.rpm libzen*.rpm
```

*GUI only dependencies*

```sh
sudo yum install wxGTK-devel desktop-file-utils
```

##### Debian

*Build tools and CLI/GUI dependencies*

```sh
apt-get install git automake autoconf libtool pkg-config make g++ zlib1g-dev
```

*MediaArea tools*

Go to <https://mediaarea.net/fr/MediaInfo/Download/Debian> and download the libmediainfo0, libmediainfo-dev, libzen0 and libzen-dev packages corresponding to your Debian version. Then install them with :

```sh
dpkg -i libmediainfo* libzen*
```

*GUI only dependencies*

```sh
apt-get install libwxgtk3.0-dev
```

##### OpenSUSE

*Build tools and CLI/GUI dependencies*

```sh
zypper install git automake autoconf libtool pkgconfig make gcc-c++ zlib-devel
```

*MediaArea tools*

Go to <https://mediaarea.net/fr/MediaInfo/Download/openSUSE> and download the libmediainfo0, libmediainfo-devel, libzen0 and libzen-devel packages corresponding to your OpenSuse version. Then install them with :

```sh
rpm -i libmediainfo* libzen*
```

*GUI only dependencies*

```sh
zypper install libqt4-devel libQtWebKit-devel update-desktop-files
```

#### Build MediaInfo CLI

When you have done all the prerequisites for your configuration, then build MediaInfo. We start with the CLI.

```sh
cd $BUILD_DIR
git clone https://github.com/MediaArea/MediaInfo.git
cd MediaInfo/Project/GNU/CLI
./autogen.sh
```

Then, under macOS:

```sh
./configure --enable-staticlibs
make
```

Under Linux:

```sh
./configure --enable-shared
make
```

Or for statically linked executable, if you also build ZenLib and MediaInfoLib:

```sh
./configure --enable-staticlibs
make
```

##### Launch the CLI

```sh
./mediainfo
```

#### Build MediaInfo GUI

If you have already built the CLI, no need to run git twice. In fact, if you re-run git with an existing MediaInfo directory, git will complain and exit.

To compile MediaInfo GUI under macOS and Linux:

```sh
cd $BUILD_DIR
git clone https://github.com/MediaArea/MediaInfo.git
cd MediaInfo/Project/GNU/GUI
./autogen.sh
```

Then, under macOS:

```sh
export PATH=$PATH:/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3/0/bin
./configure --enable-staticlibs
make
```

Under Linux:

```sh
./configure --enable-shared
make
```

Or for statically linked executable, if you also build ZenLib and MediaInfoLib:

```sh
./configure --enable-staticlibs
make
```

##### Launch the GUI

```sh
./mediainfo-gui
```

#### Build MediaInfo Qt GUI

Install the following dependencies. Their exact names depend on the package repository of your operating system.

- qt-base-dev
- qt-svg-dev
- qt-tools-dev-tools
- qt-webengine-dev
- curl (optional)
- graphviz (optional)

Then:

```sh
qmake MediaInfo/Project/QMake/GUI/MediaInfoQt.pro -spec linux-g++ CONFIG+=qtquickcompiler && make qmake_all
make -j4
```

##### Launch the Qt GUI

```sh
./mediainfo-gui
```

#### Optional : build ZenLib and MediaInfoLib

##### ZenLib

To compile ZenLib under macOS and Linux:

```sh
cd $BUILD_DIR
git clone https://github.com/MediaArea/ZenLib.git
cd ZenLib/Project/GNU/Library
./autogen.sh
./configure --enable-static
make
```

##### MediaInfoLib

To compile MediaInfoLib under macOS and Linux:

```sh
cd $BUILD_DIR
git clone https://github.com/MediaArea/MediaInfoLib.git
cd MediaInfoLib/Project/GNU/Library
./autogen.sh
./configure --enable-static
make
```

### Build for other operating systems

Project files for other operating systems can be found in `MediaInfo/Source/GUI` and `MediaInfo/Project`.

---

MediaInfo - <https://github.com/MediaArea/MediaInfo>
Copyright (c) MediaArea.net SARL. All Rights Reserved.

This program is freeware under BSD-2-Clause license conditions.
See the [License](https://mediaarea.net/en/MediaInfo/License) for more information