ffmpeg - 关于使用 ffmpeg 的输出文件名
问题描述
我一直在尝试保持输出文件名与输入文件名相同。代码看起来像
async def output_directory, total _ time, message ,chan_msg) :
out_put_file_name = output_directory + \
"/" + str(round(time.time())) +
". mp4"
progress = output_directory + "/" + "progress.txt"
With open(progress, 'w') as f:
pass
file_genertor_command =
"ffmpeg" ,
" -hide_banner "
" -loglevel" ,
"quiet" ,
" -progress"
progress ,
video file,
"-map" ,
"-c:v",
"libx265"
" -pix_fmt" ,
"yuv420p" ,
"-preset" ,
"medium" ,
"800X480" ,
"32",
"libopus" ,
"-profile:a" ,
"aac_he v2" ,
"-ac" ,
"30k" ,
"copy" ,
out_put file name,
Done
我希望使用与输入文件名相同的名称对输出文件进行编码。正如预期的那样,在这里我将文件名作为时间戳。请建议如何完成
解决方案
推荐阅读
- python - 迭代 python 对象是 2.7。显示未找到错误
- javascript - 被服务器重定向后反应处理表单提交(带有数据)?
- python - python logger的后代-好处
- java - Spring Boot(用户''@'localhost'拒绝访问数据库'myappdb')
- python - TF Estimator:无法从保存的模型中加载 *.pb
- haskell - 我的记录字段名称与同一范围内的其他记录字段冲突
- php - 将命令作为变量传递时 proc_open 不起作用
- python-3.x - 以下的输出是什么?
- angular - 如何正确使用在角?
- matlab - 在任何偏移对角线上创建一个矩阵