Pixel format: MJPG (MJPEG MIME type: image/jpeg) Pixel format: YUYV (YUV 4:2:2 (YUYV) MIME type: video/x-raw-yuv) Listing available frame formats for device video0: That’s all from me for now, hopefully this post helps someone get their webcams up and running □ I seem to recall in older versions of ffmpeg and Raspbian that the cheaper webcams could still stream well at 320×240, so I’m unsure as to whether it’s ffmpeg causing issues or Raspbian now. I tried some of my other cheaper webcams which didn’t have mjpeg format and they fared a bit better than the Logitech one in the Raw department, possibly due to the fact that the Logitech forced 15fps.ĬPU usage was around 20% with the 176×144 resolution with a cheap webcam, and 25% with the Logitech c110Īlmost doubling the resolution to 320×240 resulted in barely any video on the Logitech with ffmpeg stalling altogether, and not streaming to ffserver at all, and the same for the cheap webcam. I tried it on the lowest resolution possible which is 176×144 and I still had a ~2 second delay. Streaming from raw video -> mjpeg isn’t very cpu intensive for the Pi but it can’t keep up streaming at a good fps on the Logitech Webcam. I’m currently looking into why it might be doing this, but I’m stumped □ When I was streaming it from raw -> mjpeg, it could stream on my laptop via VLC but not on my Android Mobile. Looking at the ffmpeg/ffserver status page, it shows that ffserver is definitely pushing data to my devices, so I’m unsure as to what is happening there. The output of ffmpeg shows that it is definitely streaming straight mjpeg but for some reason I can’t tap into the stream. To stream straight mjpeg, I used the -vcodec mjpeg parameter by itself in the script to start ffmpeg. I’ll repost the config that I used here –Īnd the script file I use to start ffserver and ffmpegįfserver -f /etc/ff.conf & ffmpeg -v quiet -r 5 -s 320x240 -f video4linux2 -i /dev/video0 When I tried streaming, I found out that the webcam only supports 30fps and 15fps, so the driver automatically forces it to 15fps.įor some reason, ffserver also has trouble streaming mjpeg when the source is also mjpeg. Once ffmpeg was compiled and installed, I followed the same steps as before to setup ffmpeg. *Note* Compiling ffmpeg on the Pi will take a while, I left it running overnight to let it finish up. If you need sound for ffmpeg, you will need to also install the libasound2-dev package which enables ALSA. Git retrieved the source code I needed to build ffmpeg from scratch, which is next up ! Once git was installed, I went into /usr/src to download the source. I was root when I ran the rest of these commands, so if you’re not root, either sudo bash to become root, or just prepend sudo to everything Not sure why that is, but I’m assuming there’s an issue in the code somewhere for ffmpeg so I ended up using git to get the source code to build.įirst step is to install git, as RSE didn’t include git. I started off with a fresh re-install of Raspbian Server Edition (RSE), and found that the instructions in Part 1 don’t work any more. I saw a Logitech c110 webcam and decided to pick that up to test out the mjpeg world of webcams. So I recently got back into the Pi as I could now use the PiSU to do a few things.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |