INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Quick Start Guide for Installing JRiver Mediacenter 23 ARM on a Raspberry Pi  (Read 39989 times)

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

This guide to performing a fresh install of JRiver's ARM build for the Raspberry Pi version 1 B+, Raspberry Pi version 2, or Raspberry Pi version 3.  If you're looking to upgrade an older installation, see this thread for instructions: https://yabb.jriver.com/interact/index.php/topic,111372.0.html

Mediacenter works best on a Pi 2 or 3, but will work on the Pi 1 B+ (especially if you overclock), but the experience is limited. The steps to get MC running on the Pi are somewhat similar to getting it running on a normal linux system, with a few tweaks.

Setup

Hardware/OS setup:

Install Raspbian onto an SD card using the downloaded NOOBS image from the Raspberry Pi website. They have good instructions for install there.

Configuring Hardware:

At first boot the Pi may show a config utility (called raspi-config), if it doesn't show, it is now available through the launcher menu at the top left of the desktop. For easy use of mediacenter, I recommend a) making sure that the Pi is set to boot into a graphical desktop environment by default, b) choosing the audio output you want by default (HDMI or the Pi's built in audio output*), and c) thinking about whether you want to choose one of the overclock* options in the advanced options. Once you've picked your settings, reboot.

Notes:

Audio: the Pi's HDMI output works great, but the built in stereo jack is not the highest quality output in the world. I wouldn't recommend using it for actual listening. If you have a USB DAC, just ignore that for now, this option is only about the behavior of the Pi's built in audio outputs.

Overclocking: Overclocking can potentially shorten the life of your Pi or cause instability. However, because the Pi now comes with built in thermal throttling, you can overclock using the raspberry pi utility as described above without voiding your warranty. Overclocking makes a huge difference in performance for the Pi 1; I did not find the Pi 1 usable at stock settings, YMMV. Overclocking is less important for the Pi 2, but it definitely improves performance. AFAIK, the Pi 3 does not support out of the box overclocking.  I have not personally encountered overclocking related instability with about four different Pis, but that doesn't mean you won't. If you decide to wait to overclock you can get back to the built in configuration utility any time by running the raspi-config utility from the menu in the upper right hand corner.

Software Preparation:

After rebooting, you should be looking at the Pi's desktop. If your Pi isn't plugged into to an ethernet line, take a minute to configure your wi-fi adapter to get internet access. Once that's done, open a terminal by clicking on the icon that looks like a computer monitor. Enter the following into the terminal:
Code: [Select]
sudo apt-get update && sudo apt-get dist-upgrade

After you enter the line, you'll be prompted whether to install updates to packages; press "y" to confirm. It may take a little while for the packages to download and install. Now enter the following into the terminal

Code: [Select]
cd /boot
sudo nano config.txt

This will show you the file config.txt in the text editor nano. You'll see a lot of information in the config file already, scroll down to the bottom of the file using the direction keys on your keyboard and enter the following two lines exactly as shown:

Code: [Select]
framebuffer_depth=32
framebuffer_ignore_alpha=1

Then save the file by pressing Ctrl+O, then enter. Then press Ctrl+X to exit, and you should be back at the terminal. Now close the terminal and reboot the pi.

Installing MC:

After the reboot, it's time to install MC:

Code: [Select]
wget -q "http://dist.jriver.com/mediacenter@jriver.com.gpg.key" -O- | sudo apt-key add -
sudo wget http://dist.jriver.com/latest/mediacenter/mediacenter23native.list -O /etc/apt/sources.list.d/mediacenter23.list
sudo apt-get update
sudo apt-get install mediacenter23

After installation completes, you should see MC in the application menu in the upper left hand corner under "sound and video." Open MC, and you're off! 

Installing a License:

JRiver offers a 30-day trial, but to keep using the software you'll need to buy and register it. Currently a JRiver for Linux license or Master license will work. There are several ways to install a JRiver License, but the easiest way is to do it on the command line. 

When you purchase JRiver, you receive an E-mail with an .mjr file. Download that file to your Raspberry Pi's Downloads directory (the one created above). Then open a terminal by clicking on the icon that looks like a computer and enter the following command:

Code: [Select]
mediacenter23 /RestoreFromFile ~/Downloads/"Media Center23 Linux-YYYYYY.mjr"

