I am going to make an AVI file that includes multiple video clips and related information. For example, a vehicular black box with two camera channels (rear cam and front cam) needs to include the two video clips and an accelerator sensor value into an AVI file. Currenly, I am working on Linux and using ffmpeg for the AVI file generation but, I have no idea how to encapsulate the multiple data (two h264 videos and a sensor value related) into a single AVI file. Can anybody help me?
Asked
Active
Viewed 237 times
1 Answers
2
Putting two video tracks into a single output can be achieved using -map and multiple inputs
eg
ffmpeg -i file1.avi -i file2.avi -map 0:v -map 1:v out.avi
Which says, use file1.avi and file2.avi as the input, take the video from file1.avi and the video from file2.avi and output them to out.avi
The accelerator sensor value may depend on the format of your data, is it already present in your input files as a data track? if so use -map 0:d and -dcodec copy

user3770489
- 186
- 4