chrippa / python-librtmp

python-librtmp is a RTMP client library. It uses the implementation provided by librtmp via cffi.
BSD 2-Clause "Simplified" License
154 stars 33 forks source link

UNIX-flavored systems setup failing #10

Open distributedlock opened 10 years ago

chrippa commented 10 years ago

You need to install the librtmp-dev package via apt on Ubuntu. I think you can use homebrew to install librtmp/rtmpdump on OS X.

chrippa commented 10 years ago

No, this library is simply Python bindings to the C library librtmp which only supports AMF0 currently.

Edit: Actually, there is support to decode AMF3, but not encode.

swarve commented 10 years ago

I can't seem to find the librtmp package available on OS X. So same issue for me

kendog77 commented 10 years ago

Hi, I just spotted that this is similar to my problem too, I get the same error installing python-librtmp via different methods on Mac OS X: librtmp_ffi/__pycache__/_binding.c:186:14: fatal error: 'librtmp/rtmp.h' file not found

Would really love some help on this too!

Thanks all!

chrippa commented 10 years ago

You either don't have librtmp installed or it's in a location that is not looked at by default.

If you grab the source tree instead of using pip you can specify it manually like this:

python setup.py build_ext -I <headers location> -L <dynamic library location> install

"headers location" is the path where there is a "librtmp" directory containing .h files. "dynamic library location" is the path where "librtmp.dylib" file is located.

kendog77 commented 10 years ago

Thanks for the reply chrippa! Too busy to try it out so far, the above code seems to make sense once I know where librtmp is installed etc.

  1. How can I find out where librtmp is installed?

Also, I did set up PLEX (and Python) a while ago, but removed it as it seemed to be way too resource heavy when serving media to AppleTV etc (possibly something to do with SoundFlower(?) and kernel panics). Maybe some old bits weren't removed properly?

  1. How can I 'Start Fresh' and clear my whole system of all non-factory/aftermarket terminal/GitHub/Python/Homebrew/etc scripts/programs etc?

MASSIVE THANKS in advance!

kendog77 commented 10 years ago

Also, I recently installed this through Homebrew, hoping to get librtmp installed on my system, in seemed to finish the installation without problem.. But didn't seem to help any of my my attempts to install python-librtmp.. http://stackoverflow.com/questions/10855499/how-to-compile-ffmpeg-with-librtmp-in-macos

chrippa commented 10 years ago

How can I find out where librtmp is installed?

I'm not sure if this works on OS X but you might be able to run locate rtmp to search your filesystem. If that doesn't work, try looking around in /usr/local.

How can I 'Start Fresh' and clear my whole system of all non-factory/aftermarket terminal/GitHub/Python/Homebrew/etc scripts/programs etc?

I doubt there is a way to magically do this without erasing the rest of your OS.

Also, I recently installed this through Homebrew, hoping to get librtmp installed on my system, in seemed to finish the installation without problem.. But didn't seem to help any of my my attempts to install python-librtmp..

That installs ffmpeg, try installing rtmpdump/librtmp instead with brew install rtmpdump.

oxguy3 commented 8 years ago

FYI for Mac OS X users: To get librtmp, do brew install rtmpdump. Then do pip install python-librtmp. (Thanks to this StackOverflow answer for leading me to this solution.)