Replace the Y's with the numbers from your .mjr file, but otherwise enter the command exactly as shown. 

NOTE for advanced users: This will not work correctly if you try to do it via ssh, because Mediacenter needs a display/xserver in order to run.  If you have used the headless/VNC setup
instructions below, try connecting to the pi using VNC and using lxterminal to register your license.

Setting Thread Priorites for Improved Performance

To help ensure fewer dropouts and more seamless operation on a resource contrained sytem like a raspberry pi, you should set mediacenter to have greater priority over CPU time.  To set the thread priorities, type
Code: [Select]
sudo nano /etc/security/limits.conf

This will open limits.conf for editing. Enter the following at the bottom of the file (if the file is empty when you open it, that's fine too):
Code: [Select]
pi - rtprio         100
@audio - rtprio 100

Then type the following into the terminal.
Code: [Select]
sudo usermod -aG audio pi

After your next reboot, Mediacenter should have improved thread priorities.

Audio Setup:

If you're using the Pi's built in audio output (HDMI or stereo), it should just work provided you did the steps above. If you have a USB DAC, you'll need to configure MC to address it just like in normal MC for Linux. That means looking under options --> Audio Devices and looking for a hardware device (an entry for your DAC that has something like "front:" or "surround:" in the name). 

Updating:

To update mediacenter (and the rest of your Pi OS) just enter the following line on the terminal:
Code: [Select]
sudo apt-get update && sudo apt-get dist-upgrade

Troubleshooting Audio

If you followed the steps above and are not getting audio output via HDMI, try the following:

Alsamixer:
In the terminal "alsamixer" and you will see a volume bar (a "graphical" mixer displayed using ASCII characters).  Check whether the volume is muted by looking at the bottom of the column: if you see "MM" press the "m" key to unmute and then press escape to exit.  If you see "00" then the output isn't muted and that's not the problem (press escape to exit)

Monitor/DVI issues:
Many monitors expect/request a DVI input, which results in the Pi not sending sound to those monitors by default.  To find out if that's what's causing your problem, open a terminal, and type

Code: [Select]
sudo nano /boot/config.txt

and then find the line that reads

Code: [Select]
#hdmi_drive=2

 Remove the "#" symbol, and leave the rest of the line intact.  If your file doesn't have that line for some reason, you can just add the line at the end of the file.  In either case, save the file by pressing CTRL+O, and exit nano by pressing CTRL+X. Then reboot the Pi and test whether you can get sound over HDMI. Changing that option in config.txt has resolved no-audio issues for several folks with screens that have those issues with HDMI support.

Pops and Dropouts:

Pops or dropouts can be caused by a lot of different things and can be tough to troubleshoot.  Some users have found that adjusting CPU frequency scaling can help on RPi 2's (RPI 1's won't benefit from this tweak).  The following link explains how to set your RPi 2 to stay at maximum CPU frequency (using the performance CPU governor: http://yabb.jriver.com/interact/index.php?topic=95578.msg676554#msg676554

Some notes on getting the most out of MC on the Pi:

The Pi is not a full-featured computer so things will take longer to do on the Pi than on a normal computer. Be patient especially during startup or right after. It might take ten or even thirty seconds for mediacenter to start after you click the icon (depending on whether you have a pi 1 or pi2 and your other settings). Video is not currently supported.  Other than that issue, everything I've tested works pretty well. 


An Important Note Concerning Power:


Pi's are very sensitive to not having enough power; if you plug in too many power hungry USB peripherals it can cause the Pi to reboot or turn off (and corrupt the sd card!). The safest way to resolve this is to use a good powered USB hub and plug the peripherals into that. The best part is that the Hub can also power the Pi itself, so you still only have one wall plug! Some USB hubs won't work very well due to back-power issues, but a recommended list of hubs is available here: http://elinux.org/RPi_Powered_USB_Hubs.  To be clear, if you're just plugging in a usb keyboard/mouse and a wi-fi adapter you should be fine with the normal power supply; it's things like external hard drives and USB DACs that need more juice.

Additionally, if you don't want to use a USB hub, you may be able to power more peripherals by adding the following line to your config.txt:

Code: [Select]
max_usb_current=1

That line allows the Pi's USB ports to supply more current to peripherals, which has allowed several forum members to use an external Hard Drive without using a USB hub.  [Thanks to Hilton for finding and testing that option.]

Pi's are also sensitive to sudden loss of power: cutting off the power on a pi without shutting down properly can and will corrupt your sd card. For that reason it's important to always shut down your pi appropriately. However accidental power outages do occur, so, as a best practice, consider backing up your sd card with a disk imaging utility once you've gotten everything working the way you want. Another more advanced approach is to hook up a rechargeable battery in between the power supply and the Pi to act as a buffer in case of sudden power loss, and configure the Pi to shut down gracefully when mains power goes out, but that's a more advanced topic.

Status of Features
What I've tested that works for me:

1) Local audio playback of FLACs and MP3s (Pi 1, 2, and 3)
2) Using the Pi as a library client (Pi 1, 2, and 3)
3) Using the Pi as a DLNA renderer (Pi 1, 2, and 3)
4) Controlling the Pi with gizmo or eos (Pi 1, 2, and 3)
5) Streaming to gizmo from the Pi (works on Pi 2 and 3, not on the Pi 1)
6) Normal window resizing
7) ALSA-compatible USB DACs
8 ) Using an external hard drive with the Pi (some additional configuration required for some drives)
9) A user has reported that DSD works on the pi (as of 2017)

