SUGGESTION: Custom video sizes

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
Post Reply
Basara
Posts: 18
Joined: Wed Aug 08, 2012 11:49 am

SUGGESTION: Custom video sizes

Post by Basara »

Hi, just something for the suggestions list.

Currently, the stream settings allow you to pick from pre-defined video sizes (ie 640x480, 800x600 etc) and these seem to be controlled in the settings xml file by a reference number (640x480 is linked to size 4 i believe).

My suggestion is the ability to pick "Custom" from the dropdown and enter your own size.
My reason for suggesting this is I embed my stream on another website and when designing the page I found that 640x480 was a bit too big and 320x240 too small for my needs and that a custom size would have been just what I needed.

Thanks
Neil G
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Re: SUGGESTION: Custom video sizes

Post by z3r0c00l12 »

I won't add this to the suggestion list immediately, I'll let Malun add it if it's a valid suggestion, but my guess is that Yawcam doesn't support custom sizes. the sizes displayed in the dropdown are those reported to the software by the webcam driver, so Yawcam wouldn't have any control on those resolutions.

I'm guessing here, so I'll let malun answer, but I think if you want custom video sizes you'll need to look at the driver from the manufacturer of the webcam.
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Re: SUGGESTION: Custom video sizes

Post by malun »

There is a drop down list with predefined sizes in two places in Yawcam.

1) If you click:
"Settings -> Device (xxx) -> Change to device"
The sizes defined in the "format" drop down come from the camera's driver.
Yawcam can't change or affect these values.

2) If you click:
"Settings -> Edit settings... -> Stream"
The sizes defined in the "scale to" drop down come from a predefined list in Yawcam.
This setting doesn't affect the real resolution of the images, but will only scale the output on the output page.
Adding an option to let the user choose an optional size would be possible. (But I doubt that it will be used by many users...)

There is however a workaround to achieve this in the current version of Yawcam. Edit your template_js.html (if you use javascript as stream type) located in your .yawcam directory. The file will typically be located here:
C:\Users\YOUR_USERNAME\.yawcam\stream\template_js.html
Replace all occurrences of @WIDTH and replace them with the width you want to scale the output to.
Replace all occurrences of @HEIGHT and replace them with the height you want to scale the output to.

I will not put this on the todo-list at this moment. The workaround will have to be sufficient for now.

/malun
Basara
Posts: 18
Joined: Wed Aug 08, 2012 11:49 am

Re: SUGGESTION: Custom video sizes

Post by Basara »

Thanks for this, I'll have a play with the JavaScript file tonight and let you know.
Post Reply