I am using ffmpeg library in my program to record video and audio

746 views Asked by At

I want to record video coming from a camcorder to a wmv file. I am using ffmpeg libraries and I have it saving the video as an "avi" file. However the requirements of the project is to output a wmv file. Can anyone help me discover how to set up the video and audio codecs?

1

There are 1 answers

1
shri On

You can configure for video codec as MPEG4 and audio codec as Windows media audio 2 to get the .wmv file format.

 ffmpeg -i input.mp4 -b:v 2M -vcodec msmpeg4 -acodec wmav2 output.wmv

When you use ffmpeg to generate WMV format the output video quality may be slightly less than other format. So it is better to set the qscale value to get better quality video.