пятница, 29 марта 2013 г.

Audacity под Centos не хочет воспроизводить записанное...

Нашел Wiki (клик по картинке) и перебрал варианты из раздела "Linux_Issues#Error_Initializing_or_Opening_Sound_Device" Решение в первом комментарии к посту. Этот пост создается в типичной ситуации: решил срочно наговорить свои впечатления по поводу телеурока нейрофизиолога Анохина (внука), но получается, что надо переключаться на Linux... Вместо записи аудио (и поисков - где его разместить... teacherTube... ?) надо прочитать Wiki, составить представление о том, как настраивается Audacity, потом настроить, потом написать пост... дооформить - закладки, картинки, выводы..., кроме того, я в последнее время пишу лог моих действий и использую для этого комментарии. В итоге получается длиннющий список комментариев, а поста (толковой статьи) так и нету. Если использовать баг-трекер, то это будет запись в User Story c комментариями и ссылками..., и новая пустая wiki-сраница, на которой будут ссылки со всех User Story... Решение в первом комментарии к посту. Дело было в настройках... Хорошо, что дело оказалось в элементарных настройках, ответ нашелся быстро..., а вот как быть со ссылками в меню? Задаю теги mp3, audacity, podcasting... Мне сейчас нужно будет выбирать хранилища для аудиофайлов, а также возможность онлайнзаписи файлов...
Похожие посты

