Digital sensing, processing, and communication capabilities will be ubiquitously embedded into everyday objects, turning them into an Internet-of-things (IoT, also known as, machine-to-machine, M2M). More importantly, everyday objects will become data generators, with sensors everywhere continuously collecting a large quantity of data about their context and use, processors everywhere analyzing and inferring useful knowledge from the data, and finally communication radios transmitting and exchanging useful knowledge with other objects and to "cloud" based resources. This is the next-generation Internet - rather than data mainly produced by humans and for humans, in the new machine-to-machine-era Internet, data are generated by machines (sensors), communicated without human involvement to other machines (servers or other computer systems) for automated processing to enable automated or human actions, driving speeds and scales unseen by the existing Internet. Distributed video cameras will play important roles in various IoT/M2M applications. To resolve the problems of high data rate, high power consumption, and large deployment cost of large-scale distributed video sensors, perpetual video cameras, where net energy consumption is almost zero, are required. Many technologies and design challenges are introduced for designing such cameras, such as energy harvesting, distributed video coding, distributed video analysis, and the associated VLSI designs. To bring up these issues and challenges, in this tutorial, we will provide (1) an overview of challenges/opportunities in M2M, (2) an introduction of distributed smart cameras in M2M applications, (3) the analysis of power consumption of distributed cameras, (4) an introduction of energy harvesting techniques, (5) distributed video coding and (6) distributed video analysis techniques, where both the state-of-the-art works and possible future research directions will be shown. Finally, we will conclude this tutorial with some possible applications.