Page 1 of 1

raspi_vid and hello_video.bin positioning problems

Posted: Tue Jul 28, 2015 3:36 pm
by yertiz
I'm having trouble getting Dom's special version of hello_video.bin (as used on Gert's Toast E robot) to position the picture correctly on screen. I cannot see any other threads on this so I assume the problem is me rather than the program.

I am working on the assumption that the arguments for positioning are x1 y1 x2 y2 rather than x1 y1 width height.

If I use nc 192.168.1.9 5001 | ./hello_video.bin 0 0 640 360 I get a 640 x 360 picture in the top left of the screen, as expected. Change the arguments to 0 0 1280 720 and I get a 1280 by 720 picture in the top left hand corner - so far so good.

As soon as I try to move the picture away from the top left hand corner I start to get unexpected results.

640 0 640 360 gives me a 640 x 360 picture with the top left hand corner of the picture 640 pixels across and 640 pixels down.

I was beginning to doubt my assumptions about x1 y1 x2 y2 so tried 640 0 1280 360 but instead of a 1280 wide picture I got a 640 x 360 picture at 920 x 640.

I can get the picture in the bottom left of the screen using 0 0 640 1800 but can find no way to get it top right or bottom right.

Anybody have any ideas where I am going wrong?

Re: raspi_vid and hello_video.bin positioning problems

Posted: Tue Jul 28, 2015 4:26 pm
by 6by9
Not without the source code for Dom's special hello_video.bin.
I suspect he's just setting up a suitable OMX_CONFIG_DISPLAYREGIONTYPE and calling OMX_SetParameter(video_render, OMX_IndexConfigDisplayRegion) with it. See https://github.com/raspberrypi/userland ... com.h#L250 for details of the struct.
Note that dest_rect is in terms of the screen resolution, not the source image that is being displayed.