View Single Post
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#126
Originally Posted by handaxe View Post
Perhaps I should have written: " A possible clue...." as I am not sure that v4l2-ctl can deal with zooming, particularly digital zoom....
Edit: As xopher brought to my attention, the image dimensions used below pertain for unscaled streaming (eg to the n900's screen). Using phonestreamer will require different values related to te image dimension being streamed. BUT the principle still applies.

V4l2-ctl in fact in deals with digital "zoom" in particular. You can try it out as follows.

Needed: working ssh access to the n900 and phonestreamer, or

stream to phone screen:
Code:
gst-launch v4l2src device=/dev/video0 ! autovideosink
and v4l2-ctl on the n900 (make sure it is executable): http://talk.maemo.org/showpost.php?p=501105&postcount=7

Get the streaming going. Now, either in an x-terminal on the n900 (if streaming to n900 screen) or via ssh (best from the pc being streamed to) and making sure you get the correct path for the v4l2-ctl exe:
Code:
v4l2-ctl --set-crop=top=0,left=0,width=864,height=656
This should result in a "zoomed" stream
Code:
v4l2-ctl --set-crop=top=0,left=0,width=2592,height=1968
A "zoom-out" effect.

By fiddling with the top/left and width/height combos one determines the location and extent of zoom-in on the original image dimension. The effects here are entirely digital as the n900 lacks an optical zoom. If you just run v4l2-ctl you will get all the possible parameters. So yes, quite easily phonestreamer could zoom the stream. Best however to talk directly to the camera API.

Last edited by handaxe; 2011-03-17 at 01:41. Reason: clarifications
 

The Following 2 Users Say Thank You to handaxe For This Useful Post: