Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    WaveInput for Linux

    Hi, flushed with success in getting BBC iPlayer running (thank you) I now undertook WaveInput.

    http://forums.slimdevices.com/showth...nput-for-Linux

    This is a post from 2008, so probably a bit(!) dated, but I haven't found anything more current:

    Summary
    This plugin enables Linux PC audio to be streamed through SqueezeCenter.
    Just exactly what I want, thank you.

    Install
    Install by unpacking the attached .tar.gz file
    Um, I do not see any "attached .tar.gz file"

    I have installed the specified repo, and have installed the WaveInput plugin therefrom, but it doesn't work, so I suspect the available plugin may be a Windows version not the Linux version??

    Define "it doesn't work":
    • Activate the plugin in "Settings"
    • Add a favorite WaveInput URL: wavin:default
    • Stop, then start LMS
    • Click WaveInput under Favorites
    • It opens a right hand panel:
    Name:  waveinput-50.jpg
Views: 1699
Size:  44.6 KB
    • Start the audio stream (e.g., Chromium, Audacity, whatever), observe sound from the computer speakers
    • Observe the following in PulseAudio Volume Control (PAVC):
    ∘ Playback:
    * ALSA Plugin [Audacity]: ALSA Playback on. Peaks at ~40dB
    ∘ Output Devices:
    * Simutaneous Output to Built-in Audio Analog Stereo (BAAS). Peaks at ~33dB

    • I click the play (>) button. It changes to the pause icon (two vertical bars) for a second, then changes back to the play icon.

    Thanks again, Andy

    ========== Details ==========

    The most difficult part in getting this plugin to work will probably be the ALSA configuration. Typically the user will use an appropriate mixer application (e.g. amixer, alsamixer, Kmixer, Gnome-alsamixer) to configure the correct stream to be used in playback.
    I am using PulseAudio Volume Control (PAVC) as an interface between source applications (Chrome, mp3 players, Audacity, etc) and sink applications, such as Audacity for recording ALSA streams and of course LMS WaveInput, except it doesn't show up under PAVC.

    All the source streams are manifested to PAVC as either Built-in-Audio-Analog-Stereo (BAAS) or Monitor of BAAS (MBAAS). But LMS streams do not appear here, so its input must bypass PAVC?

    A good installation will have a new FileType WaveInput under Settings/Advanced/File Types. The WaveInput FileType should have at least the WAV and Flac entries enabled
    This is indeed what I see from installing the plugin from the specified repo:
    Name:  wav.jpg
Views: 1671
Size:  5.9 KB
    Name:  flac.jpg
Views: 1669
Size:  7.0 KB
    Name:  wavfiles.jpg
