ffmpeg 截断输出文件而不返回明确错误

ffmpeg 截断输出文件而不返回明确错误

我正在使用 ffmpeg 管道转码一个持续时间为 1:42:92 的文件。输出文件被截断(持续时间为 30 秒),没有任何关于输出文件短于输入的警告。在这种情况下,有没有办法让 ffmpeg 退出并出现错误?

这是管道:

ffmpeg -i test.mp4 -y -b:a 64k -ac 2 -ar 48000 -vcodec libx264 -b:v 2000k -filter:v scale=w=1280:h=720 -maxrate 2100k -bufsize 10000k -threads 4 -movflags faststart test_hd.mp4 我可以在标准输出中看到以下错误: frame= 794 fps= 24 q=23.0 q=21.0 q=23.0 q=9.0 q=0.0 q=0.0 size= 7677kB time=00:00:33.47 bitrate=1878.8kbits/s \r[h264 @ 0x76356a0] AVC: nal size 2322 Last message repeated 1 times [h264 @ 0x76356a0] concealing 3060 DC, 3060 AC, 3060 MV errors in P frame [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37235e0] stream 0, offset 0xfc6c7a: partial file test.mp4: Invalid data found when processing input frame= 806 fps= 24 q=23.0 q=21.0 q=23.0 q=10.0 q=0.0 q=0.0 size= 7802kB time=00:00:33.96 bitrate=1881.9kbits/s \r[mov,mp4,m4a,3gp,3g2,mj2 @ 0x37235e0] stream 1, offset 0xfe720d: partial file test.mp4: Invalid data found when processing input [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37235e0] stream 1, offset 0xfe74aa: partial file test.mp4: Invalid data found when processing input [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37235e0] stream 1, offset 0xfe77a5: partial file test.mp4: Invalid data found when processing input [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37235e0] stream 1, offset 0xfe7a11: partial file test.mp4: Invalid data found when processing input frame= 818 fps= 24 q=23.0 q=21.0 q=23.0 q=8.0 q=0.0 q=0.0 size= 7953kB time=00:00:33.96 bitrate=1918.2kbits/s \r[mov,mp4,m4a,3gp,3g2,mj2 @ 0x37235e0] stream 1, offset 0xfe7c7b: partial file test.mp4: Invalid data found when processing input [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37235e0] stream 1, offset 0xfe7ec1: partial file test.mp4: Invalid data found when processing input [mp4 @ 0x381fc40] Starting second pass: moving the moov atom to the beginning of the file frame= 819 fps= 22 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 q=-0.0 q=-0.0 size= 8491kB time=00:01:42.92 bitrate= 675.9kbits/s
video:14041kB audio:668kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0x381eb00] frame I:5 Avg QP: 6.17 size: 53165 [libx264 @ 0x381eb00] frame P:207 Avg QP:11.84 size: 28073 [libx264 @ 0x381eb00] frame B:607 Avg QP:15.44 size: 3820 [libx264 @ 0x381eb00] consecutive B-frames: 0.9% 0.5% 1.5% 97.2% [libx264 @ 0x381eb00] mb I I16..4: 62.8% 22.5% 14.7% [libx264 @ 0x381eb00] mb P I16..4: 0.8% 3.1% 1.0% P16..4: 30.7% 23.4% 16.5% 0.0% 0.0% skip:24.6% [libx264 @ 0x381eb00] mb B I16..4: 0.0% 0.1% 0.0% B16..8: 34.2% 4.8% 0.9% direct: 1.4% skip:58.6% L0:40.5% L1:50.4% BI: 9.1% [libx264 @ 0x381eb00] 8x8 transform intra:49.5% inter:69.2% [libx264 @ 0x381eb00] coded y,uvDC,uvAC intra: 57.1% 69.6% 59.5% inter: 12.0% 17.0% 2.2% [libx264 @ 0x381eb00] i16 v,h,dc,p: 72% 8% 6% 14% [libx264 @ 0x381eb00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 25% 28% 4% 5% 5% 6% 4% 6% [libx264 @ 0x381eb00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 23% 15% 5% 8% 7% 7% 5% 6% [libx264 @ 0x381eb00] i8c dc,h,v,p: 61% 18% 17% 5% [libx264 @ 0x381eb00] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x381eb00] ref P L0: 63.4% 5.6% 22.1% 8.9% [libx264 @ 0x381eb00] ref B L0: 90.0% 8.2% 1.8% [libx264 @ 0x381eb00] ref B L1: 94.8% 5.2% [libx264 @ 0x381eb00] kb/s:1968.29

相关内容