
    <h1 id="intro">Intro</h1>
    <p>Hello, this is your host, Archer72, for Hacker Public Radio.</p>
    <p>In this episode, this is my third show involving my record
      player.</p>
    <p>I am using a <a
href="https://zoomcorp.com/en/us/handheld-recorders/handheld-recorders/h1essential"
        title="Zoom H1essential Stereo Handy Recorder">Zoom H1essential
        Stereo
        Handy Recorder</a> microphone, recording into Audacity for this
      show.</p>
    <h1 id="why-visit-the-record-shop">Why visit the record shop?</h1>
    <p>Picking up a record at the record shop expands my music
      choices.<br>
      I get a chance to talk to the owner on the weekend when searching
      for
      new music. He is an archaeologist and a teacher at a local college
      during
      the week, and is knowledgeable on all the music in the store.</p>
    <p><a
href="https://archive.org/details/scanned-document-2025-03-23-18-24-21-cynthiana-democrat-page-1-june-20-2024/Scanned_Document_2025-03-23_16-54-25%20Newspaper%20-%20One%20year%20with%20the%20Institute.png%20%22Newspaper%20Article%20-%20One%20Year%20With%20the%20Institute%20-%20on%20the%20Internet%20Archive%22">One
Year
        With the Institute - Archive.org</a></p>
    <p>I wanted a way to listen to the records while on my laptop,
      preferably with headphones, as to not disturb the household.</p>
    <h1 id="how-is-this-accomplished">How is this accomplished?</h1>
    <p>This is done using a combination of Darkice to capture the
      stream,
      and Icecast to stream it to the local network.</p>
    <h1 id="what-is-icecast">What is Icecast?</h1>
    <blockquote>
      <p>Icecast is a streaming media (audio/video) server which
        currently
        supports Ogg (Vorbis and Theora), Opus, WebM and MP3 streams. It
        can be
        used to create an Internet radio station or a privately running
        jukebox
        and many things in between. It is very versatile in that new
        formats can
        be added relatively easily and supports open standards for
        communication
        and interaction.</p>
      <p>Icecast is distributed under the GNU GPL, version 2.</p>
      <p>The default config file is located in</p>
      <p><code>/usr/share/doc/icecast2/icecast.xml.dist.gz</code></p>
    </blockquote>
    <p><a
href="https://archive.org/download/icecast.xml/icecast.xml.dist">icecast.xml.dist</a></p>
    <p>if the default config gets mangled or corrupted by myself.
      Several
      other types of configs are also in <code>/usr/share/doc/icecast2/</code>
      that include a bare bones config</p>
    <p>and the installed icecast2 config is located in</p>
    <p><code>/etc/icecast2/icecast.xml</code></p>
    <h1 id="configuration-needed-to-be-personalized">Configuration
      needed to
      be personalized</h1>
    <pre><code>  &lt;location&gt;Cynthiana,KY&lt;/location&gt;
  &lt;admin&gt;ricemark20.nospam@nospam.gmail.com&lt;/admin&gt;</code></pre>
    <h1 id="change-the-passwords-from-hackme-to-a-more-secure-password">Change
the
      passwords from <code>hackme</code> to a more secure password</h1>
    <pre><code>  &lt;authentication&gt;
    &lt;!-- Sources log in with username 'source' --&gt;
    &lt;source-password&gt;hackme&lt;/source-password&gt;
    &lt;!-- Relays log in with username 'relay' --&gt;
    &lt;relay-password&gt;hackme&lt;/relay-password&gt;

    &lt;!-- Admin logs in with the username given below --&gt;
    &lt;admin-user&gt;admin&lt;/admin-user&gt;
    &lt;admin-password&gt;hackme&lt;/admin-password&gt;
  &lt;/authentication&gt;

  &lt;!-- In my case, this is the IP address of the Raspberry Pi --&gt;
  &lt;hostname&gt;192.168.x.x&lt;/hostname&gt;

  mountPoint   = live # mount point of this stream on the IceCast2 server
  name      = DarkIce Vinyl Stream # name of the stream
  description   = This is my Vinyl stream # description of the stream
  url       = http://localhost # URL related to the stream
  genre      = Podcast  # genre of the stream
  public     = yes    # advertise this stream?
  localDumpFile  = recording.ogg # Record also to a file
  metadata    = yes   # enable metadata</code></pre>
    <h1 id="what-is-darkice">What is Darkice?</h1>
    <blockquote>
      <p>DarkIce is a live audio streamer designed to record audio from
        an
        audio interface, such as a sound card, encode it, and send it to
        a
        streaming server. It supports various streaming servers
        including
        IceCast 1 and 2, ShoutCast, and Darwin Streaming Server. DarkIce
        can
        encode audio in formats like MP3 and Ogg Vorbis. To use DarkIce,
        you
        configure it with settings such as the audio input device,
        sample rate,
        and streaming server details, including the server’s address,
        port, and
        authentication information.</p>
    </blockquote>
    <p>This description of Darkice is a result of using the Brave Search
      LLM, or <a
