would it be possible to output the preview to framebuffer1 instead of the default output?
That way I could use one of my TFT display board to preview the camera's output

Texy
I needed totasanakorn wrote:This app like normal app. but it does not output any text on console (some debug message send to syslog).
You can run with & to take it in background like.
> ./fbcp &
Before use this run this app. Make sure you are run lastest raspberry pi firmware (> 2013-07-11 with dispmanx_screeshort scale).
Beware, if you update firmware with rpi-update, It will replace kernel/module with official (I don't remember how to skip kernel update). Then test your framebuffer driver again (you might need to rotate screen to landscape to match with primary screen ratio)
build
------
$ git clone https://github.com/tasanakorn/rpi-fbcp.git
$ cd rpi-fbcp
$ mkdir build
$ cd build
$ cmake ..
$ make
Run
----
$ ./fbcp &
Check Log (if you want)
-------------
$ tail -f /var/log/message
Now. you should see primary screen on framebuffer device. At this point you can run any program (raspivid, raspistill, startx or omxplayer) like on primary screen (let me know if it not).
Code: Select all
sudo apt-get install cmake
Code: Select all
pi@raspberrypi ~/rpi-fbcp/build $ make
Scanning dependencies of target fbcp
[100%] Building C object CMakeFiles/fbcp.dir/main.c.o
In file included from /opt/vc/include/interface/vcos/vcos_assert.h:149:0,
from /opt/vc/include/interface/vcos/vcos.h:114,
from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
from /opt/vc/include/bcm_host.h:46,
from /home/pi/rpi-fbcp/main.c:8:
/opt/vc/include/interface/vcos/vcos_types.h:38:33: fatal error: vcos_platform_types.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/fbcp.dir/main.c.o] Error 1
make[1]: *** [CMakeFiles/fbcp.dir/all] Error 2
make: *** [all] Error 2
pi@raspberrypi ~/rpi-fbcp/build $
Code: Select all
$ cd rpi-fbcp
$ git pull
$ cd build
$ cmake ..
$ make
Fantastic news. Does it work well enough to use one of these little screens as a preview screen for video? That's the breakthrough I've been holding out fortexy wrote:Thankyou - that is working - and it is working very well with my display board boards on HY28A-LCDB.
I am sure that people will find this very useful,
Texy
...it most certainly does work well enough, at least with my 2.8"TFT boards. Because it now copies main output to fb1, it allows you to play video's with omxplayer at a far better framerate than direct just plain mplayer playback to fb1alexeames wrote:Fantastic news. Does it work well enough to use one of these little screens as a preview screen for video? That's the breakthrough I've been holding out fortexy wrote:Thankyou - that is working - and it is working very well with my display board boards on HY28A-LCDB.
I am sure that people will find this very useful,
Texyotherwise we're stuck with crappy car reversing screens on the composite RCA connector.
Thank you kindly for sharing this tasanakom.tasanakorn wrote:This app like normal app. but it does not output any text on console (some debug message send to syslog).
......
Now. you should see primary screen on framebuffer device. At this point you can run any program (raspivid, raspistill, startx or omxplayer) like on primary screen (let me know if it not).
tvjon wrote: ...
You asked for feedback so here's a short lo-res video showing hdmi screen flashing when using:
raspivid -t 0
It only occurs on hdmi. The tft "mirroring" is flash-free.
That in itself is interesting, as yesterday when I first connected the tft display I had several hours of tft backlight flashing. Today however, it seems ok so far.
I have only downloaded and used the initial release - has this recent code been released, or only your own experiments?tasanakorn wrote: Hi. tvjon
Thank you for your feedback.
Recent code, I reduce delay between frame from 50ms to 25ms to increase update rate. I think it update too much. Because I use VideoCore to capture primary screen, It might interfere and slow down raspivid task.
Since I don't know anything inside VideoCore. I don't know how to avoid that.
Hope broadcom guy interest this thread and give me a hint.
I think probably you will start to hit processor (The video scaler/compositor) and memory bandwidth issues with those low figures. That's a lot of data to be processing per second when added to the data requirements of the camera as well.tasanakorn wrote:tvjon wrote: ...
You asked for feedback so here's a short lo-res video showing hdmi screen flashing when using:
raspivid -t 0
It only occurs on hdmi. The tft "mirroring" is flash-free.
That in itself is interesting, as yesterday when I first connected the tft display I had several hours of tft backlight flashing. Today however, it seems ok so far.
Hi. tvjon
Thank you for your feedback.
Recent code, I reduce delay between frame from 50ms to 25ms to increase update rate. I think it update too much. Because I use VideoCore to capture primary screen, It might interfere and slow down raspivid task.
Since I don't know anything inside VideoCore. I don't know how to avoid that.
Hope broadcom guy interest this thread and give me a hint.
This is running great for me with Texy's 2.8" TFT module. Camera preview, omxplayer output, copying HDMI or composite (aka headless)tasanakorn wrote:My program.
https://github.com/tasanakorn/rpi-fbcp
Just copy from /dev/fb0 to /dev/fb1 by vc_dispmanx_snapshot. It should display everything from primary display to fb1.