我已经找到了如何将音轨编码为多种格式,我正在努力尝试找到一种在编码时将特定元数据附加到轨道的方法。我想补充一下,专辑插图,艺术家姓名,曲目名称和流派等。
我可以在音频编码参数中看到您可以设置其他FFmpeg参数,但是我不确定要使用什么来设置元数据?
{
"steps": {
"imported": {
"robot": "/s3/import",
"result": true,
"key": "AWS_KEY",
"secret": "AWS_SECRET",
"bucket": "BUCKET",
"path": "CUSTOM-PATH"
},
"mp3": {
"use": "imported",
"robot": "/audio/encode",
"result": true,
"preset": "mp3",
"ffmpeg": [],
"ffmpeg_stack": "v2.2.3"
},
"wav": {
"use": "imported",
"robot": "/audio/encode",
"result": true,
"preset": "wav",
"ffmpeg_stack": "v2.2.3"
},
"export": {
"robot": "/s3/store",
"use": [
"mp3",
"wav"
],
"key": "AWS_KEY",
"secret": "AWS_SECRET",
"bucket": "BUCKET"
}
答案 0 :(得分:0)
您可以使用" / meta / write"这里描述的机器人:8.2 Metadata Writing
以下是the official demos的示例:
<html>
<head><title>Some demo title</title></head>
<body>
<form action="/uploads" enctype="multipart/form-data" method="POST">
<input type="file" name="my_file" multiple="multiple" />
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//assets.transloadit.com/js/jquery.transloadit2-v2-latest.js"></script>
<script type="text/javascript">
$(function() {
$('form').transloadit({
wait: true,
triggerUploadOnFileSelection: true,
params: {
auth: { key: "YOUR_AUTH_KEY" },
steps: {
metadata: {
use: ":original",
robot: "/meta/write",
result: true,
data_to_write: {
album: "Discovery",
artist: "Daft Punk",
year: "1999",
}
}
}
}
});
});
</script>
</body>
</html>