Views: 1675
Size:  7.4 KB
    [color=red] For SC 7.3 and later
    I have LMS:
    Logitech Media Server Version: 7.9.0 - 1446929859 @ Sun Nov 8 04:00:52 UTC 2015
    using a SlimDevices Squeezebox v.3.

    How to use
    There is no user interface. The ALSA stream is played through the URL wavin:<PCM_STREAM> where <PCM_STREAM> is the ALSA PCM name. Typically this will be "default" (i.e. wavin:default )
    I have used wavin:0 and wavin:default. Neither responds. (For future Lessons Learned: there is a propensity to use wavein (note the e)... :-(

    I also tried wavin:audacity without success.

    The user should create an entry in Favorites or My Radio Stations, the name is arbitrary and the URL will be typically wavin:default.
    That is what I have done, with both wavin:0, wavin:default, and wavin:audacity. And of course restarted squeezeboxserver after each change.

    Setup Hints...
    TLDR,we can fine tune after we get the basic stream working...

    Thanks again for all your work and service.

    Kind regards, Andy

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,770
    WaveInput worked OK with native ALSA aludio but if you have PulseAudio which fakes ALSA interface - then lots of problems can happen.

    The old advice was - unless you really used PulseAudio - uninstall PulseAudio and install ALSA. That advice is now a bit dated as PulseAudio is shipped as standard for many distros.

    If you can wait a few days (I'm trying to get a new version iof BBCiPlayer ready) - I'll have a look again as instruction for PulseAudio are quite different.

    What OS/Distro version are you using ?

  3. #3

    Thanks

    Quote Originally Posted by bpa View Post
    WaveInput worked OK with native ALSA aludio but if you have PulseAudio which fakes ALSA interface - then lots of problems can happen.
    Thanks for the explanation. I've struggled mightily to understand all the alphabet soup. I've done a spreadsheet for myself that generally sorts out the Pulse Audio Volume Control, but as you note, the rules keep changing, so it can all be rather daunting...

    The old advice was - unless you really used PulseAudio - uninstall PulseAudio and install ALSA. That advice is now a bit dated as PulseAudio is shipped as standard for many distros.
    Yes, indeed. Times change...

    If you can wait a few days (I'm trying to get a new version iof BBCiPlayer ready) - I'll have a look again as instruction for PulseAudio are quite different.
    Certainly! I can wait forever. Your service is invaluable. I wish Logitech would do the same.

    [/QUOTE]
    What OS/Distro version are you using ?[/QUOTE]

    Linux openSUSE 13.2.20150224 64-bit
    PulseAudio 5.0-4.2.1.1-x86_64 from vendor openSUSE
    alsa-plugins-pulse 1.0.28-3.1.3-x86_64 from vendor openSUSE
    pavucontrol 2.0-4.2.1-x86_64 from vendor openSUSE

    Thank you again.

    Kind regards, Andy

  4. #4

    Happy Holidays...

    BPA hi, have you had a chance to think about this? I know it is a busy time. Kind regards, Andy

  5. #5
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,770
    I think part of your problem is that you are playing application which are using pulseaudio but trying to record them using alsa.

    If the application you want to record is playing to an alsa output device then waveinput should use the alsa device "pulse" and arecord in the conf file
    If the application you want to record is playing to a pulseaudio then waveinput should use a pulse audio monitor device such as "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" and use parecord in the conf file

    From your description I tiunk you are mainly using pulseaudio appl;ication so first find the relevant monitor device. When the application is playing to a speaker try the following command

    pactl list short | grep RUNNING

    This will show the running devices and then look for the monitor device applicable to your output device.

    If the monitor device is alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

    try the following command to check output is being recorded
    parec -v -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor --file-format=flac recording.flc

    This will record the stream in Flac format into the file recording.flc

    Then you can update the waveinput conf file to
    Code:
    #
    # wavin 
    #
    wavin pcm * * 
    	# R
    	[parec] --channels=2 --format=s16le --rate=44100 --file-format=raw -D $FILE$ 
    wavin mp3 * *
    	# RB:{BITRATE=-B %B}
    	[parec] --file-format=wav -d $FILE$  | [lame] --silent -q $QUALITY$ -v $BITRATE$ - -
    wavin flc * * 
    	# R
    	[parec] --file-format=flac -d $FILE$
    and create a Favorite for the pulse audio monitor
    wavin:alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

    I iony tested this with VLC and Flac output format - but it worked OK on Ubuntu with 4 sec delay.

  6. #6
    Junior Member
    Join Date
    Dec 2016
    Posts
    7
    Hi, i tried to follow your instructions. But Playback doesn't start.
    Arrow(play) ist not changing in Pause-Sign, time isn't counting up.

    pactl list short | grep RUNNING

    0 alsa_output.pci-0000_02_02.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING
    0 alsa_output.pci-0000_02_02.0.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz RUNNING
    2 rtp.monitor module-null-sink.c s16be 2ch 44100Hz RUNNING
    # parec -v -d alsa_output.pci-0000_02_02.0.analog-stereo.monitor --file-format=flac recording.flc
    Öffnen eines aufnehmen-Streams mit Sample-Angabe 's16le 2ch 44100Hz' und Kanalzuordnung 'front-left,front-right'.
    Verbindung hergestellt.
    Stream wurde erfolgreich erstellt.
    Pufferdaten: maxlength=4194304, fragsize=352800
    Benutze Sample-Angabe 's16le 2ch 44100Hz', Kanalzuordnung 'front-left,front-right'.
    Mit Gerät alsa_output.pci-0000_02_02.0.analog-stereo.monitor (index: 0, ausgesetzt: no) verbunden.
    ^CSignal empfangen, beenden.3793 usec.

    Then you can update the waveinput conf file to

    taken example from below. is this the fault?

    and create a Favorite for the pulse audio monitor
    Title: alsa
    URL: wavin:alsa_output.pci-0000_02_02.0.analog-stereo.monitor

    I iony tested this with VLC and Flac output format - but it worked OK on Ubuntu with 4 sec delay.
    I can't do anything with this request, because i don't know how i could test this.

    Could you maybe help me?

    Thanks,
    Stephan

  7. #7
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,770
    Quote Originally Posted by abc2006 View Post
    taken example from below. is this the fault?
    Zip and attach your waveinput.conf file to a post so it can be verified.

    Don't forget you must restart LMS after each change to a conf file as otherwise new conf file is only read at LMS startup.

  8. #8
    Junior Member
    Join Date
    Dec 2016
    Posts
    7
    Quote Originally Posted by bpa View Post
    waveinput.conf
    /confused: has it to be named "waveinput.conf" ? I just took the existing file "custom-convert.conf", because the content was exactly the same


    Quote Originally Posted by bpa View Post
    Don't forget you must restart LMS after each change to a conf file as otherwise new conf file is only read at LMS startup.

    That's clear to my by now, thanks
    Attached Files Attached Files

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,770
    Sorry it is over a year since I wrote the ppst - the custom-convert.conf is correct.

    After you made the test recording - did you listen to the file recording.flc and did it record OK ?

    edit:

    For reference can you please give details of your system which is running Pulseaudio including version nos.

  10. #10
    Junior Member
    Join Date
    Dec 2016
    Posts
    7
    Quote Originally Posted by bpa View Post
    Sorry it is over a year since I wrote the ppst - the custom-convert.conf is correct.
    great !


    Quote Originally Posted by bpa View Post
    After you made the test recording - did you listen to the file recording.flc and did it record OK ?
    No, i didnt. But i caught it up and is sounds great.

    Quote Originally Posted by bpa View Post
    For reference can you please give details of your system which is running Pulseaudio including version nos.

    Ubuntu 16.10 as Guest in a Vmware-Player VM.
    RAM 4GB
    HDD 20 GB
    Code:
    # aplay -l
    **** Liste der Hardware-Geräte (PLAYBACK) ****
    Karte 0: AudioPCI [Ensoniq AudioPCI], Gerät 0: ES1371/1 [ES1371 DAC2/ADC]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Karte 0: AudioPCI [Ensoniq AudioPCI], Gerät 1: ES1371/2 [ES1371 DAC1]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Code:
    # pulseaudio --version
    pulseaudio 9.0


    Host is also ubuntu 16.10.
    AMD Phenom(tm) II X4 955 Processor
    RAM 16 GB
    HDD 10 TB
    SSD 500 GB

    Code:
    aplay -l
    **** Liste der Hardware-Geräte (PLAYBACK) ****
    Karte 0: SB [HDA ATI SB], Gerät 0: ALC892 Analog [ALC892 Analog]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Karte 0: SB [HDA ATI SB], Gerät 1: ALC892 Digital [ALC892 Digital]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Karte 1: NVidia [HDA NVidia], Gerät 3: HDMI 0 [HDMI 0]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Karte 1: NVidia [HDA NVidia], Gerät 7: HDMI 1 [HDMI 1]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Karte 1: NVidia [HDA NVidia], Gerät 8: HDMI 2 [HDMI 2]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Karte 1: NVidia [HDA NVidia], Gerät 9: HDMI 3 [HDMI 3]
      Sub-Geräte: 1/1
      Sub-Gerät #0: subdevice #0
    Network is Gigabit Ethernet, but as if LMS plays e.g. Spotify without any issues (except the bad ui), I don't think there are issues about my general Hardware setup.
    Sound to local speakers plays fine, even from Host as also from Guest.
    If you say, that's the problem, i hm. maybe have to find another PC for testing.

    I hope, i didn't forget something important!

    Thanks for help!
    Stephan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •