Change mjpg-streamer settings in the raspi image- add user/password


I'm using the repetier-server raspi image and I have the webcam externally available.
Problem is I can't find way to alter the mjpg-streamer startup params as I'd like to enable to option to ask for username/password.

Is there a file where that is stored and can be edited? 
Previously I had my own custom raspi image and I could easily make this change.



  • You need to provide user and password in the url. If webcam uses digest authentication (default popup with credentials) you need a link like this


    server will detect this and run authentication in that case.
  • Thanks for the reply.
    I think that is not exactly it, that would be in case the webcam had some authentication method built-in.

    Here I don't have any authentication method in the webcam, so I want o add it at the mjpg-streamer level.
    The output_http plugin provides that option:

    mjpg_streamer [input plugin options] -o ' [options]'
    The following parameters can be passed to this plugin:
    [-w | --www ]...........: folder that contains webpages in 
                              flat hierarchy (no subfolders)
    [-p | --port ]..........: TCP port for this HTTP server
    [-c | --credentials ]...: ask for "username:password" on connect
    [-n | --nocommands ]....: disable execution of commands
    So what I need is a way to start the mjpg-streamer service passing the --credentials param to the output_htt plugin.
    But in the server the only options I have is to set resolution and framerate.
  • Ok, you want it on start of mjpg streamer. Thought you wanted auth for an other webcam with password.

    You need to edit the start script of mjpg_streamer. Check /usr/local/RepetierSetup/bin there is teh start script for streamer and you can add your params there.
  • Perfect thank you.
    Just looked into it and have it working now.

    PS: The code in github is quite old right? Not worth sending a pull request for it as I'm exposing this params in the UI.
  • Yes, we are closed source for years so no updates on old server on github.
Sign In or Register to comment.