%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.aliyun.com/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 `_. 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 `_. 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 `_ *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 `_ *sudo apt-get install mkvtoolnix* `mplayer `_ *sudo apt-get install mplayer* `faac `_ *sudo apt-get install faac* `MP4Box `_ *sudo apt-get install gpac* To compile your own gpac version, follow `these instructions `_. 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 * **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 `_. 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 `_. 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 `_ *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 `_ *sudo apt-get install mkvtoolnix* `mplayer `_ *sudo apt-get install mplayer* `faac `_ *sudo apt-get install faac* `MP4Box `_ *sudo apt-get install gpac* To compile your own gpac version, follow `these instructions `_. 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 * **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 `_. 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 `_. 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 `_ *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 `_ *sudo apt-get install mkvtoolnix* `mplayer `_ *sudo apt-get install mplayer* `faac `_ *sudo apt-get install faac* `MP4Box `_ *sudo apt-get install gpac* To compile your own gpac version, follow `these instructions `_. 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 * **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 Jun 08 2023 Python_Bot - 0.4.3-1 - Package Spec generated