[英]I am using ffmpeg library in my program to record video and audio
I want to record video coming from a camcorder to a wmv file. 我想将视频从摄录机录制到WMV文件。 I am using ffmpeg libraries and I have it saving the video as an "avi" file.
我正在使用ffmpeg库,并将其保存为“ avi”文件。 However the requirements of the project is to output a wmv file.
但是,该项目的要求是输出wmv文件。 Can anyone help me discover how to set up the video and audio codecs?
谁能帮助我发现如何设置视频和音频编解码器?
You can configure for video codec as MPEG4 and audio codec as Windows media audio 2 to get the .wmv file format. 您可以将视频编解码器配置为MPEG4,将音频编解码器配置为Windows Media Audio 2,以获取.wmv文件格式。
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. 当您使用ffmpeg生成WMV格式时,输出视频质量可能会比其他格式稍差。 So it is better to set the qscale value to get better quality video.
因此最好设置qscale值以获得更好质量的视频。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.