Update / Reinstall - RTMP / librtmp

Third time lucky, hopefully i can make it past the overly zealous sensors this time.

I am trying to follow this guide on updating the RTMP or librtmp:

Raspberry Pi3
OSMC (updated to latest version)

Add-ons > VideoPlayer InputStream
InputStream Adaptive
RTMP Input

Hopefully my question will avoid the inevitable ‘please supply full logs’ auto-response!


Yes, and? Is there a question here?


Unfortunately you won’t be able to grab compiled versions of libRTMP and expect them to work on OSMC, as they’ve been built for another platform.

I understand the need to update libRTMP. OSMC does however include the necessary patches to play a wide variety of content, and actively tracks changes. Unfortunately there are no further improvements to libRTMP to be made at this time.

If you are aware of any changes that should be included, do let us know. We would need a link to the source however to be able to build and include it in OSMC.



1 Like

Thanks for the response.
I can’t say for certain that libRTMP is my problem, although all evidence is pointing to that element being corrupted/not working correctly.

I was trying to avoid a fresh full install but looks like that is my next option.
Unfortunately when you get to this point its just as easy to try another platform rather than stick with the one that might not be working.

As written before librtmp is part of Kodi/OSMC if you have the feeling your installation has become broken you can reinstall with
sudo systemctl stop mediacenter
sudo apt-get install --reinstall rbp2-mediacenter-osmc
sudo apt-get install --reinstall armv7-librtmp-osmc
sudo systemctl start mediacenter

1 Like

Thanks for that. Exactly what i was looking for.

Unfortunately didn’t solve the issue but now i can firmly cross this from my fix list.

I’m from the “why not give it a go” school. I tend to learn a lot that way.

There is at least one librtmp.so.1 file on that link that’s compiled for ARM in the folder RPi0-RPi1-RPi2-RPi3-OPENELEC_ARM. You’ll need to make a backup copy of the existing librtmp.so.1 and then replace it with the new version. The new one doesn’t seem to have any unresolvable references:

osmc@osmc:~$ ldd -r librtmp.so.1 
	linux-vdso.so.1 (0x7ef96000)
	/usr/lib/libarmmem.so (0x76de5000)
	libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76db9000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76d45000)
	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76d1c000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76c2c000)
	/lib/ld-linux-armhf.so.3 (0x54afb000)

The problem is that I can see two librtmp.so.1 files on OSMC, so which should be overwritten? One is in /usr/lib, which is the file in the armv7-librtmp-osmc package, and the other one is in /usr/lib/arm-linux-gnueabihf. Examination of /etc/ld.so.conf.d suggests that the one in /usr/lib/arm-linux-gnueabihf will be chosen first, over the one from the armv7-librtmp-osmc package.

Using sudo, you’d need to rename the librtmp.so.1 file in /usr/lib/arm-linux-gnueabihf to something else and copy the new one to the directory and then run sudo ldconfig. If it doesn’t work first time, reboot. It’s only one file so you can back everything out if you’re ultimately unsuccessful.

Update. After looking around Kodi, it seems that it has its own librtmp library, so now we have three to choose from. AFAICT the “RTMP Input” addon is defined in /usr/share/kodi/addons/inputstream.rtmp/addon.xml. This in turn points to the shared library /usr/lib/kodi/addons/inputstream.rtmp/inputstream.rtmp.so.1.0.4. So perhaps this is the correct one. I don’t know enough about the inner workings of Kodi to be of much help here.

Love this kind of thinking!
I’ve just bought a couple more 16gb micro SD cards so i can start to experiment.
Will create a copy of the img and go from there. Thanks for this.

I know previously ( before the inputstream.rtmp) you inserted a patch.diff file which patched rtmpdump with various patches that originated from KSV, these allowed certain streams that required redirects to be played via kodi/osmc.

With inputstream.rtmp it appears that the librtmp binary is now located here and is built using nottspiff github using kodi rtmpdump toolchain.

Is there any option to run your the old patch file before the build process ? Not asking anyobe to do this but just trying to figure out how the binary now works.