Compiling RaspiVid Only

To build raspivid and only raspivid then the following command should do it (assuming your repo (https://github.com/raspberrypi/userland.git) clone is in ~/userland):

gcc -o myraspivid RaspiVid.c RaspiCamControl.c RaspiPreview.c RaspiCLI.c \ -I$HOME/userland -I$HOME/userland/host_applications/linux/libs/bcm_host/include \ -L/opt/vc/lib -lbcm_host -lvcos -lpthread -lmmal_core -lmmal_util -lmmal_vc_client