# How to improve webcam live video streaming quality

**URL:** <https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645>\
**Category:** Wowza Streaming Engine\
**Created:** [July 23, 2009, 11:29am UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645 "2009-07-23T11:29:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [July 23, 2009, 11:29am UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/1 "2009-07-23T11:29:39Z")

</div>

Hello,

I’m implementing a ( flash client with webcam --\> Wowza server --\> flash client ) solution in order to replace a live application with an Axis camera.

It appears that the quality of the live stream viewed on clients side is very poorer than with Axis cam.

In the flash client publishing the stream, the camera.width and camera.height properties appear to be only 160 x 120 , compared to 640 x 480 with the Axis camera !! Oups …

So the final result is a bad pixelation.

Does anyone have an idea about how to improve the final quality of the live stream ?

Thanks a lot.

Philippe.

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 23, 2009, 11:52am UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/2 "2009-07-23T11:52:23Z")

</div>

You can use Camera.setMode and [Camera.setQuality](http://livedocs.adobe.com/flex/3/langref/flash/media/Camera.html#setQuality%28%29):

```auto
camera.setMode(320,240,20,false); // set size here
camera.setQuality(0,90); // this favors quality over bandwidth

```

This is as exact as you can get using Flash plugin as the encoder. You should be able to get better quality from the same camera with a dedicated encoder.

Note, don’t set the 2nd arg of setQuality (quality setting) above 90. It is known to be a problem.

Richard

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [May 11, 2010, 3:30am UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/3 "2010-05-11T03:30:02Z")

</div>

It is hard to know. I have found through expirementation that using the quality setting to control quality rather than bandwidth produces better looking video from the encoder. I am just not sure why although it does make sense.

Charlie

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [July 7, 2010, 4:00am UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/4 "2010-07-07T04:00:05Z")

</div>

I think you are confusing the recorded file with the stream name used for live streaming. For live streaming there is no extension. The stream name is fixed. So there is no need to change the stream name used when playing a live stream when you switch between H.264 and VP6. Use the same stream name in JW Player that is working for VP6. It will also work for H.264.

Charlie

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 4, 2010, 1:41pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/5 "2010-07-04T13:41:10Z")

</div>

These are Flash actionscript commands. In the VideoRecording client and clientAS2 examples you can find them in the Actionscipt pane of the FLA file. In the clientFlex version they are in RecordingController.as file.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 5, 2010, 2:17pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/6 "2010-07-05T14:17:44Z")

</div>

I thought you were referring to the camera.setQuality and camera.setMode lines. Those are Actionscript commands, not relevant to FMLE.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 5, 2010, 5:29pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/7 "2010-07-05T17:29:24Z")

</div>

No, these settings are relevant to publishing with a Flash application, using NetStream.publish with the Camera object.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 5, 2010, 8:42pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/8 "2010-07-05T20:42:47Z")

</div>

This is probably nothing new: First, use h.264.

Then, if internet delivery and player technologies are not factors, make the bitrate and fps and encoding parameters very high.

If internet delivery and a variety of player technologies are factors, then you have to compromise and play around with all those settings until you find something that first doesn’t buffer, because that’s worse then low resolution.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 6, 2010, 12:34pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/9 "2010-07-06T12:34:05Z")

</div>

> (I have noticed that when I set the bitrate higher than 500, I get a lot of phone calls about buffering?)

That’s the trade-off between resolution and user experience, as I was saying. Not buffering is more important than higher resolution.

And the advantage of h.264 is that you can get the same quality with lower bitrates. Make some recordings of equal time length, and compare size on disk and kbs.

size in kilobytes \* 8 / duration in seconds = kilobits per second (kbs)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 7, 2010, 12:06pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/10 "2010-07-07T12:06:21Z")

</div>

That message is about the extension of the file name in the “Save to File” box. You can uncheck that. That is saving a file to your computer, it is not what is being streamed.

The name of the file you are streaming is above that, in a box labeled “Stream:” (below the FMS URL and Backup URL).

It is okay to not use any extension. Just enter “myStream” for example. Then play that with h.264 settings. Test in SimpleVideoStreaming example player:

Server: rtmp://[wowza-address]:1935/[appName]

Stream: myStream

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 7, 2010, 8:12pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/11 "2010-07-07T20:12:45Z")

</div>

Whatever you put in the “Stream:” box in FMLE is exactly what you should reference in the JW Player “file” flashvar. Exactly. If you want to put an extension, you can, but it’s really not necessary. You should add Flashvar “provider=rtmp”

If you have this:

```auto
&stream=rtmp://[wowza-address]:1935/livevideo&provider=rtmp&file=BOD

```

