我正在尝试修复此 FFMPEG 命令来录制音频。
我曾尝试使用官方 stackoverflow 网站上推荐的部件,但它们没有用
原始命令ffmpeg_stream = '/usr/bin/ffmpeg -f x11grab -s 1280x720 -r 24 -i :%d+nomouse -c:v libx264 -preset superfast -pix_fmt yuv420p -s 1280x720 -threads 0 -f flv "%s"' % (xvfb.new_display, info['destination'])
带有尝试音频的命令ffmpeg_stream = '/usr/bin/ffmpeg -f x11grab -s 1280x720 -r 24 -i :%d+nomouse -c:v libx264 -preset superfast -pix_fmt yuv420p -s 1280x720 -threads 0 -f alsa -ac 2 -i hw:0 -f flv "%s"' % (xvfb.new_display, info['destination'])
最佳答案
FFmpeg 期望在命令行中有一个特定的安排:首先是所有输入,然后是输出。
所以,ffmpeg_stream = '/usr/bin/ffmpeg -f x11grab -video_size 1280x720 -framerate 24 -i :%d+nomouse -f alsa -channels 2 -i hw:0 -c:v libx264 -preset superfast -pix_fmt yuv420p -f flv "%s"' % (xvfb.new_display, info['destination']
关于python - 如何修复这个 FFMPEG 命令来录制音频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50421185/