14 комментариев:

  1. Настройки нашел быстро:
    Edit -> Preferences -> Audio I/O
    http://wiki.audacityteam.org/wiki/Linux_Issues#Error_Initializing_or_Opening_Sound_Device
    Прочитал о форматах:
    OSS (Open Sound System) has been around for a long time and is built-in to older Linux kernels. It works fine for 44100 Hz, stereo, 16-bit audio with ordinary sound cards and typical requirements. It's rather inadequate for low latency and multi-channel recording.

    ALSA (Advanced Linux Sound Architecture) is newer, and doesn't support quite as many older sound cards, but it supports many newer ones and supports many advanced and professional features. Very low latencies and multi-channel audio are possible. It is standard in the current 2.6 kernel, and used by many modern Linux distributions.

    Выставил и для входа и для выхода "ALSA default"
    Все заработало, но правый канал писался тихо..., попробовал другой микрофон, оказалось, что дело в микрофоне (а настройки уровня записи по каналам должны же быть. пока не нашел...)

    Переключился на моно режим записи и default sample rate (на вклкдке Quality) 22 050
    Выходной файл должен уменьшится в 4 раза (надо бы поэкспериментпровать...)

    ОтветитьУдалить
  2. И все бы хорошо, но потом оказадлось, что не могу экспортировать записаный файл в .mp3
    На той же основной странице http://wiki.audacityteam.org/wiki/Linux_Issues#MP3_Import_and_Export есть пояснения:
    1) ...his means you do not have libmad installed.
    нет, у меня стоит...,т следующий пункт как раз про экспорт
    2) ...MP3 export requires you to have the LAME package already installed. For help, see the Linux section of our LAME instructions.
    Как устанавливать? Опять искать .rpm ...оказывается, проще скомпилировать самому
    Ниже на странице есть ссылкана http://wiki.audacityteam.org/wiki/Lame_Installation#linux
    Но здесь все довольно запутано...
    И я нашел хорошую инструкцию (взял отсюда http://avihost.ru/distributivy-linux-centos-ustanovka-asterisk-na-centos.html)
    Надо скачать lame и установить:
    Устанавливаем LAME

    cd /usr/local/src
    wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz?ts=1292626574&use_mirror=cdnetworks-us-1
    tar zxvf lame-3.98.4.tar.gz
    cd lame-3.98.4
    ./configure
    make
    make install

    ОтветитьУдалить
  3. Проделал все то, что сверху, но решил снвчала посмотреть
    [root@localhost lame-3.99.5]# ./configure --help
    `configure' configures lame 3.99.5 to adapt to many kinds of systems.

    Usage: ./configure [OPTION]... [VAR=VALUE]...

    To assign environment variables (e.g., CC, CFLAGS...), specify them as
    VAR=VALUE. See below for descriptions of some of the useful variables.

    Defaults for the options are specified in brackets.

    Configuration:
    -h, --help display this help and exit
    --help=short display options specific to this package
    --help=recursive display the short help of all the included packages
    -V, --version display version information and exit
    -q, --quiet, --silent do not print `checking ...' messages
    --cache-file=FILE cache test results in FILE [disabled]
    -C, --config-cache alias for `--cache-file=config.cache'
    -n, --no-create do not create output files
    --srcdir=DIR find the sources in DIR [configure dir or `..']

    Installation directories:
    --prefix=PREFIX install architecture-independent files in PREFIX
    [/usr/local]
    --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
    [PREFIX]

    By default, `make install' will install all the files in
    `/usr/local/bin', `/usr/local/lib' etc. You can specify
    an installation prefix other than `/usr/local' using `--prefix',
    for instance `--prefix=$HOME'.

    For better control, use the options below.

    ОтветитьУдалить
    Ответы
    1. Fine tuning of the installation directories:
      --bindir=DIR user executables [EPREFIX/bin]
      --sbindir=DIR system admin executables [EPREFIX/sbin]
      --libexecdir=DIR program executables [EPREFIX/libexec]
      --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
      --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
      --localstatedir=DIR modifiable single-machine data [PREFIX/var]
      --libdir=DIR object code libraries [EPREFIX/lib]
      --includedir=DIR C header files [PREFIX/include]
      --oldincludedir=DIR C header files for non-gcc [/usr/include]
      --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
      --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
      --infodir=DIR info documentation [DATAROOTDIR/info]
      --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
      --mandir=DIR man documentation [DATAROOTDIR/man]
      --docdir=DIR documentation root [DATAROOTDIR/doc/lame]
      --htmldir=DIR html documentation [DOCDIR]
      --dvidir=DIR dvi documentation [DOCDIR]
      --pdfdir=DIR pdf documentation [DOCDIR]
      --psdir=DIR ps documentation [DOCDIR]

      Program names:
      --program-prefix=PREFIX prepend PREFIX to installed program names
      --program-suffix=SUFFIX append SUFFIX to installed program names
      --program-transform-name=PROGRAM run sed PROGRAM on installed program names

      System types:
      --build=BUILD configure for building on BUILD [guessed]
      --host=HOST cross-compile to build programs to run on HOST [BUILD]

      Optional Features:
      --disable-option-checking ignore unrecognized --enable/--with options
      --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
      --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
      --enable-maintainer-mode enable make rules and dependencies not useful
      (and sometimes confusing) to the casual installer
      --disable-dependency-tracking speeds up one-time build
      --enable-dependency-tracking do not reject slow dependency extractors
      --enable-shared[=PKGS] build shared libraries [default=yes]
      --enable-static[=PKGS] build static libraries [default=yes]
      --enable-fast-install[=PKGS]
      optimize for fast installation [default=yes]
      --disable-libtool-lock avoid locking (might break parallel builds)
      --disable-largefile omit support for large files
      --enable-nasm Allow the use of nasm if available
      --disable-rpath do not hardcode runtime library paths
      --disable-cpml Do not use Compaq's fast Math Library
      --disable-gtktest Do not try to compile and run a test GTK program
      --enable-efence Use ElectricFence for malloc debugging
      --disable-analyzer-hooks Exclude analyzer hooks
      --disable-decoder Exclude mpg123 decoder
      --disable-frontend Do not build the lame executable default=build
      --enable-mp3x Build GTK frame analyzer default=no
      --enable-mp3rtp Build mp3rtp default=no
      --enable-dynamic-frontends Link frontends against shared libraries default=no
      --enable-expopt=full,norm Whether to enable experimental optimizations
      default=no
      --enable-debug=alot,norm Enable debugging (disables optimizations)
      default=no

      Удалить
    2. Optional Packages:
      --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
      --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
      --with-pic try to use only PIC/non-PIC objects [default=use
      both]
      --with-gnu-ld assume the C compiler uses GNU ld [default=no]
      --with-dmalloc use dmalloc, as in
      http://www.dmalloc.com/dmalloc.tar.gz
      --with-gnu-ld assume the C compiler uses GNU ld default=no
      --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
      --without-libiconv-prefix don't search for libiconv in includedir and libdir
      --with-gtk-prefix=PFX Prefix where GTK is installed (optional)
      --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)
      --with-fileio=lame Use lame's internal file io routines default
      =sndfile Use Erik de Castro Lopo's libsndfile
      (no stdin possible currently)

      Some influential environment variables:
      CC C compiler command
      CFLAGS C compiler flags
      LDFLAGS linker flags, e.g. -L if you have libraries in a
      nonstandard directory
      LIBS libraries to pass to the linker, e.g. -l
      CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if
      you have headers in a nonstandard directory
      CPP C preprocessor
      PKG_CONFIG path to pkg-config utility
      PKG_CONFIG_PATH
      directories to add to pkg-config's search path
      PKG_CONFIG_LIBDIR
      path overriding pkg-config's built-in search path
      SNDFILE_CFLAGS
      C compiler flags for SNDFILE, overriding pkg-config
      SNDFILE_LIBS
      linker flags for SNDFILE, overriding pkg-config

      Use these variables to override the choices made by `configure' or to help
      it to find libraries and programs with nonstandard names/locations.

      Report bugs to .

      Удалить
  4. Сам файл configure можно распечатать, но он длииноват, потому просто запускаем скрипт

    [root@localhost lame-3.99.5]# ./configure
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for style of include used by make... GNU
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/usr/local/src/lame-3.99.5':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details
    [root@localhost lame-3.99.5]#

    ОтветитьУдалить
    Ответы
    1. Дык, компиляторов то нету, надо бы включить (кстановить) среду разработки
      Пробуем вот такую комманду (вот отсюда http://metalcandy.ru/faq/centos-5-faq/450-how-do-i-install-gnu-c-compiler-on-centos-linux-server)

      [root@localhost lame-3.99.5]# yum install gcc gcc-c++ autoconf automake
      Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data, kernel-
      : module, keys, kmod, list-data, merge-conf, priorities, protect-packages, protectbase,
      : refresh-updatesd, security, tsflags, upgrade-helper, verify
      Bad id for repo: Mymirror,Centos5updates, byte = , 8
      Repository remi is listed more than once in the configuration
      Repository remi-test is listed more than once in the configuration
      Repository remi-debuginfo is listed more than once in the configuration
      Repository remi-test-debuginfo is listed more than once in the configuration
      Existing lock /var/run/yum.pid: another copy is running as pid 9426.

      Удалить
    2. Loading mirror speeds from cached hostfile
      * Centos: mirror.awanti.com
      * addons: mirror.majorhost.net
      * base: mirror.majorhost.net
      * centosplus: mirror.majorhost.net
      * contrib: mirror.majorhost.net
      * epel: mirror.awanti.com
      * epel-debuginfo: mirror.awanti.com
      * epel-source: mirror.awanti.com
      * epel-testing: mirror.awanti.com
      * epel-testing-debuginfo: mirror.awanti.com
      * epel-testing-source: mirror.awanti.com
      * remi: mirror.awanti.com
      * remi-test: mirror.awanti.com
      * rpmforge: mirror.awanti.com
      * rpmforge-extras: mirror.awanti.com
      * rpmforge-testing: mirror.awanti.com
      * updates: mirror.awanti.com
      C5.0-updates | 951 B 00:00
      http://mirror.majorhost.net/centos/5.9/centosplus/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403:
      Forbidden
      Trying other mirror.
      centosplus | 1.9 kB 00:00
      http://mirror.majorhost.net/centos/5.9/contrib/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403: Fo
      rbidden
      Trying other mirror.
      contrib | 1.9 kB 00:00
      epel | 3.6 kB 00:00
      epel-debuginfo | 2.5 kB 00:00
      epel-source | 2.8 kB 00:00
      epel-testing | 3.6 kB 00:00
      epel-testing-debuginfo | 2.5 kB 00:00
      epel-testing-source | 2.8 kB 00:00
      google-chrome | 951 B 00:00
      remi | 2.5 kB 00:00
      remi-test | 2.5 kB 00:00
      remi-test-debuginfo | 2.5 kB 00:00
      updates | 1.9 kB 00:00
      Excluding Packages from CentOS-5 - Addons
      Finished
      Excluding Packages from CentOS-5 - Base
      Finished
      Excluding Packages from CentOS-5 - Plus
      Finished
      Excluding Packages from CentOS-5 - Contrib
      Finished
      Excluding Packages from CentOS-5 - Updates
      Finished
      Skipping filters plugin, no data
      6216 packages excluded due to repository priority protections
      0 packages excluded due to repository protections

      Удалить
    3. Setting up Install Process
      Resolving Dependencies
      There are unfinished transactions remaining. You might consider running yum-complete-transaction first t o finish them.
      Skipping filters plugin, no data
      --> Running transaction check
      ---> Package autoconf.noarch 0:2.59-12 set to be updated
      --> Processing Dependency: imake for package: autoconf
      ---> Package automake.noarch 0:1.9.6-2.3.el5 set to be updated
      ---> Package gcc.x86_64 0:4.1.2-54.el5 set to be updated
      --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
      ---> Package gcc-c++.x86_64 0:4.1.2-54.el5 set to be updated
      --> Processing Dependency: libstdc++-devel = 4.1.2-54.el5 for package: gcc-c++
      --> Running transaction check
      ---> Package glibc-devel.x86_64 0:2.5-107 set to be updated
      --> Processing Dependency: glibc-headers = 2.5-107 for package: glibc-devel
      --> Processing Dependency: glibc-headers for package: glibc-devel
      ---> Package imake.x86_64 0:1.0.2-3 set to be updated
      ---> Package libstdc++-devel.x86_64 0:4.1.2-54.el5 set to be updated
      C5.0-updates/filelists | 2.3 MB 00:30
      Centos/filelists_db | 1.5 MB 00:14
      centosplus/filelists_db | 597 kB 00:05
      debug/filelists_db | 25 MB 04:42
      epel/filelists_db | 5.6 MB 00:57
      epel-debuginfo/filelists_db | 1.4 MB 00:14
      epel-testing/filelists_db | 316 kB 00:03
      epel-testing-debuginfo/filelists_db | 60 kB 00:00
      google-chrome/filelists | 1.1 kB 00:00
      remi/filelists_db | 938 kB 00:08
      remi-test/filelists_db | 42 kB 00:00
      remi-test-debuginfo/filelists_db | 41 kB 00:00
      rpmforge/filelists_db | 6.1 MB 01:01
      rpmforge-extras/filelists_db | 153 kB 00:01
      rpmforge-testing/filelists_db | 155 kB 00:01
      updates/filelists_db | 1.5 MB 00:14
      --> Running transaction check
      ---> Package glibc-headers.x86_64 0:2.5-107 set to be updated
      --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
      --> Processing Dependency: kernel-headers for package: glibc-headers
      --> Running transaction check
      ---> Package kernel-headers.x86_64 0:2.6.18-348.3.1.el5 set to be updated
      --> Finished Dependency Resolution

      Dependencies Resolved

      Удалить
    4. ================================================================================================================================================
      Package Arch Version Repository Size
      ================================================================================================================================================
      Installing:
      autoconf noarch 2.59-12 base 647 k
      automake noarch 1.9.6-2.3.el5 base 476 k
      gcc x86_64 4.1.2-54.el5 base 5.3 M
      gcc-c++ x86_64 4.1.2-54.el5 base 3.8 M
      Installing for dependencies:
      glibc-devel x86_64 2.5-107 base 2.4 M
      glibc-headers x86_64 2.5-107 base 600 k
      imake x86_64 1.0.2-3 base 319 k
      kernel-headers x86_64 2.6.18-348.3.1.el5 updates 1.5 M
      libstdc++-devel x86_64 4.1.2-54.el5 base 2.8 M

      Transaction Summary
      ================================================================================================================================================
      Install 9 Package(s)
      Upgrade 0 Package(s)

      Total download size: 18 M

      Удалить
    5. Is this ok [y/N]: y
      Downloading Packages:
      (1/9): imake-1.0.2-3.x86_64.rpm | 319 kB 00:03
      (2/9): automake-1.9.6-2.3.el5.noarch.rpm | 476 kB 00:04
      (3/9): glibc-headers-2.5-107.x86_64.rpm | 600 kB 00:05
      (4/9): autoconf-2.59-12.noarch.rpm | 647 kB 00:06
      (5/9): kernel-headers-2.6.18-348.3.1.el5.x86_64.rpm | 1.5 MB 00:14
      (6/9): glibc-devel-2.5-107.x86_64.rpm | 2.4 MB 00:24
      (7/9): libstdc++-devel-4.1.2-54.el5.x86_64.rpm | 2.8 MB 00:27
      (8/9): gcc-c++-4.1.2-54.el5.x86_64.rpm | 3.8 MB 00:36
      (9/9): gcc-4.1.2-54.el5.x86_64.rpm | 5.3 MB 00:51
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Total 104 kB/s | 18 MB 02:55
      Running rpm_check_debug
      Running Transaction Test
      Finished Transaction Test
      Transaction Test Succeeded
      Running Transaction
      Installing : imake 1/9
      Installing : autoconf 2/9
      Installing : kernel-headers 3/9
      Installing : glibc-headers 4/9
      Installing : glibc-devel 5/9
      Installing : libstdc++-devel 6/9
      Installing : automake 7/9
      Installing : gcc 8/9
      Installing : gcc-c++ 9/9

      Installed:
      autoconf.noarch 0:2.59-12 automake.noarch 0:1.9.6-2.3.el5 gcc.x86_64 0:4.1.2-54.el5 gcc-c++.x86_64 0:4.1.2-54.el5

      Dependency Installed:
      glibc-devel.x86_64 0:2.5-107 glibc-headers.x86_64 0:2.5-107 imake.x86_64 0:1.0.2-3 kernel-headers.x86_64 0:2.6.18-348.3.1.el5
      libstdc++-devel.x86_64 0:4.1.2-54.el5

      Complete!

      Удалить
  5. [root@localhost lame-3.99.5]# ./configure
    checking build system type... x86_64-unknown-linux-gnu
    .....
    .....
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libmp3lame/Makefile
    config.status: creating libmp3lame/i386/Makefile
    config.status: creating libmp3lame/vector/Makefile
    config.status: creating frontend/Makefile
    config.status: creating mpglib/Makefile
    config.status: creating doc/Makefile
    config.status: creating doc/html/Makefile
    config.status: creating doc/man/Makefile
    config.status: creating include/Makefile
    config.status: creating Dll/Makefile
    config.status: creating misc/Makefile
    config.status: creating debian/Makefile
    config.status: creating dshow/Makefile
    config.status: creating ACM/Makefile
    config.status: creating ACM/ADbg/Makefile
    config.status: creating ACM/ddk/Makefile
    config.status: creating ACM/tinyxml/Makefile
    config.status: creating lame.spec
    config.status: creating mac/Makefile
    config.status: creating macosx/Makefile
    config.status: creating macosx/English.lproj/Makefile
    config.status: creating macosx/LAME.xcodeproj/Makefile
    config.status: creating vc_solution/Makefile
    config.status: creating config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands

    ОтветитьУдалить
  6. Это сработал скрипт компиляции ./configere
    Это было вчера вечером... и я не мог понять, почему не установился кодек lame?
    Сегодня прочитал книжки PHP5, UNIX, MySQL, а именно страницы про установку (сборку из исходников)... и "вспомнил", что я забыл про
    make
    make install
    Выполнил эти команды, там насыпалось комментариев (где логи посмотреть?) и кодек (libmp3lame.so) был установлен в папку
    /usr/local/lib
    а не в /usr/lib
    После перенастройки пути к файлу (libmp3lame.so) в audacity экспорт в .mp3 заработал

    ОтветитьУдалить
  7. После выполнения команды
    make install
    среди прочего появилось сообщение:
    ....
    Libraries have been installed in:
    /usr/local/lib

    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
    - add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
    - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
    - have your system administrator add LIBDIR to `/etc/ld.so.conf'

    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.

    ....
    Там я и нашел все, что требовалось

    ОтветитьУдалить