What I have not tested:

1) Airplay, etc. (I have no macs or i-devices to test with)

What is not working/supported:

1) Video Playback
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Running Without a Monitor: If you would like to run the Pi without a monitor attached, that's a slightly more advanced topic.  MC needs some kind of "display" in order to run.  When a monitor is not attached, the pi will not necessarily start it's display, which will prevent MC from running. The following steps outline a very basic method of creating a virtual display and allowing for remote control of Mediacenter on the pi. NOTE: If you're using a different username than "pi", you should replace all instances of "pi" in the code below with your username. 

Enter the following onto the end of your /boot/config.txt file (as described above)
Code: [Select]
framebuffer_width=1920
framebuffer_height=1080
hdmi_group=2
hdmi_mode=82
hdmi_drive=2

New Method
This method has some advantages over the old method and is recommended.
First enter the following text in a file at /etc/systemd/system/jriver.service:
Code: [Select]
  [Unit]
     Description=JRiver
     After=display-manager.service

  [Service]
     Type=simple
     Environment=DISPLAY=:0
     User=pi
     ExecStart=/usr/bin/mediacenter23 /MediaServer
     Restart=always
     RestartSec=10
     KillSignal=SIGHUP
     TimeoutStopSec=45
     LimitRTPRIO=100

  [Install]
     WantedBy=graphical.target

Then enter the following text in /etc/systemd/system/x11vnc.service:
Code: [Select]
[Unit]
     Description=x11vnc
     After=display-manager.service

  [Service]
     Type=forking
     Environment=DISPLAY=:0
     User=pi
     ExecStart=/usr/bin/x11vnc -rfbauth /home/pi/.vnc/passwd -display :0 -geometry 1920x1080 -auth guess -forever -bg
     Restart=always
     RestartSec=10

  [Install]
     WantedBy=graphical.target

Then run the following command replacing "your_password" with a password of your choice:

Code: [Select]
sudo apt-get install x11vnc
x11vnc -storepasswd your_password ~/.vnc/passwd

Once you've done the above, set them to start on boot by typing
Code: [Select]
sudo systemctl enable jriver.service
and
Code: [Select]
sudo systemctl enable x11vnc.service

Then reboot, and you should have jriver and a VNC server running automatically on boot and both will restart if they crash.  Test it out by trying to log in from another computer using a VNC client.  For example, tigervnc is available for Windows, Mac, and Linux: https://bintray.com/tigervnc/stable/tigervnc/1.4.3

When you start TigerVNC it will ask you for the VNC server details.  Enter the ip address* of your pi. It will look something like
Code: [Select]
192.168.1.35 Once you enter the address, click connect, and it will prompt you for your password. 

*If you don't know the ip address of your pi, enter "sudo ifconfig" in a terminal on your pi, and it will tell you. You're looking for a 4-part number separated by periods next to the phrase "inet addr." You want the one in the paragraph labelled eth0 if your pi has a wired connection or wlan0 if your pi has a wireless connection.

