The paper proposes an approach to developing a video data pipeline that addresses the basic tasks of precision pig farming. The pipeline performs both low-level tasks, such as data pre-processing, object detection, instance segmentation, tracking, object density estimation, etc., and high-level tasks, e.g. livestock counting, feeders and drinkers condition assessment, behavioral patterns analysis, estimation of livestock activity and weight, etc. The proposed solution is based on neural network algorithms and can be flexibly adjusted to specific conditions and tasks, including while sending emergency notifications. Furthermore, the system is architecturally capable of integrating additional sensor and input data. The approach is demonstrated by solving several problems in the fattening phase. The system has proven to have a number of competitive advantages, including stable operation in a high animal density environment.