PDA

View Full Version : How to ear vlc or chrome(NETFLIX) or over multimedia reader by LMS (KDE 14.04 lts)



thevanihingman
2018-01-17, 07:19
Hi,

I have try with waveinput without success.
But read somewhere in this forum than waveinput for doing this is only the last thing to do.
Could any body help me ?

I have Kubuntu 14.04 LTS (upgraded) with last LMS, Chrome(Netflix), VLC, Audacity, ...
I will really appreciate to be able to use LMS as sound output of Chrome(Netflix, Youtube), VLC, (and if possible Audacity, ...).

Is it possible to do this without waveinput ?
How ?

Thanks for your help,
Sylvain.

bpa
2018-01-17, 08:43
Waveinput will not normally work with video as audio and video will be out of sync due to different network paths.

The only way to make it work is to use somehting like mplayer and to manually tell mplayer to alter the time gap between audio and video stream and even then sync may not be good.

thevanihingman
2018-01-17, 09:35
Waveinput will not normally work with video as audio and video will be out of sync due to different network paths.

The only way to make it work is to use somehting like mplayer and to manually tell mplayer to alter the time gap between audio and video stream and even then sync may not be good.

Hi,

VLC can manage this very well too.
But today WaveInput is not working here (so I am not yet in sync issue).
Do you want to say that the only way is to use waveinput to feed with my local players my squeezelite boxes ?

BR.

bpa
2018-01-17, 13:03
But today WaveInput is not working here (so I am not yet in sync issue).
Do you want to say that the only way is to use waveinput to feed with my local players my squeezelite boxes ?

All wavinput does is copy an audio source and feed it as a 44.1Khz PCM stream into LMS.

If your system uses pulseaudio then obtaining the correct "device" to act a source can be very tricky.
If your system uses ALSA No pulseaudio) then it is usually straighforward by using aplay.

Before using wavinput - make sure you have a command that when executed at a shell prompt under your LMS userid can copy the desired audio stream into a WAV file. No point using Wavinput until you have such a command.

thevanihingman
2018-01-18, 04:57
All wavinput does is copy an audio source and feed it as a 44.1Khz PCM stream into LMS.

If your system uses pulseaudio then obtaining the correct "device" to act a source can be very tricky.
If your system uses ALSA No pulseaudio) then it is usually straighforward by using aplay.

Before using wavinput - make sure you have a command that when executed at a shell prompt under your LMS userid can copy the desired audio stream into a WAV file. No point using Wavinput until you have such a command.

Hi,
I use alsa : how to use aplay ?
How to verify I have a command that when executed at a shell prompt under your LMS userid can copy the desired audio stream into a WAV file ?
BR.

bpa
2018-01-18, 05:16
I use alsa : how to use aplay ?
It is a standard ALSA application -plenty of maunals & tutorials online


How to verify I have a command that when executed at a shell prompt under your LMS userid can copy the desired audio stream into a WAV file ?
BR.
edit: changed play to arecord as it was a mistake -
On a command line the foillowing command will play the Default alsa device and copy audiostream in 44.1kHz/16bit/2chan WAV format into a file call test.wav



arecord -D default -f cd -t wav >test.wav


Play something on the audio outout you want recorded. Issue the above arecord command. Let it record for say 30 secs - use CTRL/C to stop and then play back test.wav and check if it was the audio you wanted recorded.

If you want to know what devices are available to aplay - use the "-l" lower case letter L. The device can replace "default" in the -D option above.


aplay -l


To test under the LMS userid - it would be best to login under than id but you could use "su" but it is not 100%. The actual userid will depened on your installation but use "ps" to see what userid the LMS server process is using.

thevanihingman
2018-01-18, 06:25
aplay -D default -f cd -t wav >test.wav do not work (test.wav stay at 0oct)

the command : pactl list short |grep RUNNING return : 1 alsa_output.pci-0000_00_14.2.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING

the command : parec -v -d alsa_output.pci-0000_00_14.2.analog-stereo.monitor --file-format=flac recording.flac work perfectly

I have add the user squeezeboxsever to audio, pulse and pulse-access groups (I do not add me)

I have modified custom-convert.conf (/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/WaveInput) :

#
# 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$

===> no success (the play button stay only few seconds and no sound get out) even after reboot.

BR

bpa
2018-01-18, 06:27
I warned earlier about Pulseaudio - alsa under Pulseaudio is not the same as Alsa without pulseaudio.

Pulseaudio requires a different strategy than simple Alsa and IIRC it usually much more convoluted with more settings/permission etc . It has been documented/discussed already at length in the WaveInput plugin thread.

I'll have to review that thread and see if I canpoint you in the right direction.

thevanihingman
2018-01-18, 10:43
I said earlier than aplay -D default -f cd -t wav >test.wav do not work (test.wav stay at 0oct)
But arecord do something (with the same paramters it gives a lot of noise but it records something)
BR

bpa
2018-01-18, 11:50
I said earlier than aplay -D default -f cd -t wav >test.wav do not work (test.wav stay at 0oct)
But arecord do something (with the same paramters it gives a lot of noise but it records something)
BR
edit: I made a mistake (bad memory) arecord should have been used not aplay
aplay and arecord are in fact the same application - just cosmetic and setting of intiital paramters depening on name.

Unless you get a recording of what you want - do not think you are making progress.

I'm still going back through old threads to find relevant instructions. System with pulseaudio can be difficult and in a few cases no solution was found.

bpa
2018-01-19, 02:07
aplay -D default -f cd -t wav >test.wav do not work (test.wav stay at 0oct)

the command : pactl list short |grep RUNNING return : 1 alsa_output.pci-0000_00_14.2.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING

the command : parec -v -d alsa_output.pci-0000_00_14.2.analog-stereo.monitor --file-format=flac recording.flac work perfectly

I have add the user squeezeboxsever to audio, pulse and pulse-access groups (I do not add me)

I have modified custom-convert.conf (/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/WaveInput) :

#
# 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$

===> no success (the play button stay only few seconds and no sound get out) even after reboot.

BR

Changes to cusomter-convert.conf file only take effect after LMS has been restarted. The active settings are visible in FileTypes.

OK - I have found the 2015 post which detailed these steps. You need to check whether you have done them correctly.

1. Do you have entries in WebUI Setting/Advanced/FileTypes for WaveInput - and are they correct (i.e. parec/lame, parec , parec) ?
2. What is the URL in the Favorite you created to play the stream ?
3. Get a log with player.source set to INFO when trying to play the Wavin: Favorite ? - copy log to a file, zip and paste to a post. Make sure log start before you try the test and finished 20 secs after pressing play.

d6jg
2018-01-19, 04:07
I have just read through this thread.

There is no doubt that it is technically possible to take the audio from any source and convert it by whatever means (wavinput is only one) to a stream that LMS can read and play.

However if I read things correctly you want to see video in one place and send audio by stream to LMS. It won't be usable. There will just be too much lag on the audio to make it acceptable as a viewing experience.

bpa
2018-01-19, 04:58
There is no doubt that it is technically possible to take the audio from any source and convert it by whatever means (wavinput is only one) to a stream that LMS can read and play.

However if I read things correctly you want to see video in one place and send audio by stream to LMS. It won't be usable. There will just be too much lag on the audio to make it acceptable as a viewing experience.
I have already pointed out this issue video/audio sync but the OP wants to persist in trying it out by manually altering sync using vlc