Timestamps are unset in a packet for stream X.This is deprecated and will stop working in the future

解决的办法是在ffmpeg命令后面加上“-fflags +genpts”参数重新生成pts

ffmpeg -fflags +genpts -i input.mp4 -vf scale=1280:720 -b:v 500k -vcodec libx264 -acodec aac -bf 0 output.mp4

参考:《FFMPEG转码视频源帧数据中没有PTS问题的解决