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
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
|
%global _empty_manifest_terminate_build 0
Name: python-XenonMKV
Version: 0.4.3
Release: 1
Summary: XenonMKV is a video container conversion tool that takes MKV files and outputs them as MP4 files.
License: UNKNOWN
URL: https://github.com/barisariburnu/xenonmkv
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/db/e5/2a4d20f3283dce9c83826080e0e2ba45eeb966e1ff300a867e1ada1fe9aa/XenonMKV-0.4.3.tar.gz
BuildArch: noarch
%description
**About XenonMKV**
XenonMKV is a video container conversion tool that takes MKV files and outputs them as MP4 files. It does not re-encode video, and only decodes and encodes audio as necessary.
You'll find this tool useful for converting videos for devices that support H.264 video and AAC audio, but do not understand the MKV container. Other uses include converting videos with AC3 or DTS audio to AAC audio (2 channel or 5.1 channels).
Originally, XenonMKV was meant for Xbox 360 consoles, but I'm finding now that this tool is much more useful for my `BlackBerry PlayBook <http://blackberry.com/playbook>`_. You may also find it useful for Roku devices or to pre-convert videos to reduce the likelihood that Plex will need to re-encode them.
**Disclosure**
*Note:* During early development of this application, I worked for `BlackBerry <http://blackberry.com>`_. The opinions expressed here are my own and don’t necessarily represent those of my previous or current employer(s). All code is developed on my own time without use of company resources.
**System Requirements**
XenonMKV was built and tested on a standard Ubuntu 12.04 LTS installation (x86_64), but most of the utilities and requirements here are possible to run on most popular \*nix distributions. I've also given the suite of tools a cursory run on Ubuntu 13.10 and they seem to work. Once 14.04 is released in final form I plan to retest.
Windows 7 (64-bit) and Mac OS X 10.8 are also supported, but may work on different versions of OS X and Windows.
You will need at least Python 2.7 for the argparse library, and ideally
Python 2.7.3 or later in the 2.x series.
**Ubuntu 12.04**
You will need some supporting packages. These will be installed automatically
if they are not found on your system, or they can be installed beforehand.
On desktop installations, please ensure that 'Update Manager' is closed before installing dependendencies, or
you will receive a nasty message in the form of:
```
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
```
**Install All Dependencies (at once)**
*sudo apt-get install mediainfo mkvtoolnix mplayer faac gpac*
At the current state of development, on Ubuntu you do not need to install
any Python packages from requirements.txt as the dependent tools are installed with 'apt'.
If this changes in the future, requirements can be installed by running:
*sudo apt-get install python-setuptools && sudo easy_install -U pip*
*pip install -r requirements.txt*
**Individual Package Details**
`mediainfo <http://mediainfo.sourceforge.net/en/Download/Ubuntu>`_
*sudo apt-get install mediainfo*
Alternatively, add the official mediainfo PPA and install the package, which the developer suggests might be a good idea:
*sudo add-apt-repository ppa:shiki/mediainfo*
*sudo apt-get update*
*sudo apt-get install mediainfo*
`mkvtoolnix <http://www.bunkus.org/videotools/mkvtoolnix/downloads.html>`_
*sudo apt-get install mkvtoolnix*
`mplayer <http://www.mplayerhq.hu/design7/news.html>`_
*sudo apt-get install mplayer*
`faac <http://www.audiocoding.com/downloads.html>`_
*sudo apt-get install faac*
`MP4Box <https://sourceforge.net/projects/gpac/>`_
*sudo apt-get install gpac*
To compile your own gpac version, follow `these instructions <http://gpac.wp.mines-telecom.fr/2011/04/20/compiling-gpac-on-ubuntu/>`_. Then, run the following commands for success (the SpiderMonkey JS library isn't needed):
*./configure --enable-debug --use-js=no*
*make*
By default MP4Box will be installed in `/usr/local/{bin,lib,man,share}` as necessary.
If your PATH variable includes `/usr/local/bin` first, your custom compiled version will be executed instead of the system version.
To put MP4Box into a specific path on compile, use the `--prefix` option with `./configure`
*./configure --enable-debug --use-js=no --prefix=/opt/gpac*
Run `sudo make install` to finalize.
Then to run, specify LD_LIBRARY_PATH if it is not already in your LD configuration. On Ubuntu /usr/local/lib is already there, so just run:
*/usr/local/bin/MP4Box*
For a custom prefix:
*LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/opt/gpac/lib" /opt/gpac/bin/MP4Box*
**Ubuntu 10.04**
Not currently still tested against, but here are the historical changes required to make XenonMKV functional:
Install Python 2.7, either from source or add the appropriate PPA. If you need to upgrade your system from 10.04 to 12.04 later, make sure to purge this PPA first.
*sudo add-apt-repository ppa:fkrull/deadsnakes*
*sudo apt-get update*
*sudo apt-get install python2.7*
- Install mediainfo by adding the `ppa:shiki/mediainfo` PPA as the *mediainfo* package is not in the 10.04 repository.
- Perform *install dependencies* step from the 12.04 instructions
- Run the application directly referencing Python 2.7:
*/usr/bin/python2.7 /path/to/xenonmkv.py [arguments]*
**Other Linux Distributions**
Install the packages mentioned above, either from source or your distribution's package manager.
**Usage**
Basic usage with default settings:
*xenonmkv.py /path/to/file.mkv*
To ensure your Xbox 360 console will play the resulting file, at a possible expense
of audio quality:
*xenonmkv.py /path/to/file.mkv --profile xbox360*
To see all command line arguments:
*xenonmkv.py --help*
For a quiet run (batch processing or in a cronjob):
*xenonmkv.py /path/to/file.mkv -q*
The -q option ensures you will never be prompted for input and would be useful
for integration with software like SABnzbd+.
If you're reporting an issue, please run XenonMKV in debug/very verbose mode:
*xenonmkv.py /path/to/file.mkv -vv*
For the latest release of XenonMKV, I've included a really crummy script that handles batch encoding of MKV files on Linux, since I always screw up the parameters passed to `find`. Use:
*batch.py source_directory <xenonmkv_parameters>*
**Suggestions/Caveats**
- If your MKV files aren't too large, distributions that mount `/tmp` as tmpfs (planned for Fedora 18, Ubuntu 12.10, Debian Wheezy) can show a significant peedup if you use `--scratch-dir /tmp`. Right now for future proofing, the scratch directory is set to `/var/tmp`.
- Use `-vv` to find display debug information and output exactly what's going on during the processing stages.
- Native multiple file support (eg: convert an entire directory of MKVs) is not inherently in this version, but you can do something like this in the meantime to queue up a list:
*cd ~/mymkvdir*
*for i in `ls *.mkv`; do /path/to/xenonmkv.py $i --destination ~/mymp4dir; done*
- Performance on an Intel Core i5-2500K CPU at 3.3GHz, with a 1TB Western Digital Black SATA hard drive: A 442MB source MKV file with h.264 video and 6-channel AC3 audio is converted into a PlayBook-compatible MP4 (same video, 2-channel AAC audio, quality q=150) in 40.6 seconds. This does not have any enhancements such as a tmpfs mount. You could probably get much better performance with a solid state drive, and obviously processor speed will have an impact here.
**Audio Downmixing/Re-Encoding**
By default, XenonMKV tries not to resample, downmix or re-encode any part of the content provided. However, chances are your source files will contain AC3, DTS or MP3 audio that needs to be re-encoded. In this case, the original source audio will always be downmixed to a two channel AAC file before it is repackaged.
If the audio track in your MKV file is already AAC, the next thing to consider is your playback device. The Xbox 360 will not play audio in an MP4 container unless it is 2-channel stereo, which is a highly stupid limitation. Other devices, like the PlayBook, will happily parse up to 5.1 channel audio. By using either the `--channels` or `--profile` settings, you can tell XenonMKV how many channels of audio are acceptable from an AAC source before it will aggressively re-encode and downmix to 2-channel stereo.
In short, if you plan to play MP4s on your Xbox 360, definitely use the `--profile xbox360` setting to make sure that no more than two channels make it into the output file. If your device is more reasonable, the default settings should be fine. More profiles will be added as users confirm their own device capabilities.
%package -n python3-XenonMKV
Summary: XenonMKV is a video container conversion tool that takes MKV files and outputs them as MP4 files.
Provides: python-XenonMKV
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-XenonMKV
**About XenonMKV**
XenonMKV is a video container conversion tool that takes MKV files and outputs them as MP4 files. It does not re-encode video, and only decodes and encodes audio as necessary.
You'll find this tool useful for converting videos for devices that support H.264 video and AAC audio, but do not understand the MKV container. Other uses include converting videos with AC3 or DTS audio to AAC audio (2 channel or 5.1 channels).
Originally, XenonMKV was meant for Xbox 360 consoles, but I'm finding now that this tool is much more useful for my `BlackBerry PlayBook <http://blackberry.com/playbook>`_. You may also find it useful for Roku devices or to pre-convert videos to reduce the likelihood that Plex will need to re-encode them.
**Disclosure**
*Note:* During early development of this application, I worked for `BlackBerry <http://blackberry.com>`_. The opinions expressed here are my own and don’t necessarily represent those of my previous or current employer(s). All code is developed on my own time without use of company resources.
**System Requirements**
XenonMKV was built and tested on a standard Ubuntu 12.04 LTS installation (x86_64), but most of the utilities and requirements here are possible to run on most popular \*nix distributions. I've also given the suite of tools a cursory run on Ubuntu 13.10 and they seem to work. Once 14.04 is released in final form I plan to retest.
Windows 7 (64-bit) and Mac OS X 10.8 are also supported, but may work on different versions of OS X and Windows.
You will need at least Python 2.7 for the argparse library, and ideally
Python 2.7.3 or later in the 2.x series.
**Ubuntu 12.04**
You will need some supporting packages. These will be installed automatically
if they are not found on your system, or they can be installed beforehand.
On desktop installations, please ensure that 'Update Manager' is closed before installing dependendencies, or
you will receive a nasty message in the form of:
```
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
```
**Install All Dependencies (at once)**
*sudo apt-get install mediainfo mkvtoolnix mplayer faac gpac*
At the current state of development, on Ubuntu you do not need to install
any Python packages from requirements.txt as the dependent tools are installed with 'apt'.
If this changes in the future, requirements can be installed by running:
*sudo apt-get install python-setuptools && sudo easy_install -U pip*
*pip install -r requirements.txt*
**Individual Package Details**
`mediainfo <http://mediainfo.sourceforge.net/en/Download/Ubuntu>`_
*sudo apt-get install mediainfo*
Alternatively, add the official mediainfo PPA and install the package, which the developer suggests might be a good idea:
*sudo add-apt-repository ppa:shiki/mediainfo*
*sudo apt-get update*
*sudo apt-get install mediainfo*
`mkvtoolnix <http://www.bunkus.org/videotools/mkvtoolnix/downloads.html>`_
*sudo apt-get install mkvtoolnix*
`mplayer <http://www.mplayerhq.hu/design7/news.html>`_
*sudo apt-get install mplayer*
`faac <http://www.audiocoding.com/downloads.html>`_
*sudo apt-get install faac*
`MP4Box <https://sourceforge.net/projects/gpac/>`_
*sudo apt-get install gpac*
To compile your own gpac version, follow `these instructions <http://gpac.wp.mines-telecom.fr/2011/04/20/compiling-gpac-on-ubuntu/>`_. Then, run the following commands for success (the SpiderMonkey JS library isn't needed):
*./configure --enable-debug --use-js=no*
*make*
By default MP4Box will be installed in `/usr/local/{bin,lib,man,share}` as necessary.
If your PATH variable includes `/usr/local/bin` first, your custom compiled version will be executed instead of the system version.
To put MP4Box into a specific path on compile, use the `--prefix` option with `./configure`
*./configure --enable-debug --use-js=no --prefix=/opt/gpac*
Run `sudo make install` to finalize.
Then to run, specify LD_LIBRARY_PATH if it is not already in your LD configuration. On Ubuntu /usr/local/lib is already there, so just run:
*/usr/local/bin/MP4Box*
For a custom prefix:
*LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/opt/gpac/lib" /opt/gpac/bin/MP4Box*
**Ubuntu 10.04**
Not currently still tested against, but here are the historical changes required to make XenonMKV functional:
Install Python 2.7, either from source or add the appropriate PPA. If you need to upgrade your system from 10.04 to 12.04 later, make sure to purge this PPA first.
*sudo add-apt-repository ppa:fkrull/deadsnakes*
*sudo apt-get update*
*sudo apt-get install python2.7*
- Install mediainfo by adding the `ppa:shiki/mediainfo` PPA as the *mediainfo* package is not in the 10.04 repository.
- Perform *install dependencies* step from the 12.04 instructions
- Run the application directly referencing Python 2.7:
*/usr/bin/python2.7 /path/to/xenonmkv.py [arguments]*
**Other Linux Distributions**
Install the packages mentioned above, either from source or your distribution's package manager.
**Usage**
Basic usage with default settings:
*xenonmkv.py /path/to/file.mkv*
To ensure your Xbox 360 console will play the resulting file, at a possible expense
of audio quality:
*xenonmkv.py /path/to/file.mkv --profile xbox360*
To see all command line arguments:
*xenonmkv.py --help*
For a quiet run (batch processing or in a cronjob):
*xenonmkv.py /path/to/file.mkv -q*
The -q option ensures you will never be prompted for input and would be useful
for integration with software like SABnzbd+.
If you're reporting an issue, please run XenonMKV in debug/very verbose mode:
*xenonmkv.py /path/to/file.mkv -vv*
For the latest release of XenonMKV, I've included a really crummy script that handles batch encoding of MKV files on Linux, since I always screw up the parameters passed to `find`. Use:
*batch.py source_directory <xenonmkv_parameters>*
**Suggestions/Caveats**
- If your MKV files aren't too large, distributions that mount `/tmp` as tmpfs (planned for Fedora 18, Ubuntu 12.10, Debian Wheezy) can show a significant peedup if you use `--scratch-dir /tmp`. Right now for future proofing, the scratch directory is set to `/var/tmp`.
- Use `-vv` to find display debug information and output exactly what's going on during the processing stages.
- Native multiple file support (eg: convert an entire directory of MKVs) is not inherently in this version, but you can do something like this in the meantime to queue up a list:
*cd ~/mymkvdir*
*for i in `ls *.mkv`; do /path/to/xenonmkv.py $i --destination ~/mymp4dir; done*
- Performance on an Intel Core i5-2500K CPU at 3.3GHz, with a 1TB Western Digital Black SATA hard drive: A 442MB source MKV file with h.264 video and 6-channel AC3 audio is converted into a PlayBook-compatible MP4 (same video, 2-channel AAC audio, quality q=150) in 40.6 seconds. This does not have any enhancements such as a tmpfs mount. You could probably get much better performance with a solid state drive, and obviously processor speed will have an impact here.
**Audio Downmixing/Re-Encoding**
By default, XenonMKV tries not to resample, downmix or re-encode any part of the content provided. However, chances are your source files will contain AC3, DTS or MP3 audio that needs to be re-encoded. In this case, the original source audio will always be downmixed to a two channel AAC file before it is repackaged.
If the audio track in your MKV file is already AAC, the next thing to consider is your playback device. The Xbox 360 will not play audio in an MP4 container unless it is 2-channel stereo, which is a highly stupid limitation. Other devices, like the PlayBook, will happily parse up to 5.1 channel audio. By using either the `--channels` or `--profile` settings, you can tell XenonMKV how many channels of audio are acceptable from an AAC source before it will aggressively re-encode and downmix to 2-channel stereo.
In short, if you plan to play MP4s on your Xbox 360, definitely use the `--profile xbox360` setting to make sure that no more than two channels make it into the output file. If your device is more reasonable, the default settings should be fine. More profiles will be added as users confirm their own device capabilities.
%package help
Summary: Development documents and examples for XenonMKV
Provides: python3-XenonMKV-doc
%description help
**About XenonMKV**
XenonMKV is a video container conversion tool that takes MKV files and outputs them as MP4 files. It does not re-encode video, and only decodes and encodes audio as necessary.
You'll find this tool useful for converting videos for devices that support H.264 video and AAC audio, but do not understand the MKV container. Other uses include converting videos with AC3 or DTS audio to AAC audio (2 channel or 5.1 channels).
Originally, XenonMKV was meant for Xbox 360 consoles, but I'm finding now that this tool is much more useful for my `BlackBerry PlayBook <http://blackberry.com/playbook>`_. You may also find it useful for Roku devices or to pre-convert videos to reduce the likelihood that Plex will need to re-encode them.
**Disclosure**
*Note:* During early development of this application, I worked for `BlackBerry <http://blackberry.com>`_. The opinions expressed here are my own and don’t necessarily represent those of my previous or current employer(s). All code is developed on my own time without use of company resources.
**System Requirements**
XenonMKV was built and tested on a standard Ubuntu 12.04 LTS installation (x86_64), but most of the utilities and requirements here are possible to run on most popular \*nix distributions. I've also given the suite of tools a cursory run on Ubuntu 13.10 and they seem to work. Once 14.04 is released in final form I plan to retest.
Windows 7 (64-bit) and Mac OS X 10.8 are also supported, but may work on different versions of OS X and Windows.
You will need at least Python 2.7 for the argparse library, and ideally
Python 2.7.3 or later in the 2.x series.
**Ubuntu 12.04**
You will need some supporting packages. These will be installed automatically
if they are not found on your system, or they can be installed beforehand.
On desktop installations, please ensure that 'Update Manager' is closed before installing dependendencies, or
you will receive a nasty message in the form of:
```
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
```
**Install All Dependencies (at once)**
*sudo apt-get install mediainfo mkvtoolnix mplayer faac gpac*
At the current state of development, on Ubuntu you do not need to install
any Python packages from requirements.txt as the dependent tools are installed with 'apt'.
If this changes in the future, requirements can be installed by running:
*sudo apt-get install python-setuptools && sudo easy_install -U pip*
*pip install -r requirements.txt*
**Individual Package Details**
`mediainfo <http://mediainfo.sourceforge.net/en/Download/Ubuntu>`_
*sudo apt-get install mediainfo*
Alternatively, add the official mediainfo PPA and install the package, which the developer suggests might be a good idea:
*sudo add-apt-repository ppa:shiki/mediainfo*
*sudo apt-get update*
*sudo apt-get install mediainfo*
`mkvtoolnix <http://www.bunkus.org/videotools/mkvtoolnix/downloads.html>`_
*sudo apt-get install mkvtoolnix*
`mplayer <http://www.mplayerhq.hu/design7/news.html>`_
*sudo apt-get install mplayer*
`faac <http://www.audiocoding.com/downloads.html>`_
*sudo apt-get install faac*
`MP4Box <https://sourceforge.net/projects/gpac/>`_
*sudo apt-get install gpac*
To compile your own gpac version, follow `these instructions <http://gpac.wp.mines-telecom.fr/2011/04/20/compiling-gpac-on-ubuntu/>`_. Then, run the following commands for success (the SpiderMonkey JS library isn't needed):
*./configure --enable-debug --use-js=no*
*make*
By default MP4Box will be installed in `/usr/local/{bin,lib,man,share}` as necessary.
If your PATH variable includes `/usr/local/bin` first, your custom compiled version will be executed instead of the system version.
To put MP4Box into a specific path on compile, use the `--prefix` option with `./configure`
*./configure --enable-debug --use-js=no --prefix=/opt/gpac*
Run `sudo make install` to finalize.
Then to run, specify LD_LIBRARY_PATH if it is not already in your LD configuration. On Ubuntu /usr/local/lib is already there, so just run:
*/usr/local/bin/MP4Box*
For a custom prefix:
*LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/opt/gpac/lib" /opt/gpac/bin/MP4Box*
**Ubuntu 10.04**
Not currently still tested against, but here are the historical changes required to make XenonMKV functional:
Install Python 2.7, either from source or add the appropriate PPA. If you need to upgrade your system from 10.04 to 12.04 later, make sure to purge this PPA first.
*sudo add-apt-repository ppa:fkrull/deadsnakes*
*sudo apt-get update*
*sudo apt-get install python2.7*
- Install mediainfo by adding the `ppa:shiki/mediainfo` PPA as the *mediainfo* package is not in the 10.04 repository.
- Perform *install dependencies* step from the 12.04 instructions
- Run the application directly referencing Python 2.7:
*/usr/bin/python2.7 /path/to/xenonmkv.py [arguments]*
**Other Linux Distributions**
Install the packages mentioned above, either from source or your distribution's package manager.
**Usage**
Basic usage with default settings:
*xenonmkv.py /path/to/file.mkv*
To ensure your Xbox 360 console will play the resulting file, at a possible expense
of audio quality:
*xenonmkv.py /path/to/file.mkv --profile xbox360*
To see all command line arguments:
*xenonmkv.py --help*
For a quiet run (batch processing or in a cronjob):
*xenonmkv.py /path/to/file.mkv -q*
The -q option ensures you will never be prompted for input and would be useful
for integration with software like SABnzbd+.
If you're reporting an issue, please run XenonMKV in debug/very verbose mode:
*xenonmkv.py /path/to/file.mkv -vv*
For the latest release of XenonMKV, I've included a really crummy script that handles batch encoding of MKV files on Linux, since I always screw up the parameters passed to `find`. Use:
*batch.py source_directory <xenonmkv_parameters>*
**Suggestions/Caveats**
- If your MKV files aren't too large, distributions that mount `/tmp` as tmpfs (planned for Fedora 18, Ubuntu 12.10, Debian Wheezy) can show a significant peedup if you use `--scratch-dir /tmp`. Right now for future proofing, the scratch directory is set to `/var/tmp`.
- Use `-vv` to find display debug information and output exactly what's going on during the processing stages.
- Native multiple file support (eg: convert an entire directory of MKVs) is not inherently in this version, but you can do something like this in the meantime to queue up a list:
*cd ~/mymkvdir*
*for i in `ls *.mkv`; do /path/to/xenonmkv.py $i --destination ~/mymp4dir; done*
- Performance on an Intel Core i5-2500K CPU at 3.3GHz, with a 1TB Western Digital Black SATA hard drive: A 442MB source MKV file with h.264 video and 6-channel AC3 audio is converted into a PlayBook-compatible MP4 (same video, 2-channel AAC audio, quality q=150) in 40.6 seconds. This does not have any enhancements such as a tmpfs mount. You could probably get much better performance with a solid state drive, and obviously processor speed will have an impact here.
**Audio Downmixing/Re-Encoding**
By default, XenonMKV tries not to resample, downmix or re-encode any part of the content provided. However, chances are your source files will contain AC3, DTS or MP3 audio that needs to be re-encoded. In this case, the original source audio will always be downmixed to a two channel AAC file before it is repackaged.
If the audio track in your MKV file is already AAC, the next thing to consider is your playback device. The Xbox 360 will not play audio in an MP4 container unless it is 2-channel stereo, which is a highly stupid limitation. Other devices, like the PlayBook, will happily parse up to 5.1 channel audio. By using either the `--channels` or `--profile` settings, you can tell XenonMKV how many channels of audio are acceptable from an AAC source before it will aggressively re-encode and downmix to 2-channel stereo.
In short, if you plan to play MP4s on your Xbox 360, definitely use the `--profile xbox360` setting to make sure that no more than two channels make it into the output file. If your device is more reasonable, the default settings should be fine. More profiles will be added as users confirm their own device capabilities.
%prep
%autosetup -n XenonMKV-0.4.3
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-XenonMKV -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.3-1
- Package Spec generated
|