因此,我尝试使用ffmpeg
将视频速度更改为其速度的两倍import paho.mqtt.client as paho
import time
def on_subscribe(client, userdata, mid, granted_qos):
print('Subscribed')
def on_message(client, userdata, msg):
mybuffer = str(msg.payload)
print('on_message: '+ mybuffer)
print(mybuffer)
client = paho.Client()
client.on_subscribe = on_subscribe
client.on_message = on_message
client.connect('test.mosquitto.org')
client.subscribe('$SYS/#')
client.loop_forever()
当我从winthin命令行运行它时工作正常,并且当我在python模块中运行它时有问题 错误如下:
cmd="ffmpeg -i C:\\Users\\Samhita\\Desktop\\EDOS\\D4.mp4 -filter_complex \"[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]\" -map \"[v]\" -map \"[a]\" 2.mp4"
subprocess_call(cmd.split))