You should now be looking at your pi desktop with MC running!

Old Method (Don't use this in addition to the new method, its either/or)

Then enter the following commands replacing your_password with a password you will remember
Code: [Select]
sudo apt-get install x11vnc
mkdir /home/pi/.vnc
x11vnc -storepasswd your_password /home/pi/.vnc/passwd

Now enter the following line:
Code: [Select]
x11vnc -rfbauth ~/.vnc/passwd -display :0 -geometry 1920x1080 -auth guess -forever -bg

You should now have a remote VNC server running on your pi. Test it out by trying to log in from another computer using a VNC client.  For example, tigervnc is available for Windows, Mac, and Linux: https://bintray.com/tigervnc/stable/tigervnc/1.4.3

When you start TigerVNC it will ask you for the VNC server details.  Enter the ip address* of your pi. It will look something like
Code: [Select]
192.168.1.35 Once you enter the address, click connect, and it will prompt you for your password. 

*If you don't know the ip address of your pi, enter "sudo ifconfig" in a terminal on your pi, and it will tell you. You're looking for a 4-part number separated by periods next to the phrase "inet addr." You want the one in the paragraph labelled eth0 if your pi has a wired connection or wlan0 if your pi has a wireless connection.

You should now be looking at a virtual desktop on your pi, from which you can run MC!

We're not done yet, though, as we still need to configure the pi to start the vncserver and MC on boot. The easiest way to do this is with a cron script. Type "sudo nano ~/headless" into the terminal and type the following
Code: [Select]
#!/bin/bash
export USER=pi
export DISPLAY=:0
x11vnc -rfbauth ~/.vnc/passwd -display :0 -geometry 1920x1080 -auth guess -forever -bg
mediacenter23 /mediaserver
Once you're done, press CTRL-X, and choose "y" and press "enter" twice.  Now type
Code: [Select]
sudo chmod 755 ~/headless
crontab -e

After you enter the second command, you may be prompted you to choose an editor; if so choose /bin/nano, which should be option 1.  Now you should now be looking at a file with some information in it. 

If you want mediacenter to launch on boot type the following line at the bottom of the file:
Code: [Select]
@reboot     /home/pi/headless > /dev/null
Once you've added the one you want, press CTRL-X and then "y" and "enter" twice.  Now reboot your pi as described above, and within a few minutes you should be able to access MC and your VNC desktop. 

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?

Thanks very much, mwillems!
Logged

sejethomas

  • Recent member
  • *
  • Posts: 24

Where can I find JRiver 21 for linux?
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302

Running Without a Monitor:
Code: [Select]
x11vnc -storepasswd your_password ~/.vnc/passwd

I tried the above command with "your-password" changed and received an error message: "bash: x11vnc: command not found"
Logged

tyler69

  • Citizen of the Universe
  • *****
  • Posts: 946

Is there a timeline for video and/or tv support? If so, could you please share this information?
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871

Is there a timeline for video and/or tv support? If so, could you please share this information?
No timeline for TV support.
As for video, it is being considered.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

I tried the above command with "your-password" changed and received an error message: "bash: x11vnc: command not found"

Apologies, I forgot to bring something over from the old method.  First run "sudo apt-get install x11vnc"
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302

Apologies, I forgot to bring something over from the old method.  First run "sudo apt-get install x11vnc"
Thank you. Could you explain why this method of starting a x11vnc service is preferred over the built-in one which just enables VNC in the RPi's settings (together with ssh)?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Thank you. Could you explain why this method of starting a x11vnc service is preferred over the built-in one which just enables VNC in the RPi's settings (together with ssh)?

1) The "built in" VNC method is a relatively new addition to the raspbian image, so I haven't personally tested it (i.e. there was not a usable option for that the last time I set up my own pi systems).
2) Not all VNC servers are equivalent.  Several linux vnc servers (tightvncserver and others) no longer work with MC at all due to changes in MC in the MC22 cycle.  X11vnc is used because it is known to work; I don't know what VNC server the pi uses for its built in option.  It may or may not work.  If you test it and it works as expected, do report back and I'll add a note.
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302

In the Raspberry configuration file I enable VNC and on my Macs I run VNC Viewer. I do this on both a Raspberry 3 and a Raspberry 1+ on which I run Pi-hole. In both cases it is very stable. What isn't so stable is MC which crashes regularly after using JRemote.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

In the Raspberry configuration file I enable VNC and on my Macs I run VNC Viewer. I do this on both a Raspberry 3 and a Raspberry 1+ on which I run Pi-hole. In both cases it is very stable. What isn't so stable is MC which crashes regularly after using JRemote.

I was more concerned about stability with MC, not stability in general.  It sounds like you're having instability with MC which may or may not be related to the VNC solution.  With at least one VNC server, MC was just constantly crashing after the changes in MC22, so you might want to try x11vnc just to rule out the VNC server as a source of instability.
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Raspberry Pi with NAS (Synology) set-up
« Reply #13 on: September 22, 2017, 08:26:46 am »

I wrote some notes to myself to remind me how to set up MC23 on a headless Raspberry using MWillems's excellent guide. I added some other details I found to be useful and the necessary information to make it work with a Synology NAS. I hope they might be of some use to others as well.

Headless Raspberry SETUP MC23 on Mac

Use Etcher (https://etcher.io/) to “burn” Raspberry Stretch image (https://www.raspberrypi.org/downloads/raspbian/) to SD card (I use 8 rather than 16 Gb since it keeps the backups smaller)

Add “ssh” file (may be empty; no extension) to root dir of BOOT SD on Mac (this forces raspberry to enable ssh)

After boot ssh into Raspberry from Mac terminal: ssh pi@192.168.X.XX
   [If necessary delete the key that is preventing access with: ssh-keygen -R 192.168.X.XX]

Run from Terminal in Raspberry: sudo raspi-config and go to “Interfacing options” and enable VNC

Edit fstab to gain access to NAS (Synology in my case) music folder:

sudo nano /etc/fstab
add the following line at the end:
192.168.X.XX:/volume1/music /home/pi/Music nfs defaults,noatime,x-systemd.automount.nolock 0 0

To install MC23 follow: https://yabb.jriver.com/interact/index.php/topic,111505.0.html Use MWillems’s  New Method to set up headless [I have disabled the x11vnc.service setup part because the built in VNC options with VNC Viewer on the Mac/Windows offers more security and flexibility. If you did set up x11vnc.service, as I did, and want to disable it, run in a Terminal window (without quotation marks) “sudo systemctl disable x11vnc.service” This will remove the symbolic link that indicated that the service should be started automatically]

Remember also to:
— setup the audio properly in MC using Options > Audio
— pre-build missing thumbnails in Tree & View > Thumbnails (otherwise JRemote might crash)
— set Thumbnails creation to Low in Tree & View > Thumbnails
— set MC to backup to external USB stick (Options > File locations) because if you leazve it set to the default it will back up to sd card and if that card becomes unreadable (as happened to me) your MC backup is gone too.
— install the licence
— set MC to audio only (View > Audio only) if you prefer a slightly less cluttered view
Logged

franswilco

  • World Citizen
  • ***
  • Posts: 110

Is this solution bit pefect?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...

If you're using one of the hw: or front: devices for (ALSA) output, then yes. If you're using Pulse, no.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362

Thanks so much for taking the time to write up the guide. Well done. Saved me a bunch of time.

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

I already own a windows license. Can I install a 30 day linux trial license on my PI? Also, can the arm version use a hifiberry DAC?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...

Yes, you can run MC on the Pi with a 30 day trial.

But, keep in mind, you can't use the Windows license on Linux (unless you have a master license).
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

Thanks, mainly I just want to see if I'm capable of installing it before upgrading to a masters license.

can the arm version use a hifiberry DAC?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Logged

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

perhaps I can save somebody a little grief. I am in no way a linux expert or even beginner.

Added to /boot/config.txt
Code: [Select]
# Enable audio (loads snd_bcm2835)
#dtparam=audio=on    MAKE SURE THIS IS COMMENTED OUT

#HiFIBerry
dtparm=i2c1=on
dtparm=audio=off
dtparm=i2c1=on
dtoverlay=hifiberry-dacplus

Create file /etc/asound.conf  with the following contents
Code: [Select]
pcm.!default {
 type hw card 0
}
ctl.!default {
 type hw card 0
}


 
Logged

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

When I click "Upgrade to masters license" from a registered windows install it says $36.98. Is that correct price and is going through mediacenter the best way to upgrade?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?

You have mail.
Logged

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

JimH You have a PM.
Logged

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

OK, I got running with a master license installed. In a quest to get album artist art working smoothly I ended up with a hybrid kind of configuration. I installed raspbian stretch lite  then xFce on top of that. Theater mode is dicey but I'm content with display mode showing playing now the cover art.

I'm not a linux guy, ideally I would like jriver to start in the console on power on. I have linux doing a autologon into xFce already, I'm just missing the boat on how to bring up the jriver app within the console.

Once its running I'm using Panel to control it and ssh to shut it down from a chrome book.

any help would be appreciated, I know very little about linux.
Logged

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

nevermind I figured it out with autostart
Logged

kolia

  • World Citizen
  • ***
  • Posts: 124

@astropupy. Could you tell us how you managed to start MC automatically? Thanks
Logged

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

Sure, basically I followed these instructions

https://neverbenever.wordpress.com/2015/02/11/how-to-autostart-a-program-in-raspberry-pi-or-linux/

My autologin user is astropuppy so pi is replaced with astropuppy in the directory structure,

[Desktop Entry]
Name=mediacenter23
Exec=mediacenter23
Type=application

From there I set jriver options to display mode when a song is played.
I am not a linux person, there may be better ways to do this.
Logged

kolia

  • World Citizen
  • ***
  • Posts: 124

Sure, basically I followed these instructions

https://neverbenever.wordpress.com/2015/02/11/how-to-autostart-a-program-in-raspberry-pi-or-linux/

My autologin user is astropuppy so pi is replaced with astropuppy in the directory structure,

[Desktop Entry]
Name=mediacenter23
Exec=mediacenter23
Type=application

From there I set jriver options to display mode when a song is played.

Thanks for the tip
Quote
I am not a linux person, there may be better ways to do this.
Neither do I ;)

