v16 audio line in
#16
Question 
I have just taken the plunge and ordered a sound processor USB/SPDIF optical external unit. No to focus on the Icecast Server which might be my biggest challenge.
Reply
#17
Question 
(2021-09-25, 03:05)lucidoobe Wrote:
(2021-09-24, 17:18)black_eagle Wrote: Hi Black_Eagle,

I was able to install and configure the server correctly, no error messages now.

I am at the "create mountpoint" section. I am a little confused if I do this in the config.txt file or in Kodi?

I have an MP3 player, line-in to the USB audio interface of the local test PC I am working on. My wish is to have Kodi, Icecast server, on local PC to see that local Icecast channel live on Milkdrop2 visualisations.
When successful, I want to replicate setup at my work on a auditorium PC, to send in live stage music instead of the MP3 player.

If you have further prompts to get mountpoint happening, I would be grateful.

Lucidoobe. Undecided

Thanx Black Eagle,

I have used Icecast in the past for EDM streams, so I can relate to that. I will buy my digital interface first and then investigate an icecast server. Are they a third party device, and would you recommend any  brand specifically?


Lucidoobe.

Personally, I'd set up an icecast server on one of my machines on my lan and then use ffmpeg to encode the audio coming in on line-in to mp3 (or whatever format you like really) and send it to the icecast server.  Kodi can then connect to the stream coming from the icecast server and play it, in exactly the same way it can play streaming internet radio stations (which generally are using icecast/shoutcast servers).

This is actually pretty simple to set-up under Linux but maybe not so simple on Windows.

Still, icecast can be downloaded from https://icecast.org/download/  and ffmpeg from https://www.gyan.dev/ffmpeg/builds/  (you want the release build not the git master builds).  Do note that you can run the server, ffmpeg and Kodi all on the same machine if required.
Reply
#18
Mmmm..... updated to Matrix 19.3 just now, and Icecast is not on the list of music addons. I did find Shoutcast though, and have installed that. Hopefully that will do the job?
Reply
#19
Photo 
(2021-11-09, 01:35)lucidoobe Wrote: Mmmm..... updated to Matrix 19.3 just now, and Icecast is not on the list of music addons. I did find Shoutcast though, and have installed that. Hopefully that will do the job?
Currently cannot see how to get icecast2 to see local audio digital input as a mountpoint?
Reply
#20
(2021-11-09, 23:42)lucidoobe Wrote: Currently cannot see how to get icecast2 to see local audio digital input as a mountpoint?

That's because you are looking at things the wrong way around ! Smile

What you need to do is setup the icecast server to stream the local digital input (as if you were streaming it onto the internet, even though we are only doing this locally) and then connect Kodi to that stream and it will play it.  It's how most internet radio stations broadcast.

So, pipe audio input through ffmpeg (to encode it to mp3 or whatever format you desire) and out into the icecast server - note that this is a standalone server that should be running on the same machine as ffmpeg and the audio input you want to broadcast - it is not the Kodi Icecast plugin.

Once that bit is working, you create a .m3u playlist that contains the address of your icecast server, eg it could be http://localhost:13880 or http://192.168.1.50:9000.  You then save the playlist and open it in Kodi.  Kodi will then connect to your icecast server and play the stream, complete will visualisations etc.
Learning Linux the hard way !!
Reply
#21
Thank you Black Feather,

I downloaded ffmpeg and installed on C:\ffmpeg\bin

I am guessing that I have to discover syntax to insert my local audio (mp3 already) player line in feed to this? I am going to add a file for you to look at. I am guessing I do not, from what you write, need "shoutcast" music addon. Once I get audio file live running, I don't see how to make a playlist file m3u from the selection list on Kodi? One thing at a time. Am I right with this flowchart in my head?

Live feed (stage .wav or my local mp3 player .mp3 talks to ffmpeg. Ffmpeg talks to Icecast server via mountpoint. Mountpoint talks to "live 3mu" from Kodi playlist.

I shall persevere.

C:\>ffmpeg -i http://localhost:8000
ffmpeg version 4.4.1-full_build-www.gyan.dev Copyright © 2000-2021 the FFmpeg developers
  built with gcc 11.2.0 (Rev1, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
http://localhost:8000: Invalid data found when processing input
Reply
#22
Mm... I'm thinking it should be http://livestage:8000 as I have already edited away from the default localhost? 
As a live from stage is gonna arrive as a .wav, then I guess I have to convert via ffmpeg into .mp3 on the fly?

Apologies for me being slow.
Reply
#23
(2021-11-19, 05:12)lucidoobe Wrote: As a live from stage is gonna arrive as a .wav, then I guess I have to convert via ffmpeg into .mp3 on the fly?

Sort of.  Have a read of this article. It's based around Mac/Linux but the principle is exactly the same for Windows.  Basically, pipe the line-in audio straight into ffmpeg, which converts it into mp3, then pipe the output into the icecast server which streams it onto your lan.  In that article, the author is hosting his icecast server on a cloud server, but you can just as easily host it locally, and this is a better option for you anyway.

This explains how to find the right input on Windows.  In that article the audio is just encoded and saved to a file, but for your purposes, once you have found the right input, you would follow the instructions in the first article to send it to your icecast server.  Basically, it's just a question of changing the output from ffmpeg to point to the server rather than a file.

Once you have that chain set up and running, you create a simple m3u playlist containing the address and port of the icecast server. In your example it would be
xml:
http://livestage:8000

Note that if you are using a name rather than an IP address, you need something to resolve that address to an IP.  Personally at the moment I would stick with the IP address of the machine running the icecast server.

You then open that m3u in Kodi (either with file manager, or add it as a favourite etc) and kodi will play the stream from the icecast server.

HTH
Learning Linux the hard way !!
Reply
#24
Rainbow 
Thanx Black Eagle, 

I'll google for windows cmd syntax for getting a list of devices first, as the only linux I've ever played with is "Mint", and don't have Apple OS machines.

Get back to you when I get further in.
Reply
#25
I think that I have ffmpeg audio input OK now. Trial and error with syntax. I guess it records internally. Now I have to wade through the Icecast server connection?

C:\WINDOWS\system32>  ffmpeg -f dshow -i audio="Line (2- USB Sound Device)" output.mp3
ffmpeg version 4.4.1-full_build-www.gyan.dev Copyright © 2000-2021 the FFmpeg developers
  built with gcc 11.2.0 (Rev1, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=Line (2- USB Sound Device)':
  Duration: N/A, start: 5195.936000, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
File 'output.mp3' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'output.mp3':
  Metadata:
    TSSE            : Lavf58.76.100
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p
    Metadata:
      encoder         : Lavc58.134.100 libmp3lame
size=     524kB time=00:00:33.48 bitrate= 128.2kbits/s speed=1.34x
video:0kB audio:524kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.047180%

C:\WINDOWS\system32>
Reply

Logout Mark Read Team Forum Stats Members Help
audio line in0