./ffmpeg -i bbb.mov -map 0:v:0 -filter_complex "amovie=loop1.aac:loop=0[loop],[0:a][loop]amerge=inputs=2,pan=stereo|c0 amerge:in0 (graph 0) Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) pan (graph 0) -> Stream #0:1 (libfdk_aac) Press [q] to stop, [?] for help Error while decoding stream #0:1: Cannot allocate memory Last message repeated 21 times Error while decoding stream #0:1: Cannot allocate memory.25 bitrate= 221.0kbits/s dup=1 drop=0 Last message repeated 18 times Error while decoding stream #0:1: Cannot allocate memory.12 bitrate= 236.0kbits/s dup=1 drop=0 Last message repeated 18 times Error while decoding stream #0:1: Cannot allocate memory.12 bitrate= 256.9kbits/s dup=1 drop=0 Last message repeated 19 times Error while decoding stream #0:1: Cannot allocate memory.36 bitrate= 257.6kbits/s dup=1 drop=0 Last message repeated 17 times Error while decoding stream #0:1: Cannot allocate memory.70 bitrate= 277.2kbits/s dup=1 drop=0 Last message repeated 18 times Error while decoding stream #0:1: Cannot allocate memory.37 bitrate= 286.0kbits/s dup=1 drop=0 Last message repeated 18 times Error while decoding stream #0:1: Cannot allocate memory.08 bitrate= 313.9kbits/s dup=1 drop=0 Last message repeated 18 times frame= 360 fps= 85 q=28.0 Lsize= 636kB time=00:00:15.01 bitrate= 346.9kbits/s dup=1 drop=0 video:426kB audio:201kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.560136% [libx264 @ 0x2a1ef00] frame I:5 Avg QP:15.46 size: 10732 [libx264 @ 0x2a1ef00] frame P:165 Avg QP:21.88 size: 2055 [libx264 @ 0x2a1ef00] frame B:190 Avg QP:23.22 size: 223 [libx264 @ 0x2a1ef00] consecutive B-frames: 26.4% 9.4% 0.8% 63.3% [libx264 @ 0x2a1ef00] mb I I16..4: 54.0% 20.6% 25.4% [libx264 @ 0x2a1ef00] mb P I16..4: 2.3% 5.5% 0.8% P16..4: 38.7% 12.5% 9.9% 0.0% 0.0% skip:30.2% [libx264 @ 0x2a1ef00] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 29.3% 1.7% 0.8% direct: 1.4% skip:66.7% L0:34.1% L1:59.3% BI: 6.6% [libx264 @ 0x2a1ef00] 8x8 transform intra:52.5% inter:61.7% [libx264 @ 0x2a1ef00] coded y,uvDC,uvAC intra: 25.4% 39.9% 21.9% inter: 13.8% 14.7% 4.5% [libx264 @ 0x2a1ef00] i16 v,h,dc,p: 56% 19% 15% 9% [libx264 @ 0x2a1ef00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 14% 59% 1% 3% 2% 3% 1% 2% [libx264 @ 0x2a1ef00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 16% 11% 6% 7% 6% 9% 6% 9% [libx264 @ 0x2a1ef00] i8c dc,h,v,p: 68% 19% 9% 3% [libx264 @ 0x2a1ef00] Weighted P-Frames: Y:26.7% UV:10.9% [libx264 @ 0x2a1ef00] ref P L0: 78.4% 8.6% 7.4% 5.5% 0.1% [libx264 @ 0x2a1ef00] ref B L0: 86.9% 9.4% 3.7% [libx264 @ 0x2a1ef00] ref B L1: 92.6% 7.4% [libx264 @ 0x2a1ef00] kb/s:232.05