Replacing librtmp.so.0 with custom version

Assuming that OSMC is similar to Raspbmc in this regard, I’d like to replace the stock version of librtmp.so.0 with a custom version per:

http://kodi.wiki/view/HOW-TO:Update_librtmp

In Raspbmc this file was located somewhere within /opt/xbmc-bcm/… (I can’t recall the exact path).

When I run ‘sudo find / | grep librtmp.so.0’ I get zero hits in OSMC.

Can someone point me to the file I should be replacing with the custom librtmp.so.0? I see some librtmp files in /lib but I’m not sure which (if any) of these to replace.

Thanks!

1 Like

Probably here /usr/lib/librtmp.so

OK, thanks. I’ll have to refresh my memory on how library files and associated linking works, given that there doesn’t appear to be a file with the exact name librtmp.so.0 that I can simply replace.

If you only need it for a certain program, you could also use the LD_PRELOAD variable before starting it.

Hi, just to add that on osmc librtmp.so.0 is now called librtmp.so.1.

However there are two of them, original files;

/usr/lib/arm-linux-gnueabihf/librtmp.so.1 → Timestamp Nov 11 16:24, Size : 79K
/usr/lib/librtmp.so.1 → Timestamp : Mar 9 23:13, Size : 108K

And /usr/lib/librtmp.so is symlinked to /usr/lib/librtmp.so.1

On the Kodi forums one of the guys that compiled it said to replace the one under /usr/lib/arm-linux-gnueabihf/

Is that correct or do I just replace /usr/lib/librtmp.so.1 or both?

Redpenguin has updated his compiled versions as stated here → librtmp - Help Thread

Wraithdu has compiled a version here → librtmp - Help Thread

Apparently Redpenguin’s is bigger as its statically linked so will work on Openelec as well.

1 Like

I’m a bit hesitant to replace the existing librtmp.so.1 with a custom librtmp.so.0 from redpenguin.

In my use so far I haven’t had any issues with the default OSMC version so I might just leave it as is for now.

Perhaps @sam_nazarko could comment on the version of librtmp included with OSMC (is it plain vanilla like it was in Raspbmc?) and the safety (or otherwise) of replacing this file with a different build per the Kodi wiki instructions?

1 Like

Boa tarde.
Voce conseguiu atualizar a librtmp?
Poderia me ensinar?
Obrigado!

I know this is a old thread but I’d also like to know for definite which Librtmp.so.1 to replace.
Is it the one in the
usr/lib (which I would assume)
Or the
/usr/lib/arm-linux-gnueabihf

It’s pretty easy with osmc to download and install all the dependencies and tools to clone and compile a librtmp with KSVs latest patches. I’ve recently done it myself as there was recent patches. I replaced both files without issues however it would be nice to clear it up.
Regards.

Please link me to the new patches, or consider updating librtmp package in OSMC’s Gitahub repository

Sam

The latest custom patches I use are found here:

http://stream-recorder.com/forum/customized-rtmpdump-binaries-patch-file-t16103.html?s=99cdfbb8b7d543747157601ef8269e12&

however they are custom patches appiled by the users patch.diff file. The xbmc foundation were happy to use these but nobody wanted to commit,as it appears that there is grey area regarding the legality of some of the included patches in a few select countries. To be honest I’m not really sure if they are legal or not it seems more of a view that OE have taken.

This is the main reason for users doing it themselves I suppose nobody wants to take the chance.

We already include such a patch. It is possible that ours is just out of date.

I saw in the github you have a patch “all-000-patch” I guessed it was the same, a series of patches like the ones I mentioned above, but I’m fairly new to this and didn’t want to just assume. I’m happy to have a go at setting up github account and comparing the two files then I can hopefully make some commits. (Excuse the terminology if I’m wrong)

Although in fairness the librtmp with Osmc is OK for most users, I had a issue with a different distro not playing files from the iplayer in the early part of last year.

@popcornmix has pointed me to an updated patch which matches your link. I’ll build it and have it included in the next OSMC update

Sam

1 Like

Thanks Sam it’s appreciated !!

Hi,

its my first post here i hope i can help with my answer

OSMC username and pass used here is…

Name: osmc
Pass: osmc

First of all i updated librtmp in my OSMC RaspberryPI and its working fine.

RaspberryPI2 with OSMC Kodi 15.2 (compiled : Nov 22 2015)

  • 1.) Download this version librtmp

  • 2.) Send the file to the RaspberryPI
    scp /home/YOUR_USER/Downloads/librtmp.so.1 osmc@192.168.0.12:/home/osmc

  • 3.) SSH to your RaspberryPI
    ssh osmc@192.168.0.12

  • 4.) Copy the file you just send to RaspberryPI from the user folder, to the proper location you have to use SUDO for this step.

sudo cp /home/osmc/librtmp.so.1 /usr/lib/arm-linux-gnueabihf/

  • 5.) Go to the folder

cd /usr/lib/arm-linux-gnueabihf/

  • 6.) Backup the existing version of librtmp ,all this steps require sudo
    sudo mv librtmp.so.0 librtmp_BACKUP

  • 7.) Rename the new file to the proper name
    sudo mv librtmp.so.1 librtmp.so.0 <—It seems that this step is not necessary anymore librtmp.so.1 will work nicely

Ok we have replaced the old librtmp with the new one ,and we have made an backup of the old one (just in case)after all this steps,we have to reboot RaspberryPI

  • 8.) Reboot RaspberryPI

reboot

  • 9.) I recommend this last step because every time the OSMC system gets updated, librtmp gets replaced and you have to do the hole work again.
    In OSMC go to Programms and press enter, select "My OSMC " select the Updates section,select
    “Schedule " and where it says " How often do you want to check for updates?” select “Never” confirm with “OK”

10.) The End have fun

You could just SSH in and wget libtrmp.download.link and save yourself the SCP etc…

Otherwise, thanks for the contribution.

Yes thats true but i wanted to show the steps i did ,its a good way to show the use of scp which you often need when you are working with RaspberryPI,but you are right anyway

The new RTMP lib is already in. No need for these steps

Im sorry to say its not true, after the new update obviously my librtmp was replaced and it did not work ,i had to do the steps i described again,and its now working fine again.
The best way is to compile the librtmp with all patches like described here
Customized rtmpdump binaries with patch file all credits go to KSV

Edit: Question already answered earlier in thread - sorry.