Author Topic: Linux RetroFE as HTPC frontend - No sound or video playback [SOLVED]  (Read 830 times)

Sleeps5

  • Newbie
  • *
  • Posts: 7
  • Karma: +4/-0
    • View Profile
I have installed ubuntu server, retrofe, kodi and retroarch so that my livingroom HTPC will boot directly into retrofe then lauch kodi or games.

I followed this guide for the ubuntu installation:
https://wintermute0110.github.io/LKESG/Linux-installation-and-configuration

this guide to install retrofe
https://github.com/phulshof/RetroFE#compiling-and-installing-on-ubuntu-linux-1004-or-newer

this guide to install retroarch
https://www.retroarch.com/index.php?page=linux-instructions

this guide to install kodi
https://wintermute0110.github.io/LKESG/Kodi
*** First adjustment, i launched retrofe at start instead of kodi

I put these two "roms" in the Main folder in RetroFE

Kodi.sh
#!/bin/sh
/usr/bin/kodi-standalone

Retrotarch.sh
#!/bin/sh
/usr/bin/retroarch

The default layout wouldn't launch, but I put in the 'RetroSpin - Static 16x9' layout and it booted up and i can launch Kodi and Retroarch from RetroFE.


##### THE PROBLEM #####
I get no sound or video in RetroFE, probably similar cause of not being able to start the default layout.
I am getting no errors in the log now, but i get two notices when i manually start RetroFE

error: XDG_RUNTIME_DIR not set in the environment
and
ALSA lib pcm.c:8568:(snd_pcm_recover) underrun occurred


kodi and retroarch work just fine with the bash scripts (after i changed outputs to the nvidia card)
Any ideas?
« Last Edit: September 12, 2023, 04:07:12 AM by Sleeps5 »

Sleeps5

  • Newbie
  • *
  • Posts: 7
  • Karma: +4/-0
    • View Profile
Re: Replacing linux HTPC from kodi to retrofe
« Reply #1 on: September 02, 2023, 08:38:04 PM »
changed the /etc/asound.conf to default to the nvidia card 1 instead of card 0 (onboard sound/hdmi)

pcm.!default {
    type hw
    card 1
}
 (
ctl.!default {
    type hw
    card 1
}

And now i'm getting
[WARNING] [SDL] Audio initialize failed: ALSA: Couldn't open audio device: No such file or directory
in the retrofe log.txt file.

still no sound in the layouts (have to press keys to get the default layout to come up but it does now too).

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Linux RetroFE as HTPC frontend - No sound or video playback
« Reply #2 on: September 03, 2023, 12:16:20 PM »
Sounds to me like you're missing one or more of the gstreamer plugins. The intro is a video after all, so if it's not showing (neither sound nor video), then it's likely a missing set of codecs. The ALSA warning does sound like a soundcard issue though; do you have sound anywhere else in the system? Can you play the videos outside of RetroFE?

Sleeps5

  • Newbie
  • *
  • Posts: 7
  • Karma: +4/-0
    • View Profile
Re: Linux RetroFE as HTPC frontend - No sound or video playback
« Reply #3 on: September 03, 2023, 07:34:09 PM »
Working now.  Went scorched earth and installed them all (3 were included on the original install tutorial):
https://gstreamer.freedesktop.org/documentation/installing/on-linux.html#install-gstreamer-on-ubuntu-or-debian
except for pulseaudio.  don't have that installed...
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-bad1.0-dev
gstreamer1.0-plugins-base gstreamer1.0-plugins-good
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
gstreamer1.0-libav gstreamer1.0-tools
gstreamer1.0-x gstreamer1.0-alsa
gstreamer1.0-gl gstreamer1.0-gtk3
gstreamer1.0-qt5 gstreamer1.0-pulseaudio

I also had to add the specific device on the /etc/asound.conf file

pcm.!default {
    type hw
    card 1
    device 3
}

ctl.!default {
    type hw
    card 1
    device 3
}

So i'm going to remove all those that i installed and go 1 by 1 to see which one it was.  probably a mix of the alsa one and something else.

But now I have everything installed and running off a 30GB usb drive (12G used, 16G avail).  I have media stored on a seperate server, mounting everything via nfs.  I've played blueray rips from server via kodi and some snes launched from retrofe.

reason for this approach:  I've tried batocera and retropie since they boot into kodi, but the freedom provided by your system pointing to my own derived storage and folder system has always been a major usage point.  I had tried to launch retrofe from kodi in the past, but this feels better.

now to determine how i handle streaming services, through a web page launcher in retrofe or plugins via kodi.  (wife will want to use the mce remote).

thank you for pointing me in the right direction Pieter!

i will also probably put this permanently on another hard drive.  would there be any benefit to writing a step by step to accomplish this?  anything to help people get away from windows...

Sleeps5

  • Newbie
  • *
  • Posts: 7
  • Karma: +4/-0
    • View Profile
Re: Linux RetroFE as HTPC frontend - No sound or video playback
« Reply #4 on: September 09, 2023, 04:12:40 PM »
so i narrowed down to these two additional installations to solve the problem of playing sound and video with gstreamer
gstreamer1.0-plugins-good <-- gets video
gstreamer1.0-alsa <--gets sound

if you are not using pulseaudio and run into similar issues, i image you would need this instead.
gstreamer1.0-pulseaudio