Re: MJPG stream is not working with kernel 3.18
There is no need for a kernel update. This is nothing wrong with the kernel and the bug report that had been filed for the kernel is now closed. Apps that are patched to properly work with the "bytesused" data behave correctly.
Re: MJPG stream is not working with kernel 3.18
Thanks for clarifying! So I'll have to wait for a future update of mjpg-streamer.
Re: MJPG stream is not working with kernel 3.18
Well, you can always apply the patch manually, it should be as easy as (raspberry) pie.
-
- Posts: 27
- Joined: Mon Dec 10, 2012 5:48 am
Re: MJPG stream is not working with kernel 3.18
Thanks! Another MJPG_streamer happy user! I received my Pi 2 and thought the issue had something to do with the new board. But was wrong. Back up and running!
Steve
Steve
Re: MJPG stream is not working with kernel 3.18
I also try to get this running on the Pi2, also tryed the fix, but get no picture/video in the browser. I use a usb webcam which works fine till now with gstreamer.
First I got the error:
when I start mjpg_streamer I get the following:
Any help is appreciated
First I got the error:
I could fix this with "export LD_LIBRARY_PATH=/usr/local/lib/"$ mjpg_streamer
MJPG Streamer Version: svn rev: 3:172M
ERROR: could not find output plugin output_http.so
Perhaps you want to adjust the search path with:
# export LD_LIBRARY_PATH=/path/to/plugin/folder
dlopen: output_http.so: cannot open shared object file: No such file or directory
when I start mjpg_streamer I get the following:
but the webpage at :8080 only shows:mjpg_streamer
MJPG Streamer Version: svn rev: 3:172M
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
The following brought me to the next step:404: Not Found!
Invalid input plugin number
Now I see in the browser the "MJPG-Streamer Demo Pages". But I get no picture or video. The full log is:$ /usr/local/bin/mjpg_streamer -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /usr/local/www"
Is there any hints what I could do? Do I need to specify anything else for the video source?$ /usr/local/bin/mjpg_streamer -i "/usr/local/lib/input_uvc.so" -o "/usr/local/lib/output_http.so -w /usr/local/www"
MJPG Streamer Version: svn rev: 3:172M
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Adding control for Pan (relative)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt (relative)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan/tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Focus (absolute)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
mapping control for Pan (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan/tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
o: www-folder-path...: /usr/local/www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
Any help is appreciated

Re: MJPG stream is not working with kernel 3.18
In case someone else also has problems, this worked for me:
http://sumerulabs.in/blog/2015/03/01/ru ... erry-pi-2/
http://sumerulabs.in/blog/2015/03/01/ru ... erry-pi-2/
-
- Posts: 1
- Joined: Fri Mar 13, 2015 10:02 am
Re: MJPG stream is not working with kernel 3.18
hello
First many thanks for this post.
When I call "patch -p0 <input_uvc_patch" always comes "File to patch:".
What file should I specify here?
First many thanks for this post.
When I call "patch -p0 <input_uvc_patch" always comes "File to patch:".
What file should I specify here?
-
- Posts: 4
- Joined: Fri Feb 20, 2015 7:53 pm
Re: MJPG stream is not working with kernel 3.18
yeah johnnya, those commands are not working out for it. are the commands made for the raspberry pi b+ module or raspberry pi 1
-
- Posts: 2
- Joined: Sun Mar 22, 2015 9:00 pm
Re: MJPG stream is not working with kernel 3.18
Hi, guys:
I have the raspberry pi 2 with the last raspbian update and i was able to make mjpeg-streamer work with the following parametres:
./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -y f 15 -r 640x480" -o "./output_http.so -n -w /usr/local/www". It seems that -y and -n are very important in order to make the application run properly.
I have the raspberry pi 2 with the last raspbian update and i was able to make mjpeg-streamer work with the following parametres:
./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -y f 15 -r 640x480" -o "./output_http.so -n -w /usr/local/www". It seems that -y and -n are very important in order to make the application run properly.
-
- Posts: 2
- Joined: Sun Mar 22, 2015 9:00 pm
Re: MJPG stream is not working with kernel 3.18
I'm sorry, the correct input is:
./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -n -y f 15 -r 640x480" -o "./output_http.so -n -w /usr/local/www". Now it runs smoothly in my pi 2.
./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -n -y f 15 -r 640x480" -o "./output_http.so -n -w /usr/local/www". Now it runs smoothly in my pi 2.
-
- Posts: 4
- Joined: Fri Feb 20, 2015 7:53 pm
Re: MJPG stream is not working with kernel 3.18
when i put both of those commands in i get a file not exists.
Re: MJPG stream is not working with kernel 3.18
Sadly, the patch did not work for me. Tried patching multiple repositories of mjpg-streamer, and there was no difference, it did not work. But I'm glad I was able to downgrade to version 3.12 all to you guys, so thanks! Been using for about 4 moths with yuyv mode, which limited me to 1 or 2 FPS, and was awful. Now I can see my turtles while I'am at work, in full 720p glory at about 20-25fps.
So thanks community, again!
So thanks community, again!
Re: MJPG stream is not working with kernel 3.18
I'm attempting this patch and getting the following error:
patching file plugins/input_uvc/input_uvc.c
Hunk #1 FAILED at 405.
Hunk #2 FAILED at 418.
2 out of 2 hunks FAILED -- saving rejects to file plugins/input_uvc/input_uvc.c.rej
patching file plugins/input_uvc/v4l2uvc.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Then the messages are so filled with double negatives I don't have any idea what they mean. I just accept the defaults over and over, hoping it didn't destroy anything :-/
patching file plugins/input_uvc/input_uvc.c
Hunk #1 FAILED at 405.
Hunk #2 FAILED at 418.
2 out of 2 hunks FAILED -- saving rejects to file plugins/input_uvc/input_uvc.c.rej
patching file plugins/input_uvc/v4l2uvc.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Then the messages are so filled with double negatives I don't have any idea what they mean. I just accept the defaults over and over, hoping it didn't destroy anything :-/
-
- Posts: 1
- Joined: Sun Jul 19, 2015 4:55 pm
Re: MJPG stream is not working with kernel 3.18
Thanks for the information everyone; this is an unfortunate bug.
I went though absolute hell getting guvcview 2.0.1 installed on Raspbian with kernel 3.18; PJ Assis's PPA on Launchpad didn't have an armhf version of the package.
However, I did find one ... just added the below to /etc/apt/sources.list
then
and then 2.0.1 was available
I went though absolute hell getting guvcview 2.0.1 installed on Raspbian with kernel 3.18; PJ Assis's PPA on Launchpad didn't have an armhf version of the package.
However, I did find one ... just added the below to /etc/apt/sources.list
Code: Select all
deb http://ftp.de.debian.org/debian jessie main
Code: Select all
sudo apt-get update
Re: MJPG stream is not working with kernel 3.18
mirak123 wrote:1) Download mjpg-streamer2) Go to mjpg-streamer folderCode: Select all
$ svn checkout svn://svn.code.sf.net/p/mjpg-streamer/code/ mjpg-streamer-code
3) Safe the patch as some file, e.g. input_uvc_patchCode: Select all
$ cd mjpg-streamer-code/mjpg-streamer
Copy and paste the patch into input_uvc_patch fileCode: Select all
$ nano input_uvc_patch
Save and close input_uvc_patch fileCode: Select all
--- plugins/input_uvc/input_uvc.c (revision 174) +++ plugins/input_uvc/input_uvc.c (working copy) @@ -405,9 +405,13 @@ if(pcontext->videoIn->formatIn == V4L2_PIX_FMT_YUYV) { DBG("compressing frame from input: %d\n", (int)pcontext->id); pglobal->in[pcontext->id].size = compress_yuyv_to_jpeg(pcontext->videoIn, pglobal->in[pcontext->id].buf, pcontext->videoIn->framesizeIn, gquality); + /* copy this frame's timestamp to user space */ + pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp; } else { DBG("copying frame from input: %d\n", (int)pcontext->id); - pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->buf.bytesused); + pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->tmpbytesused); + /* copy this frame's timestamp to user space */ + pglobal->in[pcontext->id].timestamp = pcontext->videoIn->tmptimestamp; } #if 0 @@ -418,8 +422,6 @@ prev_size = global->size; #endif - /* copy this frame's timestamp to user space */ - pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp; /* signal fresh_frame */ pthread_cond_broadcast(&pglobal->in[pcontext->id].db_update); Index: plugins/input_uvc/v4l2uvc.c =================================================================== --- plugins/input_uvc/v4l2uvc.c (revision 174) +++ plugins/input_uvc/v4l2uvc.c (working copy) @@ -450,6 +450,8 @@ */ memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused); + vd->tmpbytesused = vd->buf.bytesused; + vd->tmptimestamp = vd->buf.timestamp; if(debug) fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused); Index: plugins/input_uvc/v4l2uvc.h =================================================================== --- plugins/input_uvc/v4l2uvc.h (revision 174) +++ plugins/input_uvc/v4l2uvc.h (working copy) @@ -28,6 +28,7 @@ #include <stdio.h> +#include <stdint.h> #include <string.h> #include <fcntl.h> #include <unistd.h> @@ -105,6 +106,8 @@ int framecount; int recordstart; int recordtime; + uint32_t tmpbytesused; + struct timeval tmptimestamp; }; /* context of each camera thread */
4) Apply the patch5) Compile itCode: Select all
$ patch -p0 < input_uvc_patch
6) Install itCode: Select all
$ make USE_LIBV4L2=true clean all
7) Run it & enjoyCode: Select all
$ sudo make DESTDIR=/usr/local install
![]()
Code: Select all
$ mjpg_streamer
Can You help me please!!!!. I already done all steps from 1 - 5. But i have problem with step 6 "sudo make DESTDIR=/usr/local install"
I have message:
root@raspberrypi:~/mjpg-streamer-r63# make DESTDIR=/usr/local install
make: *** No rule to make target 'install'. Stop.
-
- Posts: 2
- Joined: Tue Feb 09, 2016 10:22 am
Re: MJPG stream is not working with kernel 3.18
Hello there, I really hope I'm not alone with my problem.
Besides being absolutely new to working with Pi's, I actually managed to patch mjpeg-streamer with your help to actually use mjpeg instead of YUV and boost the fps from 3 to around 15-20. This works very well via the webinterface (IP:8080) and likewise with the VLC stream function. BUT - and this is where I am stuck - I can't find a way to have OMXPlayer (Pi A runs mjpeg-streamer, Pi B runs OMXPlayer) stream from Pi A. I tried different sources, like a mp4 video I put on my server, and there was no problem whatsoever.
Did anyone else have this issue and found a solution? Any Ideas?
Thanks a lot,
Daniel
Besides being absolutely new to working with Pi's, I actually managed to patch mjpeg-streamer with your help to actually use mjpeg instead of YUV and boost the fps from 3 to around 15-20. This works very well via the webinterface (IP:8080) and likewise with the VLC stream function. BUT - and this is where I am stuck - I can't find a way to have OMXPlayer (Pi A runs mjpeg-streamer, Pi B runs OMXPlayer) stream from Pi A. I tried different sources, like a mp4 video I put on my server, and there was no problem whatsoever.
Did anyone else have this issue and found a solution? Any Ideas?
Thanks a lot,
Daniel
Re: MJPG stream is not working with kernel 3.18
I am in the same situation as Daniel. Many thanks for the patch that worked flawlessly and help me get real time streaming to work correctly. But I am also interested in the other end with OMXPlayer. Any assistance with that would be awesome.
Steve
Steve
Re: MJPG stream is not working with kernel 3.18
Well.. I have the same kind of problems with Jessie 03-2016.. Had to investigate myself and here is the solution
viewtopic.php?p=964326#p964326
viewtopic.php?p=964326#p964326
Re: MJPG stream is not working with kernel 3.18
Why you make other people live very difficult?
You make a patch public, its clear the patch works only for a special Version of input_uvc.c an will fail at other Versions.
You dont give a source for the special Version.
Why to hell you dont upload a whole package of mjpg-streamer with included patched input_uvc.c???
The Patch didnt work, first it dont find the file. If you give it the full path it says "malformed patch at line 4"
You make a patch public, its clear the patch works only for a special Version of input_uvc.c an will fail at other Versions.
You dont give a source for the special Version.
Why to hell you dont upload a whole package of mjpg-streamer with included patched input_uvc.c???
The Patch didnt work, first it dont find the file. If you give it the full path it says "malformed patch at line 4"