我正在尝试用Google Transcoder API裁剪视频,如下所述:https://cloud.google.com/transcoder/docs/how-to/crop-videos
转码运行成功,但没有发生裁剪,并且转码作业的详细信息实际上缺少裁剪请求。
我正在使用npm @google-cloud/video-transcoder 1.5.0版本
这是json请求:
{
"parent": "projects/.../locations/us-central1",
"job": {
"config": {
"pubsubDestination": {
"topic": "projects/.../topics/..."
},
"elementaryStreams": [
{
"key": "video-stream0",
"videoStream": {
"frameRate": 30,
"widthPixels": 480,
"codec": "h264",
"heightPixels": 270,
"bitrateBps": 150000,
"preset": "slower"
}
},
{
"key": "audio-stream0",
"audioStream": {
"codec": "aac",
"bitrateBps": 2000
}
}
],
"muxStreams": [
{
"key": "g7FNokXVOuyCgw767Oz7",
"container": "mp4",
"fileName": "g7FNokXVOuyCgw767Oz7",
"elementaryStreams": [
"video-stream0",
"audio-stream0"
]
}
],
"inputs": [
{
"uri": "gs://.../g7FNokXVOuyCgw767Oz7.165.165",
"preprocessingConfig": {
"crop": {
"topPixels": 100
}
},
"key": "input0"
}
],
"output": {
"uri": "gs://.../"
}
}
}
}
当我检查工作时,我看到的是,庄稼不见了:
{
"config": {
"editList": [
{
"inputs": [
"input0"
],
"key": "atom0",
"startTimeOffset": "0s"
}
],
"elementaryStreams": [
{
"key": "video-stream0",
"videoStream": {
"bitrateBps": 150000,
"codec": "h264",
"crfLevel": 21,
"entropyCoder": "cabac",
"frameRate": 30.0,
"gopDuration": "3s",
"heightPixels": 270,
"pixelFormat": "yuv420p",
"preset": "slower",
"profile": "high",
"rateControlMode": "vbr",
"vbvFullnessBits": 135000,
"vbvSizeBits": 150000,
"widthPixels": 480
}
},
{
"audioStream": {
"bitrateBps": 2000,
"channelCount": 2,
"channelLayout": [
"fl",
"fr"
],
"codec": "aac",
"sampleRateHertz": 48000
},
"key": "audio-stream0"
}
],
"inputs": [
{
"key": "input0",
"preprocessingConfig": {
"audio": {},
"color": {},
"crop": {},
"deblock": {},
"denoise": {
"tune": "standard"
},
"pad": {}
},
"uri": "gs://.../g7FNokXVOuyCgw767Oz7.165.165"
}
],
"muxStreams": [
{
"container": "mp4",
"elementaryStreams": [
"video-stream0",
"audio-stream0"
],
"fileName": "g7FNokXVOuyCgw767Oz7",
"key": "g7FNokXVOuyCgw767Oz7"
}
],
"output": {
"uri": "gs://.../"
},
"pubsubDestination": {
"topic": "projects/.../topics/..."
}
},
"createTime": "2021-07-27T03:23:46.089Z",
"endTime": "2021-07-27T03:23:59.534Z",
"name": "projects/372477578623/locations/us-central1/jobs/220420ff5a110eaa92c66d00d1f33df6",
"startTime": "2021-07-27T03:23:52.106Z",
"state": "SUCCEEDED",
"ttlAfterCompletionDays": 30
}
有没有人有任何运气在裁剪视频与谷歌云转码器API?
[如果谷歌开发人员看到这篇文章,工作名称在片段中]
我安装了NodeJS模块,并尝试用相同的配置运行一个作业,可以确认这是复制的。
问题可能是客户端库的v1beta1原型自最初创建以来尚未同步。
我们已经创建了一个修复并部署到prod,它现在应该可以工作了。