ffmpeg 输出 gource 失败,我该如何修复? - 解码流 #0:0 时出错:处理输入时发现无效数据

ffmpeg 输出 gource 失败,我该如何修复? - 解码流 #0:0 时出错:处理输入时发现无效数据

ffmpeg 版本 4.2.2 Gource v0.51

运行 ffmpeg 从 Gource 输出生成 mp4:

ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i clearcase.ppm -err_detect ignore_err -vcodec libx264 -preset slow -pix_fmt yuv420p -crf 10 -threads 0 -bf 0 clearcase.mp4 -report

它似乎找到了一个很好的方法然后抛出了这个:

Output #0, mp4, to 'clearcase.mp4':
  Metadata:
    encoder         : Lavf58.35.104
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720, q=-1--1, 60 fps, 15360 tbn, 60 tbc
    Metadata:
      encoder         : Lavc58.66.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Error while decoding stream #0:0: Invalid data found when processing inputkbits/s speed=0.0751x
frame=27040 fps=4.5 q=-1.0 Lsize=  476966kB time=00:07:30.65 bitrate=8670.4kbits/s speed=0.0752x
video:476853kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.023807%
[libx264 @ 000002bae2679380] frame I:109   Avg QP: 4.72  size:101295
[libx264 @ 000002bae2679380] frame P:26931 Avg QP:13.81  size: 17721
[libx264 @ 000002bae2679380] mb I  I16..4: 57.6% 18.9% 23.6%
[libx264 @ 000002bae2679380] mb P  I16..4:  0.3%  0.2%  0.1%  P16..4: 13.6%  3.9%  3.1%  0.0%  0.0%    skip:78.9%
[libx264 @ 000002bae2679380] 8x8 transform intra:26.0% inter:19.2%
[libx264 @ 000002bae2679380] coded y,uvDC,uvAC intra: 27.9% 24.0% 19.0% inter: 11.0% 6.4% 4.8%
[libx264 @ 000002bae2679380] i16 v,h,dc,p: 78% 13%  5%  4%
[libx264 @ 000002bae2679380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21%  9% 42%  4%  5%  5%  5%  5%  5%
[libx264 @ 000002bae2679380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 16% 17%  7%  9%  8%  9%  8% 10%
[libx264 @ 000002bae2679380] i8c dc,h,v,p: 76% 12%  8%  4%
[libx264 @ 000002bae2679380] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000002bae2679380] ref P L0: 74.5%  6.8%  7.8%  4.4%  3.3%  3.3%
[libx264 @ 000002bae2679380] kb/s:8667.98

ppm 由 Gource 通过以下方式生成:

gource allvobs_gource.log -1280x720 --seconds-per-day .25 --key --date-format "%Y-%m-%d %H:%M" --title "ClearCase all VOBs" --hide filenames --user-scale 4 --bloom-multiplier .4 --logo C:\Users\sam.mackrill\Pictures\cadcentre3.jpg -b 000000 --highlight-dirs --dir-name-depth 3 --multi-sampling -o d:\clearcase.ppm

ffmpeg 日志显示以下内容:

 :
[libx264 @ 000002bae2679380] frame=27037 QP=17.44 NAL=2 Slice:P Poc:74  I:9    P:1004 SKIP:2587 size=23659 bytes
[libx264 @ 000002bae2679380] frame=27038 QP=18.61 NAL=2 Slice:P Poc:76  I:9    P:972  SKIP:2619 size=21227 bytes
[libx264 @ 000002bae2679380] frame=27039 QP=20.23 NAL=2 Slice:P Poc:78  I:11   P:817  SKIP:2772 size=14857 bytes
frame=27040 fps=4.5 q=-1.0 Lsize=  476966kB time=00:07:30.65 bitrate=8670.4kbits/s speed=0.0752x    
video:476853kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.023807%
Input file #0 (clearcase.ppm):
  Input stream #0:0 (video): 27041 packets read (74760624672 bytes); 27040 frames decoded; 
  Total: 27041 packets (74760624672 bytes) demuxed
Output file #0 (clearcase.mp4):
  Output stream #0:0 (video): 27040 frames encoded; 27040 packets muxed (488297036 bytes); 
  Total: 27040 packets (488297036 bytes) muxed
27040 frames successfully decoded, 1 decoding errors
[AVIOContext @ 000002bae267a700] Statistics: 2 seeks, 1866 writeouts
[libx264 @ 000002bae2679380] frame I:109   Avg QP: 4.72  size:101295
[libx264 @ 000002bae2679380] frame P:26931 Avg QP:13.81  size: 17721
[libx264 @ 000002bae2679380] mb I  I16..4: 57.6% 18.9% 23.6%
[libx264 @ 000002bae2679380] mb P  I16..4:  0.3%  0.2%  0.1%  P16..4: 13.6%  3.9%  3.1%  0.0%  0.0%    skip:78.9%
[libx264 @ 000002bae2679380] 8x8 transform intra:26.0% inter:19.2%
[libx264 @ 000002bae2679380] coded y,uvDC,uvAC intra: 27.9% 24.0% 19.0% inter: 11.0% 6.4% 4.8%
[libx264 @ 000002bae2679380] i16 v,h,dc,p: 78% 13%  5%  4%
[libx264 @ 000002bae2679380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21%  9% 42%  4%  5%  5%  5%  5%  5%
[libx264 @ 000002bae2679380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 16% 17%  7%  9%  8%  9%  8% 10%
[libx264 @ 000002bae2679380] i8c dc,h,v,p: 76% 12%  8%  4%
[libx264 @ 000002bae2679380] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000002bae2679380] ref P L0: 74.5%  6.8%  7.8%  4.4%  3.3%  3.3%
[libx264 @ 000002bae2679380] kb/s:8667.98
[AVIOContext @ 000002bae1b27a80] Statistics: 74760624672 bytes read, 0 seeks

我该如何解决这个问题?任何想法都值得感激。

答案1

用户错误!问题是 Gource 提前退出,没有通知我(磁盘已满?),导致 ppm 处于损坏状态

相关内容