Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to do some some streaming with a webcam, but so far the results are not good: everything I stream in 320x240 looks good, but as soon as I choose a higher resolution, the image quality gets terrible and CPU usage is going through the roof.

I'm using a Logitech C525 camera, which claims to be HD, and has a native resolution of 1280x720).

If 1280x720 is the native resolution, I wonder why the quality is so terrible?

I'm using VLC for streaming, and use the following vlm config file:

new camNumber2 broadcast enabled
setup camNumber2 input v4l2:///dev/video2:width:320:heigth:240
setup camNumber2 output #transcode{vcodec=mpeg4,acodec=none,vb=1000}:standard{access=http,mux=ogg,dst=0.0.0.0:8080}
control camNumber2 play

Like I said, as soon as I go any higher with the resolution, the quality drops to a big blocky mess.

I suspect there might be something wrong with my video input settings, and that VLC just tries to up-scale the image to the resolution I requested, instead of grabbing the images at the requested resolution.

share|improve this question
    
I've managed to get better quality now by increasing the bitrate to 4096, but cpu usage is still pretty high. I wonder if I should choose another video codec? It's only used on my own network, so I don't need to worry too much about the bandwith... –  Jeroen Jacobs May 26 '12 at 23:58
    
Video encoding is often a very CPU-intensive process. Doing 1280x720 in realtime could explain the stress on the CPU, so another video codec is worth a try. –  Slizzered Apr 21 at 8:26

1 Answer 1

I have a couple observations and suggestions. I don't see anything necessarily wrong with your commands, but lets try to find a solution.

  1. It looks like your using mpeg4, I'd recommend taking a look at THIS list of supported VLC codecs. I recommend you try h265 or mp4v. Upon closer inspection I don't actually see mpeg4 on that list, so that could be your problem.
  2. What CPU are you using? It's possible that your system is not powerful enough to stream 1280x720. You don't mention what computer your using and I just want to make sure your not attempting this on a Raspberry Pi or anything.
  3. Try getting it to work using the GUI. I recognize that the GUI might not be the end solution, but if we can get it to work there then we know it's possible and can continue with the CLI arguments.
  4. Try on another OS and computer. Can you get it to work on Windows & Linux, does one work better? Again, this will help eliminate some variables about where the problem is.
  5. Unlikely, but it's possible your USB bus is saturated, maybe the port is only USB 1, or you have an external HDD on the same bus that's taking all the bandwidth.

Try some of the options above, if you figure it out post which solutions worked for you. If it's still not working, post what you've discovered.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.