[FFmpeg-user] Help to create an ffmpeg command needed.

dany at faceflow.com dany at faceflow.com
Sun Nov 22 23:26:50 CET 2015


Hi,

Here’s a longer version with more details of a previous email I’ve sent:

I have have several a/v files and I need to combine segments of it (either a video-only or audio-only segment) in one final output of a specific length.

For example, I have data (I use JavaScript) that looks like:

var outputFileLength = 50; // seconds the output file should be

[
 { filePath: 'user_1_0.mp4',
   streamType: 'video',
   outputFilePlaybackTime: '0.00',
   duration: '13.64',
   filePlaybackTime: '0.00',
 },
 { filePath: 'user_1_0.mp4',
   streamType: 'video',
   outputFilePlaybackTime: '15.10',
   duration: '3.56',
   filePlaybackTime: '13.64',
 },
 { filePath: 'user_1_0.mp4',
   streamType: 'audio',
   outputFilePlaybackTime: '0.00',
   duration: '18.65',
   filePlaybackTime: '17.20',
 },
 { filePath: ‘user_1_1.flv',
   streamType: 'video',
   outputFilePlaybackTime: '44.84',
   duration: '4.03',
   filePlaybackTime: '0.00’,
 }
]

So in this case, there are 2 files in which to take segments from.

The first object is of type “video” (only video should be taken for the segment) - it’s a segment that starts at 0 seconds of the file (filePlaybackTime), lasts 13.64 seconds (duration), and video segment should be inserted at 0 second of the output file (outputFilePlaybackTime).

The second object is also of type “video”’ it’s a segment that starts at 0 seconds of the file, lasts 13.64 seconds, and video segment should be inserted at 0 second of the output file.

Third object is of type “audio” the only, it’s like the above but only audio is taken for the segment.

Same logics for fourth object (however that one is .flv format)

How could the ffmpeg command look like to achieve my goal with that data?

Thank you
Dany Pelletier
Developer, Demio.com <http://demio.com/>

Ps.: The company I work for would be ready to pay.




More information about the ffmpeg-user mailing list