I am using raspbian for a project.
Here is my situation. I'm creating three files:
- a wav file with a filename format of [date_and_timestamp].wav.
- an avi file with a filename format of [date_and_timestamp].avi.
- a file with the name marker_[date_and_timestamp]
The value of [date_and_timestamp] is consistent across all three files.
What I want to do is look for all files starting with marker_, get the [date_and_timestamp] portion and use it to pass as a parameter to ffmpeg
to combine the two files (i.e. ending up with a command that looks like
ffmpeg -i /home/motion/[date_and_timestamp].avi -i /home/motion/[date_and_timestamp].wav /home/motion/[date_and_timestamp].mp4
Given how powerful sh
is, I know there will be a way, but I am far to n00bish to know what it is.
The square brackets are there for clarity. They do not appear in the filenames.