Poor image quality and high CPU usage while streaming in high resolution using webcam and VLC in Linux
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
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.
linux vlc-media-player streaming webcam v4l2
add a comment |
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.
linux vlc-media-player streaming webcam v4l2
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 '15 at 8:26
add a comment |
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.
linux vlc-media-player streaming webcam v4l2
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.
linux vlc-media-player streaming webcam v4l2
linux vlc-media-player streaming webcam v4l2
edited Apr 21 '15 at 8:04
Ayan
2,26031321
2,26031321
asked May 26 '12 at 16:07
Jeroen JacobsJeroen Jacobs
1781310
1781310
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 '15 at 8:26
add a comment |
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 '15 at 8:26
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
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 '15 at 8:26
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 '15 at 8:26
add a comment |
1 Answer
1
active
oldest
votes
I have a couple observations and suggestions. I don't see anything necessarily wrong with your commands, but lets try to find a solution.
- 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.
- 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. - 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.
- 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.
- 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.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f429139%2fpoor-image-quality-and-high-cpu-usage-while-streaming-in-high-resolution-using-w%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have a couple observations and suggestions. I don't see anything necessarily wrong with your commands, but lets try to find a solution.
- 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.
- 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. - 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.
- 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.
- 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.
add a comment |
I have a couple observations and suggestions. I don't see anything necessarily wrong with your commands, but lets try to find a solution.
- 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.
- 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. - 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.
- 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.
- 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.
add a comment |
I have a couple observations and suggestions. I don't see anything necessarily wrong with your commands, but lets try to find a solution.
- 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.
- 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. - 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.
- 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.
- 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.
I have a couple observations and suggestions. I don't see anything necessarily wrong with your commands, but lets try to find a solution.
- 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.
- 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. - 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.
- 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.
- 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.
answered Jun 24 '15 at 17:48
tbenz9tbenz9
5,21322028
5,21322028
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f429139%2fpoor-image-quality-and-high-cpu-usage-while-streaming-in-high-resolution-using-w%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
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 '15 at 8:26