1

I have two underwater network video cameras on a deep-sea observatory that are tethered to land by a fiber optic cable and stream video data back to shore. I'd like to find a way to automatically cut or merge these video files based on their timeline. Can if it can even be done? If so, how?

Problem: The underwater cameras write a file (.asf) anytime their network connection is disrupted. This means clips of random duration, making cataloging the data difficult. Ideally, we want files of an hour in length that begin and end on the hours (e.g.: Camera1_00:00-00:59.asf, Camera1_01:00-01:59.asf, etc.). The filename of each video contains the time-stamp of the first frame. No time information is stored in the metadata.

Question: How do I join these video files and split them on the hour?
My best guess so far is something along these lines (but I have no clue how to do it):

  1. Extract the initial time-stamp from the file name
  2. Obtain the duration of the file
  3. Add the duration to the initial time stamp to get start/stop UTC time
  4. [somehow] join the videos until I have crossed over an hour boundary
  5. Split the video at the hour (I guess the time would be computed from duration and start time?)
  6. Save the 1-hour video as finished, and save to use for the start of the next hour
  7. Repeat

Note that we do have some gaps in video data, and the ideal solution could either:

  • Write multiple files for an hour (e.g.: 03:00-03:15 and 03:17-03:59)
  • Write one file that is less than an hour in length, joining the gaps with a few black frames

I have no idea how to do any of this. Is there software that can do it for me? Do I have to write some code to do this? If the latter, which language is best? What about ffmpeg?

I am open to better ideas. Thank you in advance for your help!

0

You must log in to answer this question.

Browse other questions tagged .