Streaming media: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
 
(51 intermediate revisions by the same user not shown)
Line 1: Line 1:
Primary goal is to support a Rockford/Fosgate DMS1 and a couple Audreys.
__NOTOC__


The DMS1 is a uPnp thing. The Audrey is an outdated Internet appliance.
I started this page when I was trying to figure out how to stream music and video around my house.
(Outdated = I can't load new software on it.)
I updated it today (April 2015) to tell you what I have come up with so far. I updated it again when I started using [[Docker]].


Secondary goal is to support MP3 players: a Rio Forge and a Creative Zen
[[Image:red_squeezebox.jpg|left|Logitech Squeezebox Radio]]
We use a Logitech Squeezebox Radio media streamer. We love it. Too bad they discontinued it.
It works like a really nice clock radio, but it never gets static. :-) It can connect via wired network but we have it on WiFi.


Sources


* Internet radio
<br clear=all>
* Podcasts
* Music collection


== Audio ==
== Where is the music? ==


I don't want to be my own radio station, what I want is on-demand.
Currently I keep the music in a file tree rooted at /home/music which is a space on a 750GB SSD.
I keep a backup of it on the archive drive at /green/music and another copy in the cloud.
 
== Server ==
 
When we got the Squeezebox, I installed a copy of the '''squeezeboxserver''' package on my Debian server [[Bellman]]. This drove the rest of the project, because the server works so well and there are compatible clients for computers and phones! Cool.
Bellman has all our music stored on it. I can now play music that is on the server or stream radio stations from the Internet, and I can use the Squeezebox, the phone, computers and Android devices as players.
 
Squeezeboxserver is written in perl.
 
=== Docker ===
 
This is all that migration took -  well.. I did have to set uid 102 to be squeezeboxserver
and I had to move the playlists folder into /var/lib/squeezeboxserver
 
I am using a docker compose set up now, and I use a proxy so the server is visible at https://squeezebox.wildsong.biz/
Refer to source/docker/docker-squeezebox/
 
docker pull larsks/logitech-media-server
docker volume create squeezebox_settings
docker run -d --name=squeezebox --restart=unless-stopped \
  -p 9000:9000 -p 3483:3483 -p 3483:3483/udp \
  -v /etc/localtime:/etc/localtime:ro -v squeezebox_settings:/srv/squeezebox -v /home/music:/srv/music \
  larsks/logitech-media-server
 
Restarts: See the [[Docker]] page section on "Docker as a service".
I used to use systemctl with docker but gave up on that, too complicated.
Now I have it set to a restart policy of "always" instead.
 
'''There was a problem on reboots, dnsmasq did not listen to requests from Docker clients until it was restarted.''' I fixed this by added After=docker.service to /lib/systemd/system/dnsmasq.service
 
== Players ==
 
=== Custom hardware ===
 
==== ESP32 ====
 
I am working on an ESP32 based clock radio, it will probably use an  [https://adafruit.com/product/3006 Adafruit MAX98357A i2s amp] breakout board.
If you prefer Youtube, https://www.youtube.com/watch?v=At8PDQ3g7FQ
 
Here is a quick example of streaming to it: https://circuitdigest.com/microcontroller-projects/esp32-based-internet-radio-using-max98357a-i2s-amplifier-board
 
Squeezebox code https://github.com/bgiraut/SqueezeEsp32
 
Power: 5V/1.5A
ESP32
Adafruit MAX98357A breakout board
 
display??
 
 
==== Raspberry Pi ====
 
I have two [[Pi Zero W]] set ups that can stream music in the kitchen and living room, using a HiFiBerry Amp2 and running PiCorePlayer.
 
I have an Adafruit DAC pi zero bonnet too, not currently in use.
 
=== Computers ===
 
I use VLC on my Linux and Mac boxes for playback.
 
On Bellman I installed squeezelite so that I could stream music via the Logitech Media Server.
 
I run squeezelite-win.exe on [[Murre]].
 
=== MP3 players ===
 
We have 2 [[Creative Zen]] players with copies of our [[Music collection]]. Sometimes we even still use them. :-)
 
=== Android ===
 