Any particular reason why you choose xFce?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...

Depending on the desktop environment you're using, it *should* have some sort of "startup applications" feature. I do know GNOME (via GNOME Tweak Utility) and Cinnamon has such features.

Xfce is probably being used because it's pretty lightweight and fast, perfect for a Pi setup.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

astropuppy

  • Junior Woodchuck
  • **
  • Posts: 56

Any particular reason why you choose xFce?

Long story, but basically xFce worked with auto-login and the others: pixel and lxde did not. My PI's single purpose is to run JRiver audio. Hence I go with the flow of what works easily.

Because I loaded xFce on top of Stretch lite my xFce is very basic, no browser etc. The only extra it has is the command window. I used raspi-config to setup auto login and auto start to fire up JRiver. Linux is still a very mysterious thing to me, I'm just bumping along, enjoying the music along the way.
Logged

kolia

  • World Citizen
  • ***
  • Posts: 124

Thanks Awesome Donkey and astropuppy, I'll stick to what you experienced and that sounds good. As a matter of fact my RPi will act as client only (with Hifiberry Digi+ Pro connected to external DAC). I'm using JRiver in audio only mode, and at last I will get rid of the PC in the audio/video room.

Logged

kolia

  • World Citizen
  • ***
  • Posts: 124

Thanks to all the information in this thread and thanks to the awesome work that has been achieved by JRiver team in order to get a linux version, I must say that I'm pretty impressed by MC23 running as a client to a library server. I installed Stretch lite and Xcfe4 https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691. As said in another post I have a Hifiberrry Pro + powered by a low noise power supply, connected to an external DAC (everything is upsampled to 24 bits/192KHz did not try yet SoX)
VNC is setup as well. MC starts automatically as soon as the desktop is running. However I'd like to get the session autologged. Maybe I did not search correctly, but I did not find how to achieve this.
Logged

elo

  • Junior Woodchuck
  • **
  • Posts: 87

First thanks to every one that has contributed to the Linux version and this specific implementation on the Raspberry Pi.

I have MC on several W10 machines in my home and two external using a FreeNas File Server as source of my media material. Today I installed the Unix version on a Raspberry Pi 3 running the Raspian OS installed as recommended in this thread. Previously I have installed Kodi (17) on the same HW with good results.

