FirstBorg
14th April 2013, 17:53
Hi,
I had some parts lying around so I build my self a dashcam for my car, out of a webcam and an old laptop. I use a minimal debian system and ffmpeg to do the capturing. When the car starts, the laptop boots and starts capturing. Now, wenn I turn off the car, since the laptop has no battery left, it immediately shuts down.
The problem now is, that the created avi file seems to be corrupted. For example, I was driving around for an hour yesterday, and the laptop was capturing the entire time. But when I open the file in VLC, it says that it only captured about 30 minutes. BUT, if I reach the end, VLC just keeps playing. So the video is there! In addition, I can only jump to a specific time at the end of the video as VLC thinks it ends.
So, my question is, is there an option to give ffmpeg so that it saves some kind of special frames (I really have no real clue on the theory of this) so that the video is not corrupted when the laptop suddenly turns of without a proper shutdown?
In addition, one more question. I had the idea to also add a gps reciever to the laptop. I could then read the coordinates every second and calculate speed and drive distances. Is there a way to put this text directly into the video? Or would I need to save it to a text file and then somehow load it as a subtitle?
Thx.
I had some parts lying around so I build my self a dashcam for my car, out of a webcam and an old laptop. I use a minimal debian system and ffmpeg to do the capturing. When the car starts, the laptop boots and starts capturing. Now, wenn I turn off the car, since the laptop has no battery left, it immediately shuts down.
The problem now is, that the created avi file seems to be corrupted. For example, I was driving around for an hour yesterday, and the laptop was capturing the entire time. But when I open the file in VLC, it says that it only captured about 30 minutes. BUT, if I reach the end, VLC just keeps playing. So the video is there! In addition, I can only jump to a specific time at the end of the video as VLC thinks it ends.
So, my question is, is there an option to give ffmpeg so that it saves some kind of special frames (I really have no real clue on the theory of this) so that the video is not corrupted when the laptop suddenly turns of without a proper shutdown?
In addition, one more question. I had the idea to also add a gps reciever to the laptop. I could then read the coordinates every second and calculate speed and drive distances. Is there a way to put this text directly into the video? Or would I need to save it to a text file and then somehow load it as a subtitle?
Thx.