Ask Your Question
0

Add audio channel to a video created with OpenCv

asked Jun 24 '14

atrebbi gravatar image

How can I add an audio channel to a video created with OpenCv ? the audio channel would be a separate audio file, that i should merge with the video file.

Preview: (hide)

Comments

1

sorry, dear, opencv does not support audio at all (neither reading video, nor writing)

berak gravatar imageberak (Jun 24 '14)edit

1 answer

Sort by » oldest newest most voted
1

answered May 4 '17

VideoCurious gravatar image

You could use FFmpeg to add audio to the video you created with OpenCV. I believe the command would look something like the following:

ffmpeg -i <sourceVideoFile> -i <sourceAudioFile> -map 0:0 -map 1:0 -c:v copy -c:a copy <outputVideoFile>

Source: Add sound tracks to a video file with FFmpeg

Preview: (hide)

Question Tools

Stats

Asked: Jun 24 '14

Seen: 8,602 times

Last updated: May 04 '17