I can install Squeezeplayer (Steven Hansel Solutions, $4.99) from the Android store onto the Grandstream phone. Then it becomes a media player.
Note it's ''just'' a player, with Squeezeplayer there are no controls. However to start music playing I can go to the web page generated by squeezeboxserver and the phone(s) running Squeezeplayer appears now in the list of players. I think this is pretty neat.
 
== Controllers ==
 
=== via web page ===
 
Squeezebox Server has a web page that lets you control any player on your network. From my network I use this link: http://bellman:9000/ (You can't see it from the Internet, sorry.)
This means you can use the browser itself to play media on the computer, or you can tell it to
send media to either the Squeezebox Radio or the player on the Android phone.
 
=== for Android ===
 
On my Android smartphone (a Galaxy Nexus), I installed the free Logitech Squeezebox Controller.
 
Sure enough, it works. The display in the Logitech app is very close to what I get on the Logitech device itself. So now I can use my smartphone as a controller for both the GXV3240 and the Logitech. Handy.
 
I tried to install it on the Nexus 7 but it won't install. I have read that Orange Squeeze is a good controller so I gave it a try. I don't like it, it feels clumsy. It might be okay if I had a small music collection or only one playback device. I uninstalled it and got my $4.99 back.
 
I am now trying the ad-supported "Squeeze Controller" and the free "Squeezer" and both of them seem to have fewer shortcomings. Right now it looks like "Squeeze Controller" is the winner.
 
== Other notes ==
 
The rest of this page contains notes when I was trying to figure out how to stream media
to a defunct player. Can't even remember its name anymore. I ended up getting rid of it
when we moved back to California.


=== Source clients ===
=== Source clients ===
Line 30: Line 125:


The streamer waits for connections from a client and when it gets one, sends audio from the source to the client.
The streamer waits for connections from a client and when it gets one, sends audio from the source to the client.
[http://www.cidero.com/index.html Cidero] does streaming of Internet radio stations
[http://www.gnu.org/software/gmediaserver/ gmediaserver] GNU Project
2007 "this project is looking for a new maintainer" oh oh but it IS in the Ubuntu repository


'''icecast2''' from Ubuntu repository -- easy to install and set up.
'''icecast2''' from Ubuntu repository -- easy to install and set up.
[http://mediatomb.cc mediatomb]


'''slimp3''' from Ubuntu repository -- mp3 only. Supports icecast format so any icecast source client that can do mp3 should also work with slimp3
'''slimp3''' from Ubuntu repository -- mp3 only. Supports icecast format so any icecast source client that can do mp3 should also work with slimp3
Line 38: Line 140:


Slimserver is designed to do what I want for the Audrey goes -- you browse your music collection and select what you want it to play.
Slimserver is designed to do what I want for the Audrey goes -- you browse your music collection and select what you want it to play.
Logitech [http://www.mysqueezebox.com/download Squeezebox Server]
The newest version of Slimserver. Does not play well with Ubuntu! It is too old.
[http://ushare.geexbox.org/ ushare]


== Video ==
== Video ==
Line 49: Line 156:
'''[http://www.jeroenwijering.com/?item=JW_FLV_Player JW FLV Player]'''  is an easy and flexible way to add video and audio to your website. It supports playback of any format the Adobe Flash Player can handle (FLV, MP4, MP3, AAC, JPG, PNG and GIF). It also supports RTMP, HTTP and live streaming, various playlists and captioning formats,
'''[http://www.jeroenwijering.com/?item=JW_FLV_Player JW FLV Player]'''  is an easy and flexible way to add video and audio to your website. It supports playback of any format the Adobe Flash Player can handle (FLV, MP4, MP3, AAC, JPG, PNG and GIF). It also supports RTMP, HTTP and live streaming, various playlists and captioning formats,


http://mpeg4ip.sourceforge.net/ mpeg4ip-server] End-to-end system to explore streaming multimedia, The mpeg4ip player supports the following :
[http://mpeg4ip.sourceforge.net/ mpeg4ip-server] End-to-end system to explore streaming multimedia; '''not in active development, last release was 9/28/2007'''. The mpeg4ip player supports the following :


File formats: avi, mp4, limited .mov, .mpg (transport and program streams), .wav, raw aac, raw mp3, raw mp4v, raw [http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC H.264]
File formats: avi, mp4, limited .mov, .mpg (transport and program streams), .wav, raw aac, raw mp3, raw mp4v, raw [http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC H.264]

Latest revision as of 23:54, 8 May 2024


I started this page when I was trying to figure out how to stream music and video around my house. I updated it today (April 2015) to tell you what I have come up with so far. I updated it again when I started using Docker.

Logitech Squeezebox Radio
Logitech Squeezebox Radio

We use a Logitech Squeezebox Radio media streamer. We love it. Too bad they discontinued it. It works like a really nice clock radio, but it never gets static. :-) It can connect via wired network but we have it on WiFi.



Where is the music?

Currently I keep the music in a file tree rooted at /home/music which is a space on a 750GB SSD. I keep a backup of it on the archive drive at /green/music and another copy in the cloud.

Server

When we got the Squeezebox, I installed a copy of the squeezeboxserver package on my Debian server Bellman. This drove the rest of the project, because the server works so well and there are compatible clients for computers and phones! Cool. Bellman has all our music stored on it. I can now play music that is on the server or stream radio stations from the Internet, and I can use the Squeezebox, the phone, computers and Android devices as players.

Squeezeboxserver is written in perl.

Docker

This is all that migration took - well.. I did have to set uid 102 to be squeezeboxserver and I had to move the playlists folder into /var/lib/squeezeboxserver

I am using a docker compose set up now, and I use a proxy so the server is visible at https://squeezebox.wildsong.biz/ Refer to source/docker/docker-squeezebox/

docker pull larsks/logitech-media-server
docker volume create squeezebox_settings
docker run -d --name=squeezebox --restart=unless-stopped \
  -p 9000:9000 -p 3483:3483 -p 3483:3483/udp \
  -v /etc/localtime:/etc/localtime:ro -v squeezebox_settings:/srv/squeezebox -v /home/music:/srv/music \
  larsks/logitech-media-server

Restarts: See the Docker page section on "Docker as a service". I used to use systemctl with docker but gave up on that, too complicated. Now I have it set to a restart policy of "always" instead.

There was a problem on reboots, dnsmasq did not listen to requests from Docker clients until it was restarted. I fixed this by added After=docker.service to /lib/systemd/system/dnsmasq.service

Players

Custom hardware

ESP32

I am working on an ESP32 based clock radio, it will probably use an Adafruit MAX98357A i2s amp breakout board. If you prefer Youtube, https://www.youtube.com/watch?v=At8PDQ3g7FQ

Here is a quick example of streaming to it: https://circuitdigest.com/microcontroller-projects/esp32-based-internet-radio-using-max98357a-i2s-amplifier-board

Squeezebox code https://github.com/bgiraut/SqueezeEsp32

Power: 5V/1.5A ESP32 Adafruit MAX98357A breakout board

display??


Raspberry Pi

I have two Pi Zero W set ups that can stream music in the kitchen and living room, using a HiFiBerry Amp2 and running PiCorePlayer.

I have an Adafruit DAC pi zero bonnet too, not currently in use.

Computers

I use VLC on my Linux and Mac boxes for playback.

On Bellman I installed squeezelite so that I could stream music via the Logitech Media Server.

I run squeezelite-win.exe on Murre.

MP3 players

We have 2 Creative Zen players with copies of our Music collection. Sometimes we even still use them. :-)

Android

I can install Squeezeplayer (Steven Hansel Solutions, $4.99) from the Android store onto the Grandstream phone. Then it becomes a media player. Note it's just a player, with Squeezeplayer there are no controls. However to start music playing I can go to the web page generated by squeezeboxserver and the phone(s) running Squeezeplayer appears now in the list of players. I think this is pretty neat.

Controllers

via web page

Squeezebox Server has a web page that lets you control any player on your network. From my network I use this link: http://bellman:9000/ (You can't see it from the Internet, sorry.) This means you can use the browser itself to play media on the computer, or you can tell it to send media to either the Squeezebox Radio or the player on the Android phone.

for Android

On my Android smartphone (a Galaxy Nexus), I installed the free Logitech Squeezebox Controller.

Sure enough, it works. The display in the Logitech app is very close to what I get on the Logitech device itself. So now I can use my smartphone as a controller for both the GXV3240 and the Logitech. Handy.

I tried to install it on the Nexus 7 but it won't install. I have read that Orange Squeeze is a good controller so I gave it a try. I don't like it, it feels clumsy. It might be okay if I had a small music collection or only one playback device. I uninstalled it and got my $4.99 back.

I am now trying the ad-supported "Squeeze Controller" and the free "Squeezer" and both of them seem to have fewer shortcomings. Right now it looks like "Squeeze Controller" is the winner.

Other notes

The rest of this page contains notes when I was trying to figure out how to stream media to a defunct player. Can't even remember its name anymore. I ended up getting rid of it when we moved back to California.

Source clients

Source clients read music from someplace and send it to the streamer. "Someplace" can be an Internet radio station, a live audio feed, or music files.

ices2 from Ubuntu repository. Supports only OGG format (so it's useless).

icegenerator - (built from source) streams to icecast, can handle mp3

muse

Streamer

The streamer waits for connections from a client and when it gets one, sends audio from the source to the client.

Cidero does streaming of Internet radio stations

gmediaserver GNU Project 2007 "this project is looking for a new maintainer" oh oh but it IS in the Ubuntu repository

icecast2 from Ubuntu repository -- easy to install and set up.

mediatomb

slimp3 from Ubuntu repository -- mp3 only. Supports icecast format so any icecast source client that can do mp3 should also work with slimp3

slimserver you can add the slimserver repository and then install the Debian version of slimserver which supports many more formats.

Slimserver is designed to do what I want for the Audrey goes -- you browse your music collection and select what you want it to play.

Logitech Squeezebox Server The newest version of Slimserver. Does not play well with Ubuntu! It is too old.

ushare

Video

Most of these can also stream audio formats.

Darwin

Geekast is an alternative GNOME interface for peercast.

JW FLV Player is an easy and flexible way to add video and audio to your website. It supports playback of any format the Adobe Flash Player can handle (FLV, MP4, MP3, AAC, JPG, PNG and GIF). It also supports RTMP, HTTP and live streaming, various playlists and captioning formats,

mpeg4ip-server End-to-end system to explore streaming multimedia; not in active development, last release was 9/28/2007. The mpeg4ip player supports the following :

File formats: avi, mp4, limited .mov, .mpg (transport and program streams), .wav, raw aac, raw mp3, raw mp4v, raw H.264

Video codecs: mpeg-4 (xvid, xvid-1.0, ISO reference), mpeg1/2 (libmpeg3, mpeg2dec), H.261, YUV (i420 raw) Through ffmpeg: h.263, Sorenson, some MJPEG, simple H.264

Audio Codecs: aac, mp3, celp, ac3 (with separate download), raw PCM Through ffmpeg: AMR NB, AMR WB, G.711 alaw and ulaw

Streaming capability: RTSP, SDP, RTP (rfc 1890 for raw audio, 2250 for mpeg1/2 audio and video, 3016 for mpeg4 video, 3119 for mp3, 3640 for aac/celp audio, 3267 for AMR octet-aligned only), mpeg2 transport streams (mpeg2 video, mp3 and ac3 audio), both multicast and streaming.

peercast - P2P audio and video streaming servent PeerCast is a P2P streaming server. It can stream music and video from a broad variety of formats.

vlc is the VideoLAN project's media player. It plays MPEG, MPEG2, MPEG4, DivX, MOV, WMV, QuickTime, mp3, Ogg/Vorbis files, DVDs, VCDs, and multimedia streams from various network sources.

VLC can also be used as a streaming server that duplicates the stream it reads and multicasts them through the network to other clients, or serves them through HTTP.

Utilities

mpeg4ip-utils - end-to-end system to explore streaming multimedia This package contains various utilities :

  • mp4info - display information about tracks in mp4 file
  • mp4dump - dumps contents from mp4 files
  • mp4trackdump - dumps track information
  • mp4tags - sets iTunes tag information
  • mp4art - extract iTunes cover art
  • mp4videoinfo - dump information about video tracks in mp4 files