Skip to content

A simple camera application built using OpenCV,PyAudio and FFMPEG

Notifications You must be signed in to change notification settings

adityamd/Camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Camera

This project is a simple camera application built using OpenCV,PyAudio,FFMPEG and Tkinter that can click images, record videos with audio and save them. The application looks like:


Sample Image:



Few Points to note here are:
  • The button "Click" clicks a picture and saves it in the current working folder as "Image_1.jpg".
  • The button "Record" starts recording the audio and video until you press it again that stops the recoring. The video is saved as "Video0.mp4".
  • Use "Exit" button to exit the application.
  • Note: Using the Close application button on top right corner will not release the web-cam.
  • You must not have any file named "Image_1.jpg" or "Video0.mp4" in order to save the images or recordings correctly.

Installation Procedure

Installing Python:

You can install python(3.8.5) directly here or go to the page https://www.python.org/downloads/ and click "Download Python 3.8.5". Don't forget to check the box "Add To Path", once you launch the installation wizard.
To check if python is installed correctly and is added to your path, go to the command prompt/powershell/terminal on your system and type 'python'.



Installing Pip:

Pip is a very convinient and efficient packet manager used to download different python modules. It will be useful in installing OpenCV. To install pip, download get-pip.py file and execute it using the following comands:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

Fire command pip list on your cmd/powershell/terminal to check if pip is installed correctly on your system.



Installing OpenCV:

The next step to run the project is to install OpenCV. You can install OpenCV using the command:

pip install opencv-python

Fire command pip list on your cmd/powershell/terminal and look for 'opencv-python' to check if opencv is installed correctly on your system.



Installing PyAudio:

PyAudio is a python module that helps playing with the audio. You can play,record,save or analyze any sound or audio stream using this library. To install it, simply fire the command pip install pyaudio on your system cmd/powershell/terminal. To confirm pyaudio download, head to the terminal and type pip list. Look for pyaudio module in the output.



Installing FFMPEG:

The last and final step to run the project is installing FFMPEG on your system. FFMPEG is a command line utility that helps you muxing the audio with the video.To install FFMPEG:
  1. Head on over thhe link below
  2. http://ffmpeg.zeranoe.com/builds/
  3. Choose the file you want to download based on your system requirements (static version is recommended).
  4. After downloading, unzip the file on your local system
  5. Lastly, in order to use this utility anywhere, you will need to add FFMPEG to the path. For this, head over to the directory where you have extracted the file. Go to bin folder and copy the path. Now, search for "Edit the system environment variables" in Windows search bar, click on "Environment Variables", look for the option "Path"in System Variables section,click on it, click "New" and paste the path to "bin" folder.
In order to check, if FFMPEG is installed correctly and added to path, open your system cmd/powershell/terminal and type ffmpeg.

Run The Application

To run the application:
  1. Open cmd/powershell/terminal on your system and head over to the directory where you have cloned this repository.
  2. Type python camera.py
  3. You should see the application window opening.

About

A simple camera application built using OpenCV,PyAudio and FFMPEG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages