The optimization process failed on two anime episodes out of 26, and I looked in the Plex logs to find clues. I re-ran the PlexNewTranscoder command and this is the last few lines showing the failure. My guess is that the original AVI is missing a few frames or something and it's crashing ffmpeg. Some googling of those errors confirm that similar problems have been identified and patched.
Any suggestions?
[libx264 @ 02c7ec20] frame=44386 QP=11.00 NAL=2 Slice:P Poc:164 I:3 P:13 SK
IP:314 size=77 bytes
[output stream 0:0 @ 02c0c020] EOF on sink link output stream 0:0:default.
*** 5 dup!
[libx264 @ 02c7ec20] frame=44387 QP=11.00 NAL=2 Slice:P Poc:166 I:3 P:13 SK
IP:314 size=77 bytes
[libx264 @ 02c7ec20] frame=44388 QP=11.00 NAL=2 Slice:P Poc:168 I:3 P:13 SK
IP:314 size=77 bytes
[libx264 @ 02c7ec20] frame=44389 QP=11.00 NAL=2 Slice:P Poc:170 I:3 P:13 SK
IP:314 size=77 bytes
[libx264 @ 02c7ec20] frame=44390 QP=11.00 NAL=2 Slice:P Poc:172 I:3 P:13 SK
IP:314 size=77 bytes
[libx264 @ 02c7ec20] frame=44391 QP=11.00 NAL=2 Slice:P Poc:174 I:3 P:10 SK
IP:317 size=67 bytes
[libx264 @ 02c7ec20] frame=44392 QP=11.64 NAL=2 Slice:P Poc:176 I:3 P:4 SK
IP:323 size=43 bytes
[output stream 0:1 @ 02c0bd40] EOF on sink link output stream 0:1:default.
*** 5 dup!
[libx264 @ 02c7ec20] AVFrame.format is not set
[libx264 @ 02c7ec20] AVFrame.width or height is not set
[libx264 @ 02c7ec20] Input picture width (352) is greater than stride (0)
Video encoding failed
[AVIOContext @ 02c816e0] Statistics: 0 seeks, 108185 writeouts
[libx264 @ 02c7ec20] frame I:538 Avg QP:17.39 size: 13091
[libx264 @ 02c7ec20] frame P:43855 Avg QP:19.18 size: 2660
[libx264 @ 02c7ec20] mb I I16..4: 18.1% 0.0% 81.9%
[libx264 @ 02c7ec20] mb P I16..4: 4.8% 0.0% 0.0% P16..4: 50.0% 0.0% 0.0%
0.0% 0.0% skip:45.2%
[libx264 @ 02c7ec20] coded y,uvDC,uvAC intra: 65.3% 64.4% 35.0% inter: 23.7% 19.
0% 5.8%
[libx264 @ 02c7ec20] i16 v,h,dc,p: 35% 27% 30% 7%
[libx264 @ 02c7ec20] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 23% 13% 6% 6% 5% 7%
5% 7%
[libx264 @ 02c7ec20] i8c dc,h,v,p: 47% 25% 22% 5%
[libx264 @ 02c7ec20] Weighted P-Frames: Y:1.1% UV:0.5%
[libx264 @ 02c7ec20] kb/s:667.98
[aac @ 02c81200] 2 frames left in the queue on closing
[AVIOContext @ 02c230e0] Statistics: 176606726 bytes read, 5 seeks
Conversion failed!