href="https://search.brave.com/search?q=what+is+darkice+streaming&amp;source=web&amp;summary=1&amp;conversation=faf9981a2e1d8db1cc13b7"
        title="Brave LLM description for Darkice">Large Language Model</a>.</p>
    <p>
    </p>
    <p>The default config file is located in</p>
    <p><code>/usr/share/doc/darkice/examples/darkice.cfg.gz</code> and
      is
      copied to the /etc directory. From there, use the <code>gunzip</code>
      command, for example <code>gunzip darkice.cfg.gz</code></p>
    <p>I used the config file from a blog by Steffen Müller on <a
href="https://stmllr.net/blog/live-mp3-streaming-from-audio-in-with-darkice-and-icecast2-on-raspberry-pi"
        title="stmllr.net - Icecast on a Raspberry Pi">stmllr.net</a></p>
    <p>August 10, 2012 as a template for my configuration</p>
    <p><a href="https://archive.org/download/icecast.xml/darkice.cfg"
        title="darkice.cfg - Archive.org">darkice.cfg</a></p>
    <p>This is the configuration I used in the end.</p>
    <a href="https://archive.org/download/icecast.xml/darkice-pi.cfg"
      title="darkice-pi.cfg - Archive.org">darkice-pi.cfg</a>
    <p></p>
    <h1 id="changes-to-the-template">Changes to the template</h1>
    <p>
      The audio device is configured in the <code>[input]</code>
      section,
      defined by <code>arecord</code> dash lowercase ‘L’ to list the
      capture
      device, which in my case is the <a
        href="https://www.amazon.com/gp/product/B00SAV0VP0"
        title="Behringer UMC202HD USB Audio Interface">Behringer
        UMC202HD USB
        Audio Interface</a>
    </p>
    <pre><code>[general]
duration    = 0    # duration of encoding, in seconds. 0 means forever
The section of the config file for audio input looks like this.
[input]
device = plughw:0,0 # This refers to card 0, device 0</code></pre>
    <h1 id="start-darkice">Start Darkice</h1>
    <p><code>darkice &amp;</code></p>
    <h1 id="update-metadata">Update Metadata</h1>
    <p>
    </p>
    <p>I was looking for a way to update the Currently Playing metadata,
      but
      my coding skills are not too good. For this, I used <a
href="https://claude.site/artifacts/7fd552c4-ec67-43f7-9dd1-be22a01da271"
        title="Claude.ai artifact">Claude.ai</a> to generate code from
      the
      prompt: BASH script to send HTTP request to change metadata on
      icecast
      stream</p>
    <a
      href="https://archive.org/download/icecast.xml/update-metadata.sh"
      title="update-metadata.sh - Archive.org">update-metadata.sh</a>
    <p></p>
    <h2 id="default-values">Default values</h2>
    <pre><code>  HOST="localhost" # 192.168.x.x
  PORT="8000"    # Default Icecast port
  MOUNT="/stream"
  USER="admin"
  PASSWORD="hackme" # Icecast admin password
  SONG="Unknown"</code></pre>
    <h2 id="usage">Usage</h2>
    <p><code>update-metadata.sh -s "HPR Test"</code></p>
<p>
<a href="hpr4355_image_1.png">
<img src="hpr4355_image_1_tn.png">
</a>
</p>
    <p>
      If there are any suggestions for improvements, please leave a
      comment or
      upload a show. I look forward to hearing about if an how other
      people
      are using a personal streaming server. Also, I am looking forward
      to the
      show from the Reserve Queue,
    </p>
    <p>2024-10-13 Fred Black What LP records do I have</p>
    <h1 id="other-references">Other References</h1>
    <p><a href="https://www.streambox.org/elc/software/darkice.htm"
        title="Radiostreaming for Beginners">Radiostreaming for
        Beginners</a></p>
