【问题标题】:FFmpeg command works locally but not on Azure Batch ServiceFFmpeg 命令在本地工作,但不适用于 Azure Batch Service
【发布时间】:2018-08-10 23:46:07
【问题描述】:

我有一个命令,它使用 FFmpeg 生成带有背景和文本的视频,并希望使用 Azure Batch 服务对其进行渲染。我的命令在本地有效:

./ffmpeg -f lavfi -i color=c=green:s=854x480:d=7 -vf "[in]drawtext=fontsize=46:fontcolor=White:text=dfdhjf dhjf dhjfh djfh djfh:x= (w-text_w)/2:y=((h-text_h)/2)-48,drawtext=fontsize=46:fontcolor=White:text=djfh djfh djfh djfh djf jdhfdjf hjdfh djfh jd fhdj:x=(w- text_w)/2:y=(h-text_h)/2,drawtext=fontsize=46:fontcolor=White:text=fh:x=(w-text_w)/2:y=((h-text_h)/2) +48[out]" -y StoryA.mp4

虽然使用 C# 以编程方式生成并在批处理服务返回失败中添加为任务:

cmd /c %AZ_BATCH_APP_PACKAGE_ffmpeg#3.4%\ffmpeg-3.4-win64-static\bin\ffmpeg -f lavfi -i color=c=green:s=854x480:d=7 -vf "[in]drawtext=fontsize =46:fontcolor=White:text=dfdhjf dhjf dhjfh djfh djfh:x=(w-text_w)/2:y=((h-text_h)/2)-48,drawtext=fontsize=46:fontcolor=White:text = djfh djfh djfh djfh djf jdhfdjf hjdfh djfh jd fhdj:x=(w-text_w)/2:y=(h-text_h)/2,drawtext=fontsize=46:fontcolor=White:text=fh:x=(w -text_w)/2:y=((h-text_h)/2)+48[out]" -y StoryA.mp4

ffmpeg 配置有效,池也有效,因为我已经使用具有输入和输出文件的更简单的 ffmpeg 命令对其进行了测试。这个命令没有输入文件,也许这是问题的一部分?

谢谢

【问题讨论】:

    标签: azure ffmpeg azure-batch


    【解决方案1】:

    如果您的 ffmpeg 命令需要您建议的输入文件,则该文件需要成为 CloudTask 规范的一部分(或其他将其输入到批处理计算节点的方式,例如作业准备或启动任务,如果它有道理)作为ResourceFile

    这些资源文件应放置在 Azure Blob 存储中。生成一个 SAS URL(具有适当的读取权限和足够的结束时间)并将其用作 ResourceFile 的BlobSource

    【讨论】:

    • 使用输入文件可能会起作用,但我想在没有输入文件的情况下按原样使用该命令
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-30
    • 1970-01-01
    相关资源
    最近更新 更多