Then the Stream: in FMLE should be “BOD”

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [October 21, 2010, 6:38pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/12 "2010-10-21T18:38:10Z")

</div>

For reference, take a look at the VideoRecording example that ships with Wowza, in the videorecording.fla file, at the StartCamera function:

```auto
function startCamera()
{	
	// get the default Flash camera and microphone
	camera = Camera.getCamera();
	microphone = Microphone.getMicrophone();
	// here are all the quality and performance settings
	camera.setMode(160, 120, 30, false);
	camera.setQuality(0, 88);
	camera.setKeyFrameInterval(30);
	microphone.rate = 11;
	
	nameStr.text = movieName;
	AppendCheckbox.selected = false;
	connect.connectStr.text = serverName;
	connect.connectButton.addEventListener(MouseEvent.CLICK, doConnect);
	enablePlayControls(false);
}

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 16, 2011, 4:11pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/13 "2011-03-16T16:11:29Z")

</div>

You don’t have to de-compile anything because there is source code in the example. The VideoRecording has a clientFlex folder with Flex (sdk 3.2) version including source.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 16, 2011, 6:31pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/14 "2011-03-16T18:31:36Z")

</div>

Yes you do.

Richard

---

<div class="post-metadata">

**Author:** ![Kelly\_Rinne](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@Kelly\_Rinne](https://community.wowza.com/u/Kelly_Rinne)\
**Post date:** [May 11, 2010, 2:41am UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/15 "2010-05-11T02:41:33Z")

</div>

how does choosing higher resolution over bandwidth affect the end users’ performance?

I would like to improve picture quality as well currently using 3CCD SD digital cameras into a switcher, then into capture card.

---

<div class="post-metadata">

**Author:** ![Kelly\_Rinne](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@Kelly\_Rinne](https://community.wowza.com/u/Kelly_Rinne)\
**Post date:** [July 4, 2010, 12:55pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/16 "2010-07-04T12:55:03Z")

</div>

what file is this setting located in?

---

<div class="post-metadata">

**Author:** ![Kelly\_Rinne](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@Kelly\_Rinne](https://community.wowza.com/u/Kelly_Rinne)\
**Post date:** [July 5, 2010, 2:10pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/17 "2010-07-05T14:10:35Z")

</div>

Thanks for the reply, Richard.

I am not familiar with what you mean by:

VideoRecording client

clientAS2 examples

or clientFlex version

does the fact that I use FMLE to encode make a difference?

Is this only available in vers. 2.0?

Also, I am still using 1.7.xxx version - I do plan to upgrade, but need to find a time when I can shut off the server for a few days and not impact others.

---

<div class="post-metadata">

**Author:** ![Kelly\_Rinne](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@Kelly\_Rinne](https://community.wowza.com/u/Kelly_Rinne)\
**Post date:** [July 5, 2010, 4:01pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/18 "2010-07-05T16:01:34Z")

</div>

well, I was…sort of.

I did a search of the forum about “improving quality” and this was the only posting I could see in reference to improving quality, so I am trying to understand what the original poster was doping, so that I can also apply the same settings to my streams if possible.

Currently using the JWPlayer vers 4 - would I be able to apply these settings using that player? The forum posts show some issues with vers. 5, so I have not upgraded my player yet.

thanks in advance -

---

<div class="post-metadata">

**Author:** ![Kelly\_Rinne](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@Kelly\_Rinne](https://community.wowza.com/u/Kelly_Rinne)\
**Post date:** [July 5, 2010, 8:33pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/19 "2010-07-05T20:33:19Z")

</div>

ok…well at the risk of hijacking a thread - is there anything I can do to improve quality of video?

---

<div class="post-metadata">

**Author:** ![Kelly\_Rinne](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@Kelly\_Rinne](https://community.wowza.com/u/Kelly_Rinne)\
**Post date:** [July 6, 2010, 12:27pm UTC](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645/20 "2010-07-06T12:27:35Z")

</div>

I did try H.264 once, and couldn’t see much of a difference, so maybe I didn’t change the settings correctly?

Format: H.264

Frame Rate: 29.97

Input Size: 320x240

Output Size: 480 x290

Bitrate: I am usually averaging 300 kbps up using wireless, 500+ hardwired.

In the display page I use f4v instead of flv to call the stream up.

(I have noticed that when I set the bitrate higher than 500, I get a lot of phone calls about buffering?)

I use live-record in my Application settings, and I also record a file locally using SaveToFile.

do you have any suggestions?

[Next page](https://community.wowza.com/t/how-to-improve-webcam-live-video-streaming-quality/645.md?page=2)