The install went without trouble and mounting my library likewise. Playing music is OK but playing video is stuttering and unresponsive. (I am trying to stream the original material at full quality). 

So Kolia how did your installation turn out?
Anyone that have any suggestions/opinions on weather the slow speed can be improved and if so, how?
Logged

kolia

  • World Citizen
  • ***
  • Posts: 124

Well I'm using MC in audio only mode. I'm using Plex on Nvidia Shield Pro for video.
Logged

elo

  • Junior Woodchuck
  • **
  • Posts: 87

Thanks... I have not actually tried to find out if the Video Play is released. It seems to work though. I have forced a re-coding at the server to 470p, but the same stuttering. Since PLEX works I guess that the processing power is sufficient and that video playback is not finished yet?

Any comments from someone else? 

Post Note: From the release notes it seems the functionality should work OK .. So either my set up is buggy or the HW is not fast enough

Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

Thanks... I have not actually tried to find out if the Video Play is released. It seems to work though. I have forced a re-coding at the server to 470p, but the same stuttering. Since PLEX works I guess that the processing power is sufficient and that video playback is not finished yet?

Any comments from someone else? 

Post Note: From the release notes it seems the functionality should work OK .. So either my set up is buggy or the HW is not fast enough

Video isn't supported on the Pi in MC as far as I know.  That's included in the list of things that don't work at the top of this thread.  It works for the linux version more generally, but to my knowledge it is neither working nor supported on the Pi or the armhf platform generally. 
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291

Hi guys

Thanks @mwillems for the effort to maintain up-to-date info!  It makes it so much easier for us guys that dont play with linux everyday. :)

I did an in-place upgrade of Wheezy to Jessie stretch (which took forever to run) but it did finish.  I had a backup and was fully prepared (reluctantly) to have to rebuild my customisations for my Pi Brick from scratch. Thankfully it wasn't needed.

I followed your new instructions for X11VNC and have replaced my old XRDP remote desktop setup successfully with VNC.  I'm just stress testing the upgrade with MC23 with a mix of different files and formats from MP3 to different FLAC and DSD DFF files. So far so good.

I was running MC21 for the last couple years on the Pi and was dreading the upgrade because of all my customisations for my Pi player.

Thankfully all my customisations came through unscathed too! 
If all goes well the Pi MC23 will become a permanent fixture in my car again to replace all the other things I've been playing with to get quality audio in the car again (without resorting to bluetooth or chromecast)


One thing I did note - it's imperative to force a thumbnail build on the Pi before you start using JRemote.  With only 3k or so files in the library, MC23 would crash whenever I loaded up JRemote and started navigating the library.
After building the thumbnails all good so far. :)

Thanks again!
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325

Is it possible to set thread priorities on a Pi? Can't seem to get it to work as described in the main thread: https://yabb.jriver.com/interact/index.php/topic,111373.msg769735.html#msg769735
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871

Is it possible to set thread priorities on a Pi? Can't seem to get it to work as described in the main thread: https://yabb.jriver.com/interact/index.php/topic,111373.msg769735.html#msg769735
Yes, this works. It's the default setup on our IdPi's.
Did you reboot after doing the setup?
Are you running MC as the user (or group) for which you setup the thread priorities?
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325

Yes, this works. It's the default setup on our IdPi's.
Did you reboot after doing the setup?
Are you running MC as the user (or group) for which you setup the thread priorities?

Thanks Bob....

User pi is in the audio group:

pi@raspberrypi:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi


Here is the end of the limits.conf file:
# End of file

@audio           -       rtprio          100


I followed the instructions verbatim and rebooted several times. I didn't get any errors. My other pc linux install priorities work fine, just not the pi (3). Currently I am getting the following on the pi3:

pi@raspberrypi:~ $ ps -T -eo pid,tid,class,rtprio,ni,pri,comm | grep mediacenter23
 1428  1428 TS       -   0  19 mediacenter23
 1428  1775 TS       -   0  19 mediacenter23
 1428  1779 TS       -   0  19 mediacenter23
 1428  1785 TS       -   0  19 mediacenter23
 1428 25842 TS       -   0  19 mediacenter23
pi@raspberrypi:~ $


Any help is appreciated.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871

