Published video Zoomed sometimes

Ask any questions or talk about OpenTok here!

Published video Zoomed sometimes

Postby fernando.martinelli » Wed May 02, 2012 3:38 am

Hi,

During tests I came to realized that for some users (and even then not every time) the published video is very zoomed. What might be the reason for that? How can I make sure it won't happen?

I'm starting the stream with only one property: {height:172}. Does that actually change the resolution of the recorded video or just the height of the container showing it (I suppose #2 is correct)? Could the random zoom problem be related to it?

Thanks a lot!
Fernando
Was this post helpful? (0)
fernando.martinelli
 
Posts: 24
Joined: Thu Nov 10, 2011 4:36 am
Thumbs Up: 0

Re: Published video Zoomed sometimes

Postby jtsai » Wed May 02, 2012 10:29 am

It only changes the height of the container showing it. The only differences I can think of is the bandwidth check. What happens is when a user first connects, a bandwidth check is done. The user's camera resolution and bitrate is then changed depending on the bandwidth detected, and their camera may be doing something weird for that resolution.

I would suggest you set an encodedWidth and encodedHeight in a 4:3 ratio which most closely fits the container. If it is bigger than the container, it will look blurry. If it is smaller, then it will look pixelated. Most webcams support 320x240 or 640x480. Which webcams are the people who are seeing this zoomed in effect using?

Example:
Code: Select all
session.publish("some_div", {encodedWidth: 320, encodedHeight: 240, height: 172});


John
Was this post helpful? (1)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 1954
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 157

Re: Published video Zoomed sometimes

Postby fernando.martinelli » Thu May 03, 2012 7:16 am

Hi John, thanks a lot again. I'll try to implement the encoding parameters and see what happens to the zoom. I'll let you know if it worked.

Two more questions:

1) You say in your documentation not to define the container size with CSS. What happens if I do (any big problems)? I had to do it because I need to change the size of the publisher dynamically. I have to do that because if I leave my video where it should be (bottom right of the page, like on skype) the flash window for allowing the camera access pops up at a weird place where the button cannot be reached. So I start with the container at a different position and once the user allowed camera access and the video is published I reset the containers position and size.

2) Can I control where the flash "allow camera" window appears?

Thanks a lot again!
Fernando
Was this post helpful? (0)
fernando.martinelli
 
Posts: 24
Joined: Thu Nov 10, 2011 4:36 am
Thumbs Up: 0

Re: Published video Zoomed sometimes

Postby jtsai » Thu May 03, 2012 10:49 am

We put that there to prevent people from resizing the container when the users have to click allow/deny. Our code actually resizes it to be bigger if it is too small and then sizes the swf and container back to normal.

So for 2, you can just keep doing what you're doing. However note that in firefox, it may "reset" the swf if you change the style "position" of the swf, which will cause the swf to mess up and be unable to publish.

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 1954
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 157

Re: Published video Zoomed sometimes

Postby fernando.martinelli » Thu May 03, 2012 3:12 pm

Seems that it solved the zoom problem! I'll keep doing more tests though...

Thanks again!
Was this post helpful? (0)
fernando.martinelli
 
Posts: 24
Joined: Thu Nov 10, 2011 4:36 am
Thumbs Up: 0


Return to Discussion and Questions



Who is online

Users browsing this forum: No registered users and 1 guest

cron