I want to use a Logitech c525 and the RPi to act as a dash cam in my car.

I'm trying to achieve:

  1. Boot up and auto start recording at high res
  2. overwrite oldest videos
  3. shutdown properly when I turn my car off

I have searched for weeks with little results. I've posted on a few forums without response. I have no idea how to get this working. The closest I can get is record low quality video with ffmpeg.

  • What have you tried? It will be easier to improve on what you've got currently than to start a fresh. – Impulss Nov 4 '13 at 2:02
  • 2
    IMO, if you want High Res, you'd be better off with the Pi Camera over a USB webcam. It'll be a bit harder to setup initially, but be much better in terms of recording capability. – Lawrence Nov 4 '13 at 4:06

As Lawrence mentions, you're better off using the Pi camera as it's high res. and low CPU but you can use motion ( http://www.lavrsen.dk/foswiki/bin/view/Motion ) software to run a USB camera. Other options are 'vlc' for example.

Also check http://pidashcam.blogspot.com which uses the Pi camera for front and a USB camera for rear. The video files are deleted as required, oldest first.

Starting and stopping things can be achieved in a number of ways but can also depend on which Linux you are using. Search for your version with 'autostarting'. Shutdown could be tricky as the Pi needs to be told to shutdown gracefully for example by a button press or detecting the ignition has been switched off. If the Pi is just turned off your last video recording may have issues. I have seen webpages that do the ignition start / stop but you'll have to track them down yourself.

| improve this answer | |

There are some Linux Tools which may help you, so I'll try to write a guide.
Note: This will only record your Videos

  1. Bootup your Pi at home and open a console or terminal.

  2. Type crontab -e

    You should see something like this:

    # Shell variable for cron
    # PATH variable for cron
    #M   S     T M W   Command
    # add commands here
  3. Add the following line:

    @reboot avconv -f video4linux2 -i /dev/video0 video0.avi

    The used options for avconf are:

    • -f -> the format
    • -i /dev/video0 -> mounting point of your Webcam
    • video.avi -> your file
  4. SAVE and EXIT

Now your PI will record the Video instantly after startup.
It will also overwrite the video0.avi everytime it boots up.

| improve this answer | |
  • Schlenderman, thank you for your comment. So the camera begins to record everytime it boots up, how can we reach to the terminal to change the program? – user12200 Jan 19 '14 at 18:10

You can try dride.io, We have an open source project that does exactly that and so much more!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.