Hi, I've installed successfully my mjpg-streamer server and it's working fine right now. However, I'm using the default web page and I want to have an authentication for some protection in case i'll access it from public. How can I apply the authentication? Thanks, Puma
mjpg-streamer web page authentication
Hello, You just have to add option to output_http module: -o "output_http.so -w ./www -c UsErNaMe:SeCrEt"
Hi Vladimir, I tried to add the option (see below command line), but didn't make it through wherein the webpage still doesn't have an authentication. Please advise. [root@FriendlyARM mjpg-streamer]# ./start_uvc_yuv.sh -o "output_http.so -w ./www -c UsErNaMe:SeCrEt" MJPG Streamer Version.: 2.0 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 640 x 480 i: Frames Per Second.: 5 i: Format............: YUV i: JPEG Quality......: 80 format asked unavailable get width 352 height 288 o: www-folder-path...: ./www/ o: HTTP TCP port.....: 8080 o: username:password.: disabled o: commands..........: enabled Thanks, Puma
Hello, you are trying to specify parameters to shell script, instead you have to modify it in a text editor, or launch mjpg_streamer manually: LD_LIBRARY_PATH="$(pwd)" ./mjpg_streamer -o "output_http.so -w ./www -c UsErNaMe:SeCrEt" -i "input_uvc.so -y"
Hi Vladimir, I did a manual launch and the webpage displayed an authentication for username and password, but it didn't accept my account. I also tried the root, but didn't make through. BTW, is the username and password which I created in mini2440? Should be right? What is the default username and password (if any)? Please advise. Thanks, Puma
Hello, when you launch mjpg_streamer with password enabled, you should see something like this: o: www-folder-path...: ./www/ o: HTTP TCP port.....: 8080 o: username:password.: UsErNaMe:SeCrEt o: commands..........: enabled Navigating to the webpabge of the mjpg_streamer then shows the dialog to enter username and password. Entering UsErNaMe as username and SeCrEt then works. So, if you want to set custom username and password - replace UsErNaMe:SeCrEt in the command line with something else.
Hi Vladimir, It's great! The authentication is working well now with my own username and password settings. One thing I suggest to add to automate the mjpg-streamer is to have it activated during booting in the mini2440. I mean, there is no need to type and re-type the syntax (e.g.LD_LIBRARY_PATH="$(pwd)" ./mjpg_streamer -o "output_http.so -w ./www -c UsErNaMe:SeCrEt" -i "input_uvc.so -y") every time rebooting process is being made in the mini2440. Or perhaps you have already done that in your mini2440. If so, would you mind to share it or give me some ideas on how to do it. I remember, in other linux system (e.g., DSL) the way to do is to insert the syntax (e.g., /opt/lampp/lamp start) to file /opt/bootlocal.sh. Please advise. Thanks, Puma
Hi Vladimir, On my first attempt, I tried to add the line to /etc/init.d/rcS without the path as shown below inside the rcS file. rcS ----------------------------------------------------------------------- LD_LIBRARY_PATH="$(pwd)" ./mjpg_streamer -o "output_http.so -w ./www -c UsErNaMe:SeCrEt" -i "input_uvc.so -y" "&" ----------------------------------------------------------------------- I got an error message " /etc/init.d/rcS: line 69: ./mjpg_streamer: not found" during re-booting. On my second attempt, I put the path and add the line to /etc/init.d/rcS rcS ------------------------------------------------------------------------ /home/puma/mjpg-streamer LD_LIBRARY_PATH="$(pwd)" ./mjpg_streamer -o "output_http.so -w ./www -c UsErNaMe:SeCrEt" -i "input_uvc.so -y" "&" ------------------------------------------------------------------------ but this time a got a permission denied during booting. /etc/init.d/rcS: line 69: /home/puma/mjpg-streamer: Permission denied I gave permission chmod 777 to /home/puma/mjpg-streamer, but still a permission denied prompted. Power down/up the mini2440 didn't make it through. Please advise. Thanks, Puma
Hello, you have to specify the full paths to the mjpg-streamer, i,e add following line: LD_LIBRARY_PATH=/home/puma/ /home/puma/mjpg-streamer -o "output_http.so -w /home/puma/www -c UsErNaMe:SeCrEt" -i "input_uvc.so -y" &
Hi Vladimir, I haven't tried yet the latest info you provided as shown above since I was a bit busy with the other set-up on the 2 USB cam. Anyway, I'll get to you once I have done it probably tonight when I get back home. I have another query on the same topic, but this time the user can be able to change the password at the remote pc (client side) and not at the server side as I did it before. Please advise. Thanks, Puma
Hi Vladimir, I would like to know how can I change the password at the remote pc (client side) instead at the server side? Thanks, Puma
>how can I change the password at the remote pc you can : 1. login to mini2440 using telnet, and change the password 2. login to mini2440 using ssh, and change the password 3. take the source code of mjpg-streamer and add this functionality , it is here: http://code.google.com/p/mjpg-streamer-mini2440/source/checkout or here (original): http://sourceforge.net/projects/mjpg-streamer/develop
Hi Vladimir, Thanks to your reply and valuable information. I'll check that out and let you know the result. I guess I need to elaborate more on my query on changing the password at the remote pc. What I mean is, the client at the remote pc can able to change the password using "any internet browser" without login to the telnet/ssh. Assuming the client doesn't have any technical knowledge on the linux or windows system. Thanks, Puma