Ask Your Question

Add audio channel to a video created with OpenCv

asked 2014-06-24 03:04:03 -0600

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.

edit retag flag offensive close merge delete



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

berak gravatar imageberak ( 2014-06-24 03:08:24 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-05-04 11:04:16 -0600

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

edit flag offensive delete link more

Question Tools


Asked: 2014-06-24 03:04:03 -0600

Seen: 7,821 times

Last updated: May 04 '17