【问题标题】:Avconv command to combine image and audio file (to create a video)avconv 命令组合图像和音频文件(创建视频)
【发布时间】:2015-02-22 00:49:08
【问题描述】:

尝试执行一项简单的任务:将图像文件与音频文件组合以创建视频。我已经找到了一些使用 ffmpeg 的示例,但我使用的是基于云的 PythonAnywhere,它们只使用 avconv。

代码看起来像这样:

import os
image_file = "/dir/greenfrog.jpg"
audio_file = "/dir/AudioFile.wav"
output_file = "/dir/VideoFile.mp4"
cmd = xxxxx
os.system(cmd)

我应该如何编写 cmd 字符串来合并两个文件?在此感谢您的帮助...

【问题讨论】:

  • 你为什么不接受答案?

标签: python os.system avconv pythonanywhere


【解决方案1】:

这是你的命令:

avconv -f video4linux2 -r 25 -i /dev/video0 -f alsa -i plughw:U0x46d0x8ad,0 -ar 
22050 -ab 64k -strict experimental -acodec aac -vcodec mpeg4 -y webcam.mp4

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多