Ability to specify encoder/user agent string

JGM

New Member
Hi everyone, I was researching live streaming and found this great project, I'm testing it to stream into a crtmpserver install I did (https://aur.archlinux.org/packages/crtmpserver-git) on my archlinux and it works very nice. crtmpserver has the ability to set authentication but it also requires to set a user agent. Looking at OBS I saw there was no way to set the user agent and that it is hard coded in the software https://github.com/jp9000/obs-studio/blob/master/plugins/obs-outputs/rtmp-stream.c#L576

The issue is that every-time that the obs version changes if using crtmpserver you have to set a new user agent which isn't optimal (and it is worst if running a fresh install of obs from github like i'm doing). If the user agent sent is not registered on the crtmpserver configuration it will not accept the connection. So, is there the possibility of adding another input text box on the Stream tab in order to customize the user agent? I was trying to add it my self and send a pull request but since I didn't see any ready to use project files for qt-creator or any other known IDE I desisted.

By the way crtmpserver is a great and lightweight piece of software compared to other java solutions, etc... I tested it with a flash video player with rtmp support that I developed and it works wonderfully https://github.com/jegoyalu/jarisplayer and OBS really eases the task of choosing what to stream and how to do it, again, great software!
 

Osiris

Active Member
Kind of weird that crtmpserver does authentication based on user agent.
Maybe try nginx + rtmp module?
 

JGM

New Member
Other software like wirecast lets you modify the user agent, is there a reason for not supporting such functionality on OBS?
 

JGM

New Member
I see, I will try to implement it my self when I get some time and then send a pull request. Thanks for your help, this is a nice community!
 

dodgepong

Administrator
Community Helper
I tried crtmpserver and switched to nginx + rtmp and never looked back. I just found crtmpserver to be a lot jankier.
 

JGM

New Member
the only issue I see with nginx rtmp module is lack of support for streaming authentication, it seems to only support restriction by IP which isn't flexible enough.
 

j3355310

New Member
My way is using Memory Patch ( for mac I use Bit Slicer, or Cheat Engine for Windows ) to search and replace the 8bit string "Lavf/5...." to "Mozilla/5.0", the problem is that I need to run patch every time when I start OBS or when I need it.

But that is the easy and the fast way. No crazy isntaling and compiling no configuration, no head break.

Enjoy

ps.. Or Just patch "libavformat.56" using hex-editor, inside the "OBS.app/Contents/resources/bin/" where is "user-agent" like that:


Screen Shot 2016-01-30 at 02.38.26.png


Here is modifed "libavformat.56" using "Mozilla/5.0( "
 

Attachments

  • libavformat.56.dylib.zip
    773 KB · Views: 159
Last edited:
Top