我正在尝试连接同一输入视频的各个部分,但其中一个速度加快了 20 倍。我正在使用的代码是这样的:
ffmpeg -i 7.mp4 -filter_complex "[0:v]select='between(t,0,9)',setpts=PTS-STARTPTS[vn];[0:a]aselect='between(t,0,9)',asetpts=PTS-STARTPTS[an];[0:v]select='between(t,191,1174)',setpts=(1/20)*(PTS-STARTPTS)[vr];[0:a]aselect='between(t,191,1174)',atempo=20,asetpts=PTS-STARTPTS[ar];[vn][an][vr][ar]concat=n=2:v=1:a=1[vid]" -map [vid] -c:v libx265 -tag:v hvc1 -crf 23 -preset slow "output5.mp4"
知道我做错了什么吗,关于无法分配内存部分我有 16 GB 内存并且只运行 ffmpeg....
错误:
[h264 @ 00000181d923ccc0] get_buffer() failed
[h264 @ 00000181d923ccc0] thread_get_buffer() failed
[h264 @ 00000181d923ccc0] decode_slice_header error
[h264 @ 00000181d923ccc0] no frame!
[fc#0 @ 00000181d91dbdc0] Task finished with error code: -12 (Cannot allocate memory)peed=0.0342x
[fc#0 @ 00000181d91dbdc0] Terminating thread with return code -12 (Cannot allocate memory)
[vist#0:0/h264 @ 00000181db1bbcc0] [dec:h264 @ 00000181d91e4680] Error submitting packet to decoder: Invalid data found when processing input