FFMPEG and ROAV Dash Cam C1 Pro

I recently purchased a dedicated dashcam on sale to replace my GoPro setup for trip videos. This gives me a new need to understand a new file format.

2018-05-18

The Roav Dashcam stores sequential mp4 files. When configuring the camera it’s possible to set the loop time, which is the duration of each mp4. There’s also an option to watermark the files. I have it turned on, and the only thing I’ve noticed is the ROAV logo, timestamp, and speed in the bottom right. It does not appear to have a way of adjusting the size of the text.

My initial recordings were set to run at 1080p 60 fps. I wanted to concatenate multiple files, add some text of my own, and speed up the video. This was my first experience using the -filter_complex option of FFMPEG. Here’s what I came up with to put together three files, speed the output up by a factor of 60, and add some text. I’m dropping the audio completely. The ROAV can record audio inside the car, but I configured it not to, as I don’t want to hear what I was listening to on the radio or what I might be saying if I make a phone call..

ffmpeg.exe -hide_banner -i 2018_0512_130537_050A.MP4 -i 2018_0512_131537_051A.MP4 -i 2018_0512_132537_052A.MP4 -filter_complex "[0:v] [1:v] [2:v] concat=n=3:v=1 [v];[v]setpts=0.01666*PTS,drawtext=fontfile=C\\:/WINDOWS/Fonts/consola.ttf:fontcolor=white:fontsize=80:y=main_h-text_h-50:x=50:text=WimsWorld[o]" -map "[o]" -c:v libx265 -crf 23 -preset veryfast -movflags +faststart -bf 2 -g 15 -pix_fmt yuv420pĀ  FirstMixSpeed60Concat.mp4

This first video was recorded at 1080p60. The camera can record at 1440p30 which I will be trying soon to see if things like license plates are more legible. The setpts factor that I’m currently using was 1/60, so that 1 minute of real time was compressed to 1 second of video, and just dropping the extra frames. I expect to need to change the setpts factor to 1/30 because of the decreased frame rate at the higher resolution.

exiftool to manage DJI media files

DJI Drones don’t seem to remember the image count between formats of a media card. This creates a problem for me when I’m trying to backup and maintain my images and video.

Because the dates are all correct in the media files, retrieved from GPS data, organizing the files by naming them based on the date works for me.

UsingĀ ExifTool by Phil Harvey is a great solution for pulling the metadata from the files and renaming the files.

The command line that I was initially using is:

exiftool "-FileName<${CreateDate}.$filetype" -d %Y%m%d-%H%M%S%%-c -ext mp4 -ext dng -ext jpg dji*

It’s problem is that it orphans the SRT subtitle files from my videos that I’d like to keep matching the video files.

I’ve tried this variation to do it in one step but it doesn’t work, because the SRT files get renamed as MP4 files.

exiftool -verbose "-FileName<${CreateDate}" -d %Y%m%d-%H%M%S%%-c.%%le -ext mp4 -ext dng -ext jpg dji* -srcfile %f.srt

If anyone has a suggestion for how to rename all the media files in one directory I’d appreciate it. Even running two commands in sequence would be fine.

Update:

I’ve figured out that running these two commands in sequence will get me the results I am looking for:

exiftool "-FileName<${CreateDate}" -d %Y%m%d-%H%M%S%%-c.srt -ext mp4 -srcfile %f.srt dji*
exiftool "-FileName<${CreateDate}" -d %Y%m%d-%H%M%S%%-c.%%le -ext mp4 -ext dng -ext jpg dji*

I’m still looking for a way of doing it in a single command that may leave less room for error, but this is working for now.

My first “Maker Space” visits.

In the projects I’ve been working on, I’ve been wandering around looking for small electronics parts. I like visiting Fry’s Electronics when I know what I want, or at least have a good idea, but the closest one to me is 15 miles away through some of the worst traffic in the area.