Thanks Bob....

User pi is in the audio group:

pi@raspberrypi:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi


Here is the end of the limits.conf file:
# End of file

@audio           -       rtprio          100


I followed the instructions verbatim and rebooted several times. I didn't get any errors. My other pc linux install priorities work fine, just not the pi (3). Currently I am getting the following on the pi3:

pi@raspberrypi:~ $ ps -T -eo pid,tid,class,rtprio,ni,pri,comm | grep mediacenter23
 1428  1428 TS       -   0  19 mediacenter23
 1428  1775 TS       -   0  19 mediacenter23
 1428  1779 TS       -   0  19 mediacenter23
 1428  1785 TS       -   0  19 mediacenter23
 1428 25842 TS       -   0  19 mediacenter23
pi@raspberrypi:~ $


Any help is appreciated.
Seems fine to me
I am assuming you are running a fairly current build of MC 23?
You might try change the @audio in /etc/security/limits.conf to pi instead (if you are running MC as the pi user).
Maybe look for errors in limits.conf?
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325

Seems fine to me
I am assuming you are running a fairly current build of MC 23?
You might try change the @audio in /etc/security/limits.conf to pi instead (if you are running MC as the pi user).
Maybe look for errors in limits.conf?

Yes, running version .93.
I already tried changing @audio to @pi with the same results.
I don't see any errors in limits.conf, actually all lines are commented out other than what I added.
I will try reverting back to a previous version of MC.

EDIT: Reverted back to stable .80 with same results.

OBSERVATION: It's been a while since I did the initial MC install and can't remember how I achieved MC autostart. It may be related, now when I exit MC in Raspbian MC restarts automatically without reboot, cannot keep MC closed.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871

Yes, running version .93.
I already tried changing @audio to @pi with the same results.
I don't see any errors in limits.conf, actually all lines are commented out other than what I added.
I will try reverting back to a previous version of MC.

EDIT: Reverted back to stable .80 with same results.

OBSERVATION: It's been a while since I did the initial MC install and can't remember how I achieved MC autostart. It may be related, now when I exit MC in Raspbian MC restarts automatically without reboot, cannot keep MC closed.
I was thinking to try the pi without @ in front of it (pi user not group).

The autostart may be the issue. It could be autostarting before limits.conf is read.
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325

I was thinking to try the pi without @ in front of it (pi user not group).

The autostart may be the issue. It could be autostarting before limits.conf is read.

I was using the systemd service type startup here: https://yabb.jriver.com/interact/index.php/topic,111505.msg770591.html#msg770591 and it prevented priorities from working. Priorities works when starting MC normally. Now I am trying to figure out the easiest way to start MC on boot.

EDIT: Placed "@mediacenter23" in /home/pi/.config/lxsession/LXDE-pi/autostart, all is well now.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient

So the systemd autostart is preventing the thread priorities from working?  That is indeed very odd.  I'll need to tinker and see if I can figure out why that should be; the systemd unit definitely waits until after the display manager loads; you'd think the limits would be established by then.

Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871

So the systemd autostart is preventing the thread priorities from working?  That is indeed very odd.  I'll need to tinker and see if I can figure out why that should be; the systemd unit definitely waits until after the display manager loads; you'd think the limits would be established by then.
I'm guessing that the limits.conf per user/group settings might require getting past some user login code.
Logged

erviv

  • World Citizen
  • ***
  • Posts: 220

I was thinking to try the pi without @ in front of it (pi user not group).

The autostart may be the issue. It could be autostarting before limits.conf is read.

Thanks Bob and Zhillsguy.  changing @audio to pi in the limits.conf worked for me. I now get the RR 99 part, which I wasn’t getting with @audio in the etc/security/limits.conf file.
I hope this fixes my random micro freezes.
Logged
MacBook Pro i5 2.3Ghz 8 GB (early 2011) 1Tb SSD; 3 Raspberry pi’s 4 and 2@ 3B (o/s: Buster).

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325

I just installed Lubuntu for the Pi available here:

https://ubuntu-pi-flavour-maker.org/download/

Followed the normal MC install instructions for Debian/Ubuntu, all went flawlessly. Seems pretty responsive as well, definitely a usable alternative to Raspbian.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.
Pages: [1] 2   Go Up