Amarok/Manual/Various/Moodbar/cs: Difference between revisions
(Created page with "==== Podporované typy souborů ====") |
(Updating to match new version of source page) |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
=== Náladový pruh === | === Náladový pruh === | ||
''Náladový pruh'' ukazuje "náladu" skladby, což můžete potom využít k tomu, abyste si uvědomili, kdy v písni se něco zajímavého děje. | |||
Aby '''Amarok''' zobrazoval náladové pruhy pro vaši hudbu, budete potřebovat program pro '''náladový pruh''' (níže se podívejte na [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Source Downloads|stahovánís]] a balíčky). | |||
Balíček pro '''náladový pruh''' vyžaduje '''GStreamer''' a různé přídavné moduly v závislosti na souborových typech, jež používáte (podívejte se na [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|podporované souborové typy]]). K vytvoření souborů .mood ''nebudete'' potřebovat balíček phonon-backend-gstreamer. | |||
Provedení nového '''náladového pruhu''' má dvě části: balíček '''Moodbar''', který obsahuje program, jenž vezme hudební soubor a vytvoří soubor .mood, a podpůrný kód ve zdrojových souborech pro '''Amarok''', který spouští spustitelný soubor a zobrazí náladový pruh. Balíček '''Moodbar''' závisí na knihovnách pro ''GStreamer''. Bez balíčku '''Moodbar''', '''Amarok''' náladové pruhy pro vaši hudbu vytvořit nedokáže. | |||
Náhradou za výše uvedené je nový skript, který vytvoří soubory pro náladový pruh pro skladby v seznamu skladeb '''Amaroku'''; jedná se o výjimku k výše popsanému. Skriptu ke jeho činnosti stačí '''Amarok''', ale vytváří pouze soubory .mood, zatímco jsou přehrávány v '''seznamu skladeb'''. | |||
'''Moodbar''' je na světě díky práci Gavina Wooda a Simona O'Keefe, kteří navrhli algoritmy; jejich původní pojednání je [http://cratoo.de/amarok/ismir-crc.pdf zde]. | |||
<span id="Summary of Requirements"></span> | |||
==== Shrnutí požadavků ==== | ==== Shrnutí požadavků ==== | ||
* The '''Moodbar''' binary, in your PATH (it should be listed upon running {{Input|1=which moodbar}}from a console) — Remember to configure the '''Moodbar''' package with {{Input|1=./ | * The '''Moodbar''' binary, in your PATH (it should be listed upon running {{Input|1=which moodbar}}from a console) — Remember to configure the '''Moodbar''' package with proper path, e.g. build and install with commands {{Input|1=./autogen.sh --prefix=`pkg-config --variable=prefix gstreamer-1.0` && make && sudo make install}} | ||
* The GStreamer 0 | * The GStreamer 1.0 library and [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|plugins]] for the formats you want '''Moodbar''' to be able to analyse. (An earlier GStreamer 0.10 based version is also still available for some distributions) | ||
* The ''Fastest Fourier Transform In The West'' ([http://www.fftw.org fftw.org]) FFTW library version 3.0 or above (at least single-precision floating point version - libfftw3f) — If your platform does not provide this for you or you need to compile your own version, remember to configure the FFTW package with {{Input|1=./configure --enable-single}} | * The ''Fastest Fourier Transform In The West'' ([http://www.fftw.org fftw.org]) FFTW library version 3.0 or above (at least single-precision floating point version - libfftw3f) — If your platform does not provide this for you or you need to compile your own version, remember to configure the FFTW package with {{Input|1=./configure --enable-single}} | ||
Line 25: | Line 25: | ||
* A version of '''Amarok''' with a <menuchoice>Use moods</menuchoice> option in the <menuchoice>General</menuchoice> section of the configuration screen. This means 1.4.4 or higher in the 1.4 series or 2.2.2 or higher in the 2.x series. | * A version of '''Amarok''' with a <menuchoice>Use moods</menuchoice> option in the <menuchoice>General</menuchoice> section of the configuration screen. This means 1.4.4 or higher in the 1.4 series or 2.2.2 or higher in the 2.x series. | ||
{{Info|Systems with package managers should automatically install the GStreamer plugins and FFTW along with the Moodbar package; this information is provided mostly for people who want or need to compile from source or manually install packages.}} | {{Info|Systems with package managers should automatically install the GStreamer plugins and FFTW along with the Moodbar package if available; this information is provided mostly for people who want or need to compile from source or manually install packages, or where the distribution specific instructions are outdated and no updated moodbar package is yet available.}} | ||
==== Používání ==== | ==== Používání ==== | ||
V současnosti se soubory .mood ''musí'' dělat ručně. '''Amarok''' to za vás neudělá. Pro celou svou sbírku na to použijte [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Moodbar File Generation Script|skript na vytváření souborů pro náladový pruh]] popsaný níže. | |||
Pro povolení zobrazení náladových pruhů v '''Amaroku''' je zapněte v nastavení: <menuchoice>Nastavení -> Nastavit Amarok -> Obecné -> Ukázat náladový pruh v posuvníku s postupem přehrávání</menuchoice>. Náladové pruhy by se nyní měly objevit v posuvnících skladeb v okně přehrávače a v '''seznamu skladeb'''. Bude tu i náladové pole, které budete moci přidat do rozvržení seznamu skladeb. | |||
====Instalace==== | ====Instalace==== | ||
Line 37: | Line 37: | ||
===== Stažení zdrojových souborů ===== | ===== Stažení zdrojových souborů ===== | ||
:Latest release: [ | :Latest release: [https://github.com/Mazhoon/moodbar/archive/v0.1.4.tar.gz moodbar-0.1.4.tar.gz] — this is the Moodbar source package, which contains the '''Moodbar''' program (which generates .mood files from music files), and a GStreamer plugin that does the work. The Moodbar package needs GStreamer 1.0.* installed, plus the 1.0.* version of [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|various plugins]]. Be sure to install the Moodbar package into the ''same prefix'' as GStreamer — follow the instructions in [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Summary_of_Requirements | the summary of requirements chapter]]. The 0.1.4 is a a fork of original 0.1.2 sources, updated to use GStreamer 1.0. The old 0.1.2 sources are not reliably available online any more, but packages might be still available for some distributions. | ||
If you find any bugs, please submit a bug report at [http://bugs.kde.org bugs.kde.org]. | If you find any bugs, please submit a bug report at [http://bugs.kde.org bugs.kde.org]. | ||
Line 43: | Line 43: | ||
===== Balíčky pro Debian ===== | ===== Balíčky pro Debian ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated.}} | |||
A package for Moodbar is now available in Debian unstable. Simply run {{Input|1=apt-get install moodbar}}. You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support. | A package for Moodbar is now available in Debian unstable. Simply run {{Input|1=apt-get install moodbar}}. You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support. | ||
===== Balíčky pro Kubuntu a Ubuntu ===== | ===== Balíčky pro Kubuntu a Ubuntu ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated.}} | |||
A package for Moodbar is available in the official package repository; just ensure the universe section is activated (which should be default anyway). Just install the package moodbar with your preferred package manager ('''Kpackagekit''', '''Aptitude''', '''Adept''', '''Synaptic'''). You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support. | A package for Moodbar is available in the official package repository; just ensure the universe section is activated (which should be default anyway). Just install the package moodbar with your preferred package manager ('''Kpackagekit''', '''Aptitude''', '''Adept''', '''Synaptic'''). You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support. | ||
Line 55: | Line 57: | ||
===== Sestavení pro Gentoo ===== | ===== Sestavení pro Gentoo ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated.}} | |||
Moodbar is available in Portage, simply {{Input|1=emerge moodbar}} Unofficial ebuilds are no longer required. | Moodbar is available in Portage, simply {{Input|1=emerge moodbar}} Unofficial ebuilds are no longer required. | ||
===== Balíčky RPM ===== | ===== Balíčky RPM ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated}} | |||
If you are a rpm-based distro user, you can build a .rpm using rpmbuild with latest | If you are a rpm-based distro user, you can build a .rpm using rpmbuild with latest | ||
[http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/gstreamer-plugins-moodbar.spec gstreamer-plugins-moodbar.spec]. The binary package will be soon available for [http://pld-linux.org PLD-linux] distro. | [http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/gstreamer-plugins-moodbar.spec gstreamer-plugins-moodbar.spec]. The binary package will be soon available for [http://pld-linux.org PLD-linux] distro. | ||
Line 64: | Line 68: | ||
===== Fedora ===== | ===== Fedora ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated.}} | |||
In Fedora 7 and higher (up to 16 as of this writing) Moodbar is available in the default repositories. Simply install it with your PackageKit GUI or with the following yum command: | In Fedora 7 and higher (up to 16 as of this writing) Moodbar is available in the default repositories. Simply install it with your PackageKit GUI or with the following yum command: | ||
Line 70: | Line 75: | ||
===== Balíčky pro openSUSE ===== | ===== Balíčky pro openSUSE ===== | ||
GStreamer 1.0 based version 0.1.4 is available in KDE:Extra repository for openSUSE Leap 42.3 and later. An earlier GStreamer 0.10 based version 0.1.2 is also still available in the main repository for some openSUSE versions. | |||
For details on how to add repositories, see the [http://en.opensuse.org/SDB:Add_package_repositories openSUSE wiki]. | |||
1-Click Install for openSUSE - just choose your version and installation procedure will do the rest: | |||
* [https://software.opensuse.org/ymp/KDE:Extra/KDE_Frameworks5_openSUSE_Tumbleweed/moodbar.ymp openSUSE Tumbleweed] | |||
* [https://software.opensuse.org/ymp/KDE:Extra/openSUSE_Leap_15.0/moodbar.ymp openSUSE Leap 15.0] | |||
* [https://software.opensuse.org/ymp/KDE:Extra/openSUSE_Leap_42.3/moodbar.ymp openSUSE Leap 42.3] | |||
===== Balíčky pro Mandrivu ===== | ===== Balíčky pro Mandrivu ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated.}} | |||
First of all, you need to add PLF repositories, so visit [http://easyurpmi.zarb.org easyurpmi.zarb.org] and add them to your repositories list. | First of all, you need to add PLF repositories, so visit [http://easyurpmi.zarb.org easyurpmi.zarb.org] and add them to your repositories list. | ||
Then simply install the following packages: | Then simply install the following packages: | ||
Line 105: | Line 100: | ||
===== Arch Linux ===== | ===== Arch Linux ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated.}} | |||
There is a PKGBUILD for Moodbar in the [http://aur.archlinux.org Arch User Repository (AUR)] available [http://aur.archlinux.org/packages.php?ID=6552 here]. | There is a PKGBUILD for Moodbar in the [http://aur.archlinux.org Arch User Repository (AUR)] available [http://aur.archlinux.org/packages.php?ID=6552 here]. | ||
Line 111: | Line 107: | ||
===== FreeBSD ===== | ===== FreeBSD ===== | ||
{{Note|This section contains old instructions for the GStreamer 0.10 based moodbar version 0.1.2, they might be outdated.}} | |||
There is a port: [http://www.freshports.org/audio/gstreamer-plugins-moodbar audio/gstreamer-plugins-moodbar here]. | There is a port: [http://www.freshports.org/audio/gstreamer-plugins-moodbar audio/gstreamer-plugins-moodbar here]. | ||
Line 184: | Line 181: | ||
done</syntaxhighlight>}} | done</syntaxhighlight>}} | ||
==== Řešení problémů ==== | ==== Řešení problémů ==== | ||
* If the '''Moodbar''' executable gives you a ''bus error'', that almost always means it can't decode (or can't find) your file. Take a look at the [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|supported file types]] below for ideas on which GStreamer plugins to install. You can also try the command below to test whether GStreamer can decode your file:{{Input|1=gst-launch filesrc location=[file] ! decodebin ! fakesink}} | * If the '''Moodbar''' executable gives you a ''bus error'', that almost always means it can't decode (or can't find) your file. Take a look at the [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|supported file types]] below for ideas on which GStreamer plugins to install. You can also try the command below to test whether GStreamer can decode your file:{{Input|1=gst-launch-1.0 filesrc location=[file] ! decodebin ! fakesink}} | ||
* If you are using the ffmpeg plugin to decode mp3s, you may also receive mysterious bus errors. The solution is to stop using the ffmpeg plugin, as it is extremely buggy — use mad instead. | * If you are using the ffmpeg plugin to decode mp3s, you may also receive mysterious bus errors. The solution is to stop using the ffmpeg plugin, as it is extremely buggy — use mad instead. | ||
Line 194: | Line 190: | ||
* If the '''Moodbar''' executable tells you that it can't find an element — i.e., it gives an error message like {{Output|1=Could not create element of type fftwspectrum, please install it.}}— that usually means that you either don't have the required plugins installed (see the plugin list [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|here]]), or that you didn't install the Moodbar package in the same prefix as GStreamer. If libmoodbar.so and libgstdecodebin.so are not in the same directory, then Moodbar is not installed in the same prefix as GStreamer. Please read the INSTALL file for instructions on how to configure the moodbar package correctly. Alternatively, ''if you know what you're doing,'' it may be easier for you to take a look at the <tt>GST_PLUGIN_PATH</tt> environment variable. | * If the '''Moodbar''' executable tells you that it can't find an element — i.e., it gives an error message like {{Output|1=Could not create element of type fftwspectrum, please install it.}}— that usually means that you either don't have the required plugins installed (see the plugin list [[Special:myLanguage/Amarok/Manual/Various/Moodbar#Supported Filetypes|here]]), or that you didn't install the Moodbar package in the same prefix as GStreamer. If libmoodbar.so and libgstdecodebin.so are not in the same directory, then Moodbar is not installed in the same prefix as GStreamer. Please read the INSTALL file for instructions on how to configure the moodbar package correctly. Alternatively, ''if you know what you're doing,'' it may be easier for you to take a look at the <tt>GST_PLUGIN_PATH</tt> environment variable. | ||
* If you're wondering why the '''Moodbar''' isn't working, either not working at all or not working for a particular file, run the command below, where [file] is a music file:{{Input|1=moodbar -o test.mood [file]}} | * If you're wondering why the '''Moodbar''' isn't working, either not working at all or not working for a particular file, run the command below, where [file] is a music file:{{Input|1=moodbar -o test.mood [file]}} To generate a test image preview, one can use the commandː{{Input|1=gst-launch-1.0 filesrc location=[file] ! decodebin ! audioconvert ! fftwspectrum ! moodbar height=50 max-width=300 ! pngenc ! filesink location=mood.png}} | ||
* If you have multiple versions of GStreamer installed, make sure all of the required plugins are installed ''for version 0 | * If you have multiple versions of GStreamer installed, make sure all of the required plugins are installed ''for version 1.0.*'' -- different versions ''cannot'' use each other's plugins. | ||
<span id="Supported Filetypes"></span> | <span id="Supported Filetypes"></span> | ||
==== Podporované typy souborů ==== | ==== Podporované typy souborů ==== | ||
You will need various Gstreamer plugins to enable '''Moodbar''' to analyze your files. Here is a list of the plugins you will need; make sure to install the ''0 | You will need various Gstreamer plugins to enable '''Moodbar''' to analyze your files. Here is a list of the plugins you will need; make sure to install the ''1.0.* version'' of each plugin: | ||
{| border="1" cellpadding="5" <!--}--> | {| border="1" cellpadding="5" <!--}--> | ||
! | ! Typ souboru !! Požadovaný přídavný modul !! Poznámka | ||
|- | |- | ||
| All || gstreamer-0 | | All || gstreamer-1.0.*, gst-plugins-base, gst-plugins-good | ||
|- | |- | ||
| mp3 || gst-plugins-mad (in gst-plugins-ugly) || ffmpeg | | mp3 || gst-plugins-mad (in gst-plugins-ugly) || Přídavný modul ffmpeg má potíže; ''nepoužívat'' pro mp3 | ||
|- | |- | ||
| ogg || gst-plugins-vorbis, gst-plugins-ogg | | ogg || gst-plugins-vorbis, gst-plugins-ogg | ||
Line 220: | Line 216: | ||
|} <!--{--> | |} <!--{--> | ||
==== | ==== Snímky obrazovky ==== | ||
[[Image:Amarok2_moodbar.png|600px|center| | [[Image:Amarok2_moodbar.png|600px|center|Náladový pruh v ukazateli postupu přehrávání v Amaroku 2]] | ||
{{Prevnext2 | {{Prevnext2 | ||
| prevpage=Special:myLanguage/Amarok/Manual/Various | nextpage=Special:myLanguage/Amarok/Manual/Various/ | | prevpage=Special:myLanguage/Amarok/Manual/Various | nextpage=Special:myLanguage/Amarok/Manual/Various/ReplayGain | ||
| prevtext=Various | nexttext= | | prevtext=Various | nexttext=Replay Gain | ||
| index=Special:myLanguage/Amarok/Manual | indextext=Back to Menu | | index=Special:myLanguage/Amarok/Manual | indextext=Back to Menu | ||
}} | }} |
Latest revision as of 06:00, 8 August 2018
Náladový pruh
Náladový pruh ukazuje "náladu" skladby, což můžete potom využít k tomu, abyste si uvědomili, kdy v písni se něco zajímavého děje.
Aby Amarok zobrazoval náladové pruhy pro vaši hudbu, budete potřebovat program pro náladový pruh (níže se podívejte na stahovánís a balíčky).
Balíček pro náladový pruh vyžaduje GStreamer a různé přídavné moduly v závislosti na souborových typech, jež používáte (podívejte se na podporované souborové typy). K vytvoření souborů .mood nebudete potřebovat balíček phonon-backend-gstreamer.
Provedení nového náladového pruhu má dvě části: balíček Moodbar, který obsahuje program, jenž vezme hudební soubor a vytvoří soubor .mood, a podpůrný kód ve zdrojových souborech pro Amarok, který spouští spustitelný soubor a zobrazí náladový pruh. Balíček Moodbar závisí na knihovnách pro GStreamer. Bez balíčku Moodbar, Amarok náladové pruhy pro vaši hudbu vytvořit nedokáže.
Náhradou za výše uvedené je nový skript, který vytvoří soubory pro náladový pruh pro skladby v seznamu skladeb Amaroku; jedná se o výjimku k výše popsanému. Skriptu ke jeho činnosti stačí Amarok, ale vytváří pouze soubory .mood, zatímco jsou přehrávány v seznamu skladeb.
Moodbar je na světě díky práci Gavina Wooda a Simona O'Keefe, kteří navrhli algoritmy; jejich původní pojednání je zde.
Shrnutí požadavků
- The Moodbar binary, in your PATH (it should be listed upon running
which moodbar
from a console) — Remember to configure the Moodbar package with proper path, e.g. build and install with commands./autogen.sh --prefix=`pkg-config --variable=prefix gstreamer-1.0` && make && sudo make install
- The GStreamer 1.0 library and plugins for the formats you want Moodbar to be able to analyse. (An earlier GStreamer 0.10 based version is also still available for some distributions)
- The Fastest Fourier Transform In The West (fftw.org) FFTW library version 3.0 or above (at least single-precision floating point version - libfftw3f) — If your platform does not provide this for you or you need to compile your own version, remember to configure the FFTW package with
./configure --enable-single
- A version of Amarok with a option in the section of the configuration screen. This means 1.4.4 or higher in the 1.4 series or 2.2.2 or higher in the 2.x series.
Používání
V současnosti se soubory .mood musí dělat ručně. Amarok to za vás neudělá. Pro celou svou sbírku na to použijte skript na vytváření souborů pro náladový pruh popsaný níže.
Pro povolení zobrazení náladových pruhů v Amaroku je zapněte v nastavení:
. Náladové pruhy by se nyní měly objevit v posuvnících skladeb v okně přehrávače a v seznamu skladeb. Bude tu i náladové pole, které budete moci přidat do rozvržení seznamu skladeb.Instalace
Stažení zdrojových souborů
- Latest release: moodbar-0.1.4.tar.gz — this is the Moodbar source package, which contains the Moodbar program (which generates .mood files from music files), and a GStreamer plugin that does the work. The Moodbar package needs GStreamer 1.0.* installed, plus the 1.0.* version of various plugins. Be sure to install the Moodbar package into the same prefix as GStreamer — follow the instructions in the summary of requirements chapter. The 0.1.4 is a a fork of original 0.1.2 sources, updated to use GStreamer 1.0. The old 0.1.2 sources are not reliably available online any more, but packages might be still available for some distributions.
If you find any bugs, please submit a bug report at bugs.kde.org.
Balíčky pro Debian
A package for Moodbar is now available in Debian unstable. Simply run
apt-get install moodbar
. You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support.
Balíčky pro Kubuntu a Ubuntu
A package for Moodbar is available in the official package repository; just ensure the universe section is activated (which should be default anyway). Just install the package moodbar with your preferred package manager (Kpackagekit, Aptitude, Adept, Synaptic). You will likely also want to install gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-good, and gstreamer0.10-plugins-bad for format support.
Or, to install, paste this into Firefox or Konqueror and hit Enter.
apt://moodbar,gstreamer0.10-plugins-ugly,gstreamer0.10-plugins-good,gstreamer0.10-plugins-bad?section=universe?refresh=yep
Sestavení pro Gentoo
Moodbar is available in Portage, simply
emerge moodbar
Unofficial ebuilds are no longer required.
Balíčky RPM
If you are a rpm-based distro user, you can build a .rpm using rpmbuild with latest gstreamer-plugins-moodbar.spec. The binary package will be soon available for PLD-linux distro.
Fedora
In Fedora 7 and higher (up to 16 as of this writing) Moodbar is available in the default repositories. Simply install it with your PackageKit GUI or with the following yum command:
yum install moodbar
Balíčky pro openSUSE
GStreamer 1.0 based version 0.1.4 is available in KDE:Extra repository for openSUSE Leap 42.3 and later. An earlier GStreamer 0.10 based version 0.1.2 is also still available in the main repository for some openSUSE versions.
For details on how to add repositories, see the openSUSE wiki.
1-Click Install for openSUSE - just choose your version and installation procedure will do the rest:
Balíčky pro Mandrivu
First of all, you need to add PLF repositories, so visit easyurpmi.zarb.org and add them to your repositories list. Then simply install the following packages:
- gstreamer0.10-moodbar
- gstreamer0.10-plugins-ugly
- gstreamer0.10-plugins-good
- gstreamer0.10-plugins-bad
Arch Linux
There is a PKGBUILD for Moodbar in the Arch User Repository (AUR) available here.
For more information about the AUR and working with PKGBUILDs, see the AUR User Guidelines.
FreeBSD
There is a port: audio/gstreamer-plugins-moodbar here.
To install the port:
cd /usr/ports/audio/gstreamer-plugins-moodbar/ && make install clean
To add the package:
pkg_add -r gstreamer-plugins-moodbar
Skript pro vytvoření souboru pro náladový pruh
Here is a simple bash script that will add .mood files to your entire collection. It adds mood files for all files matching the extensions in the current directory and all subdirectories, so it's best run from the base of your music directory.
#!/bin/bash DIR=${1:-.} LAST=~/.moodbar-lastreadsong C_RET=0 control_c() # run if user hits control-c { echo "" > "$LAST" echo "Exiting..." exit } if [ -e "$LAST" ]; then read filetodelete < "$LAST" rm "$filetodelete" "$LAST" fi exec 9< <(find "$DIR" -type f -regextype posix-awk -iregex '.*\.(mp3|ogg|flac|wma)') # you may need to add m4a and mp4 while read i do TEMP="${i%.*}.mood" OUTF=`echo "$TEMP" | sed 's#\(.*\)/\([^,]*\)#\1/.\2#'` trap 'control_c "$OUTF"' INT if [ ! -e "$OUTF" ] || [ "$i" -nt "$OUTF" ]; then moodbar -o "$OUTF" "$i" || { C_RET=1; echo "An error occurred!" >&2; } fi done <&9 exec 9<&- exit $C_RET
Copy and paste the above into a text file named moodbar.sh in your music directory and run the following commands:
cd /path/to/music bash moodbar.sh
Alternatively if the above does not work, you may try:
chmod +x moodbar.sh ./moodbar.sh
This may take a very long time for large collections! Note that the moodbars will not appear in Amarok until Amarok rescans the collection. The generated mood files will be dotfiles (i.e., prefixed with a full stop), or hidden files - so keep this in mind if you can't find any generated mood files.
Based on the above script, an alternative for multicore CPUs:
#!/bin/bash NUMCPU="$(grep ^processor /proc/cpuinfo | wc -l)" find . -type f -regextype posix-awk -iregex '.*\.(mp3|ogg|flac|wma)' | while read i ; do while [ `jobs -p | wc -l` -ge $NUMCPU ] ; do sleep 0.1 done TEMP="${i%.*}.mood" OUTF=`echo "$TEMP" | sed 's#\(.*\)/\([^,]*\)#\1/.\2#'` if [ ! -e "$OUTF" ] ; then moodbar -o "$OUTF" "$i" & fi done
Řešení problémů
- If the Moodbar executable gives you a bus error, that almost always means it can't decode (or can't find) your file. Take a look at the supported file types below for ideas on which GStreamer plugins to install. You can also try the command below to test whether GStreamer can decode your file:
gst-launch-1.0 filesrc location=[file] ! decodebin ! fakesink
- If you are using the ffmpeg plugin to decode mp3s, you may also receive mysterious bus errors. The solution is to stop using the ffmpeg plugin, as it is extremely buggy — use mad instead.
- If the Moodbar executable tells you that it can't find an element — i.e., it gives an error message like
Could not create element of type fftwspectrum, please install it.
— that usually means that you either don't have the required plugins installed (see the plugin list here), or that you didn't install the Moodbar package in the same prefix as GStreamer. If libmoodbar.so and libgstdecodebin.so are not in the same directory, then Moodbar is not installed in the same prefix as GStreamer. Please read the INSTALL file for instructions on how to configure the moodbar package correctly. Alternatively, if you know what you're doing, it may be easier for you to take a look at the GST_PLUGIN_PATH environment variable.
- If you're wondering why the Moodbar isn't working, either not working at all or not working for a particular file, run the command below, where [file] is a music file:
moodbar -o test.mood [file]
To generate a test image preview, one can use the commandːgst-launch-1.0 filesrc location=[file] ! decodebin ! audioconvert ! fftwspectrum ! moodbar height=50 max-width=300 ! pngenc ! filesink location=mood.png
- If you have multiple versions of GStreamer installed, make sure all of the required plugins are installed for version 1.0.* -- different versions cannot use each other's plugins.
Podporované typy souborů
You will need various Gstreamer plugins to enable Moodbar to analyze your files. Here is a list of the plugins you will need; make sure to install the 1.0.* version of each plugin:
Typ souboru | Požadovaný přídavný modul | Poznámka |
---|---|---|
All | gstreamer-1.0.*, gst-plugins-base, gst-plugins-good | |
mp3 | gst-plugins-mad (in gst-plugins-ugly) | Přídavný modul ffmpeg má potíže; nepoužívat pro mp3 |
ogg | gst-plugins-vorbis, gst-plugins-ogg | |
flac | gst-plugins-flac | |
mp4 | gst-plugins-faad, gst-plugins-bad | |
musepack | gst-plugins-musepack | |
wma | gst-plugins-ffmpeg |
Snímky obrazovky