A few weeks ago when I was looking in a small electronics store within easy walking distance of where I live, Metrix Create:Space was recommended for me to try. It was slightly farther away, but easily within driving or bus distance, and with operating hours from noon to midnight 7 days a week, easy to visit without worrying too much about traffic.

The first time I went in, I was looking for a small plug that would allow me to power a small USB hub from a 5 volt battery. I have the hub and it’s 110 Volt wall power adapter with a description that the center is the positive pin, so I had an example part of both sex to make sure I was getting what I wanted. There was a person behind the counter with the cash register on it when I walked in, so I asked her if they had the part I was looking for. I she indicated that she didn’t know, but that I was welcome to look around. I got the impression that she wasn’t very interested in helping me. The counter had a stack of basic task description flyers for the place, listing prices for basic workspace use, soldering station use, textile station use, 3D Printer use, CNC Router use, etc.. Looking at the list was interesting to me. In a confused and slightly flustered state, I tried to ask how the space worked and what was involved in doing anything there. I was met with a blank stare. As I was about to give up and leave, a second person came past and started talking to me about how the pricing structure worked, that I could just pay per hour, for various things that I wanted to do, and she showed me some of the different stations they have, including multiple types of 3D printers, the soldering station, the milling machine, and laser cutter/engraver. She indicated that they didn’t have many standard electronic parts as an off the shelf supplier, but might have what I was looking for in odds and ends drawers off to the side of the counter and I was welcome to look through them. I was somewhat intimidated by the entire place. It reminded me of a garage workshop with mismatched but functional furniture and too many things crammed into a small space, but a place that could be extremely comfortable when you knew how it worked. I didn’t spend much time looking for the specific part I was wanting, but decided I’d return when I had the part to at least use the soldering station. I also noticed one of the few retail style items they were selling was lengths of electro luminescent wire and a battery powered driver by SeattleLumin http://www.seattlelumin.com/. I thought that had some fun applications, but would purchase it sometime later.

A week later, after finding the plug I needed, I returned to try out the soldering space. Because I had decided that using the soldering station for the time to solder on a single connection seemed overkill, I decided to resolder the connections of the ESCs on my UAV to the power distribution board in a different orientation, so I could have the mounting platform extensions on the board facing fore and aft instead of the the sides.

The process worked simply. I gave them my name, and they made a note on a pad when I started working at the standard workshop. After disassembling the screwed in parts of my UAV at the regular table rate, I said I was ready to use the soldering station and another note of the time was made. I worked on my project on the soldering station for an hour and a half, largely due to my own soldering inexperience. I managed to get the job done, and then moved back to the simple workspace to complete the reassembly. Because I was frustrated with the effort I’d expended doing the work, I was happy to pay for the time and leave.

As I was in my car driving home through traffic I remembered that I’d wanted to by some EL wire for playing with the following evening, but I was not in a mood to turn back. Knowing that they’d be open until midnight, I decided I could revisit close to 11pm if I really wanted to.

Around 11pm, after having had dinner and relaxing for a few hours, I drove back up to Metrix to get the wire. There were several people standing around when I went in, some of which I’d recognized as having been there while I was working earlier in the day.

I asked how the lumiwire worked, could it be cut, what kind of batteries it used and some other details. I had one of the people helping me, demonstrating the various colors they had, its capabilities, and that it ran on AA batteries. I mentioned that I’d been in earlier in the day and was thinking of using the lumiwire as part of a nighttime landing pad for my UAV, demonstrating in an easily visible method how well the Return To Launch feature of the APM board was working even at night.

I ended up standing around for 15 or 20 minutes talking with the group there about what I’d been doing with the UAV project, how the EL wire actually worked, and what it’s applications might be, and a few other random tech subjects. The late night sharing of information really got me to understanding the value of having a space like this. I expect to go back again soon, when I need to put together something physical. I really want to try out laser etching, but haven’t yet figured out how to start, or what I want to do.