提问人:Clinton Abraham 提问时间:11/17/2023 最后编辑:Clinton Abraham 更新时间:11/21/2023 访问量:42
如何使用ffmpeg-python编辑元数据?
How to edit metadata using ffmpeg-python?
问:
import ffmpeg
input= "input.mkv"
output = "output.mkv"
title = "Clinton Abraham"
try:
datas = 'title=' + title
mains = ffmpeg.input(input)
nemos = mains.output(output, map="0", metadata=datas, c="copy")
nemos.run(quiet=True)
print("METADATA MODIFIED ✅")
except ffmpeg.Error as e:
print(e.stderr.decode('utf-8'))
现在如何编辑 -metadata:s:v, -metadata:s:a , -metadata:s:s 🤔
答:
1赞
Clinton Abraham
11/25/2023
#1
import time
import ffmpeg
inputs = "Sample video.mkv"
output = str(round(time.time())) + ".mkv"
datas = {"metadata":"title=Clinton Abraham"}
datas.update({"metadata:s:a":"description="})
datas.update({"metadata:":"comment=TELEGRAM > @DC4_WARRIOR"})
try:
main = ffmpeg.input(inputs)
nemo = main.output(output, map="0", **datas, c="copy")
nemo.run(quiet=True)
print("PROCESSED SUCCESSFULLY ⚡")
except ffmpeg.Error as e:
print(e.stderr.decode('utf-8'))
评论