Raspberry pi media streaming/recorder

Another idea:

Make a raspberry pi into an HDMI capture device which can take in the church broadcast feed, and then either record it or stream it to the web (or maybe both)

Rpi has no HDMI input so we need to add a little gizmo to do that. Auvidea make a board called B101 which plugs into the Rpi camera input... but it is a bit experimental

Need to enable camera and I2C in raspi-config.

HDMI signal needs to be connected before attempting to use the HDMI input or you get errors.

To test we can use raspivid

$ raspivid -v -p 0,0,1280,768 -t 0&

where the 0,0 is position to show preview screen and 1280,768 is the preview size

 

However using raspivid the input resolution is fixed (and the interface to hdmi-in is technically not supported, and might be removed in future. So Orbital on the rpi forums has written a modified version called tc358743.c (the number refers to the hdmi decoding chip) which is possible to edit and play with.

 

To build this, we need a build command which includes the correct libraries - it's quite long so I have made a little script file with this in. The first bits tell it where to find the include files, then the file it is compiling, then the libraries to use, finally the output file name.

gcc -I /opt/vc/include/ -L /opt/vc/lib tc358743.c -lmmal_core -lmmal_util -lmmal_vc_client -lvcos -lbcm_host -lvcsm -lvchiq_arm -lpthread -lwiringPi -o tc358743

Also need to enable i2c0 by editing /boot/config.txt and adding the line

dtparam=i2c_vc=on