Opened 7 years ago
Last modified 6 years ago
#6463 new defect
av_interleaved_write_frame(): Cannot allocate memory
Reported by: | epollia | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
ffmpeg Crash after 3 hours
I Try this comman many times, and after 3 hours have error.
command for start:
% ffmpeg -re -i "udp://@239.255.43.72:1234?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1&timeout=3" -c:v h264 -b:v 4500k -bufsize 16M -maxrate 4500k -bitrate 7.2M -muxrate 7.2M -crf 3 -r 25 -g 25 -c:a aac -f mpegts -mpegts_start_pid 0x222 -metadata service_name="www" -metadata service_provider="eee" "udp://@239.255.57.250:1234?pkt_size=1316?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1"
ffmpeg version N-86438-gf85cad7 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
Log out:
[h264 @ 0x3b0d300] SPS unavailable in decode_picture_timing [h264 @ 0x3b0d300] non-existing PPS 0 referenced [h264 @ 0x3b0d300] decode_slice_header error [h264 @ 0x3b0d300] no frame! Input #0, mpegts, from 'udp://@239.255.43.72:1234?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1&timeout=3': Duration: N/A, start: 26139.241156, bitrate: N/A Program 123 Metadata: service_name : ?���� ������ HD service_provider: Stream #0:0[0x1f4]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:1[0x2bc]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (mp2 (native) -> aac (native)) Press [q] to stop, [?] for help [h264 @ 0x3c0ec40] Missing reference picture, default is 2147483647 Last message repeated 3 times [h264 @ 0x3b8d820] Missing reference picture, default is 2147483647 Last message repeated 3 times [h264 @ 0x3c69840] Missing reference picture, default is 2147483647 Last message repeated 3 times [h264 @ 0x3cbb1c0] Missing reference picture, default is 2147483647 Last message repeated 3 times [h264 @ 0x3cbf1c0] Missing reference picture, default is 2147483647 Last message repeated 2 times [h264 @ 0x3d15160] Missing reference picture, default is 65566 Last message repeated 1 times [h264 @ 0x4040a60] Missing reference picture, default is 65566 Last message repeated 1 times [h264 @ 0x3e7a320] Missing reference picture, default is 65567 Last message repeated 1 times [h264 @ 0x3e966c0] Missing reference picture, default is 65566 Last message repeated 1 times [h264 @ 0x3eb2a60] Missing reference picture, default is 65567 Last message repeated 1 times [h264 @ 0x3ecee00] Missing reference picture, default is 65566 Last message repeated 1 times [h264 @ 0x4317a40] Missing reference picture, default is 65567 [h264 @ 0x4333c60] Missing reference picture, default is 65572 [h264 @ 0x3c0ec40] Missing reference picture, default is 65573 [h264 @ 0x3b8d820] Missing reference picture, default is 65572 [h264 @ 0x3c69840] Missing reference picture, default is 65573 [h264 @ 0x3cbb1c0] Missing reference picture, default is 65572 frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kb frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kb[libx264 @ 0x3b47ac0] using SAR=1/1 [libx264 @ 0x3b47ac0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x3b47ac0] profile High, level 4.0 Output #0, mpegts, to 'udp://@239.255.57.250:1234?pkt_size=1316?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1': Metadata: service_name : eee service_provider: www encoder : Lavf57.73.100 Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 4500 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.98.100 libx264 Side data: cpb: bitrate max/min/avg: 4500000/0/4500000 buffer size: 16000000 vbv_delay: -1 Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc57.98.100 aac frame= 3 fps=2.0 q=0.0 size= 0kB time=00:00:00.98 bitrate= 0.0kbits/s frame= 15 fps=7.5 q=0.0 size= 0kB time=00:00:01.49 bitrate= 0.0kbits/s frame= 28 fps= 11 q=0.0 size= 0kB time=00:00:01.96 bitrate= 0.0kbits/s frame= 40 fps= 13 q=0.0 size= 0kB time=00:00:02.49 bitrate= 0.0kbits/s frame= 53 fps= 15 q=0.0 size= 0kB time=00:00:02.88 bitrate= 0.0kbits/s frame= 66 fps= 16 q=37.0 size= 1244kB time=00:00:03.37 bitrate=3023.0kbits/s frame= 78 fps= 17 q=24.0 size= 1496kB time=00:00:03.84 bitrate=3191.7kbits/s frame= 91 fps= 18 q=25.0 size= 2085kB time=00:00:04.41 bitrate=3868.3kbits/s frame= 104 fps= 19 q=25.0 size= 2411kB time=00:00:04.94 bitrate=3991.2kbits/s frame= 116 fps= 19 q=25.0 size= 3120kB time=00:00:05.52 bitrate=4625.2kbits/s frame= 128 fps= 20 q=25.0 size= 3376kB time=00:00:05.99 bitrate=4614.1kbits/s speed=0.918x ... frame=303610 fps= 25 q=32.0 size=10673939kB time=03:22:26.88 bitrate=7198.6kbits frame=303623 fps= 25 q=33.0 size=10674404kB time=03:22:27.32 bitrate=7198.7kbits frame=303635 fps= 25 q=29.0 size=10674810kB time=03:22:27.79 bitrate=7198.7kbits frame=303648 fps= 25 q=29.0 size=10675250kB time=03:22:28.28 bitrate=7198.7kbits frame=303661 fps= 25 q=28.0 size=10675709kB time=03:22:28.86 bitrate=7198.6kbits frame=303673 fps= 25 q=28.0 size=10676131kB time=03:22:29.37 bitrate=7198.6kbits av_interleaved_write_frame(): Cannot allocate memory Error writing trailer of udp://@239.255.57.250:1234?pkt_size=1316?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1: Cannot allocate memory frame=303675 fps= 25 q=28.0 Lsize=10676413kB time=03:22:29.44 bitrate=7198.8kbits/s speed= 1x video:6672853kB audio:190497kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 55.556870% [udp @ 0x3af8ba0] Circular buffer overrun. Surviving due to overrun_nonfatal option Last message repeated 17074 times [libx264 @ 0x3b47ac0] frame I:12468 Avg QP:24.10 size:189124 [libx264 @ 0x3b47ac0] frame P:139439 Avg QP:28.57 size: 25284 [libx264 @ 0x3b47ac0] frame B:151768 Avg QP:29.02 size: 6264 [libx264 @ 0x3b47ac0] consecutive B-frames: 20.9% 32.9% 13.7% 32.5% [libx264 @ 0x3b47ac0] mb I I16..4: 13.8% 66.3% 19.9% [libx264 @ 0x3b47ac0] mb P I16..4: 5.3% 10.3% 0.5% P16..4: 32.8% 7.5% 5.2% 0.0% 0.0% skip:38.2% [libx264 @ 0x3b47ac0] mb B I16..4: 0.4% 0.9% 0.1% B16..8: 25.2% 1.7% 0.3% direct: 2.3% skip:69.2% L0:36.5% L1:60.3% BI: 3.2% [libx264 @ 0x3b47ac0] 8x8 transform intra:64.8% inter:72.8% [libx264 @ 0x3b47ac0] coded y,uvDC,uvAC intra: 48.6% 40.0% 11.2% inter: 11.9% 12.6% 0.2% [libx264 @ 0x3b47ac0] i16 v,h,dc,p: 22% 40% 12% 26% [libx264 @ 0x3b47ac0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 26% 26% 5% 5% 4% 7% 4% 8% [libx264 @ 0x3b47ac0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 25% 13% 6% 9% 7% 10% 6% 9% [libx264 @ 0x3b47ac0] i8c dc,h,v,p: 68% 17% 12% 2% [libx264 @ 0x3b47ac0] Weighted P-Frames: Y:5.5% UV:3.4% [libx264 @ 0x3b47ac0] ref P L0: 65.4% 12.3% 15.1% 7.0% 0.1% [libx264 @ 0x3b47ac0] ref B L0: 85.2% 13.2% 1.7% [libx264 @ 0x3b47ac0] ref B L1: 94.5% 5.5% [libx264 @ 0x3b47ac0] kb/s:4500.38 [udp @ 0x3af8ba0] Circular buffer overrun. Surviving due to overrun_nonfatal option Last message repeated 48 times [aac @ 0x3c0a0a0] Qavg: 560.044 Conversion failed! You have new mail in /var/spool/mail/root
Change History (26)
comment:1 by , 7 years ago
Component: | ffmpeg → undetermined |
---|---|
Keywords: | av_interleaved_write_frame() Cannot allocate memory removed |
Priority: | critical → normal |
Version: | 3.2.4 → git-master |
comment:2 by , 7 years ago
Yes, network required.
How can I get more detailed information? If you have more information about this case, please send us.
comment:3 by , 7 years ago
The issue is neither reproducible with non-network input and network output nor with network input and non-network output?
You could test a (much) older version to find out if the issue is a regression.
comment:4 by , 7 years ago
I tested this command on version 1 year older, and have problem.
I try test with network input and non-network output. After non-network input and network output.
comment:5 by , 7 years ago
I have not problem with network input and non-network output. Process working 15+ hour.
comment:6 by , 7 years ago
Process is crashed when I started command non-network input and network output
ffmpeg -re -i "/mnt/4tb-hdd/RAW.ts" -c:v h264 -b:v 4500k -bufsize 8M -maxrate 4500k -bitrate 7M -muxrate 7.2M -crf 3 -g 25 -c:a copy -f mpegts -mpegts_start_pid 0x222 -metadata service_name="www" -metadata service_provider="eee" "udp://@239.255.57.250:1234?pkt_size=1316?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1" ffmpeg version N-86438-gf85cad7 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4) configuration: --enable-nonfree --enable-libx264 --enable-gpl --enable-libfdk-aac --enable-librtmp libavutil 55. 63.100 / 55. 63.100 libavcodec 57. 98.100 / 57. 98.100 libavformat 57. 73.100 / 57. 73.100 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 92.100 / 6. 92.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 Input #0, mpegts, from '/mnt/4tb-hdd/RAW.ts': Duration: 00:18:41.65, start: 1.400000, bitrate: 17383 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [libx264 @ 0x2b5c080] using SAR=1/1 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A [libx264 @ 0x2b5c080] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x2b5c080] profile High, level 4.0 Output #0, mpegts, to 'udp://@239.255.57.250:1234?pkt_size=1316?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1': Metadata: service_name : www service_provider: eee encoder : Lavf57.73.100 Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 4500 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.98.100 libx264 Side data: cpb: bitrate max/min/avg: 4500000/0/4500000 buffer size: 8000000 vbv_delay: -1 Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s av_interleaved_write_frame(): Cannot allocate memory Error writing trailer of udp://@239.255.57.250:1234?pkt_size=1316?reuse=1&buffer_size=1048576&fifo_size=50000&overrun_nonfatal=1: Cannot allocate memory frame= 8318 fps= 25 q=36.0 Lsize= 291167kB time=00:05:33.81 bitrate=7145.4kbits/s speed=0.998x video:181434kB audio:3912kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 57.093624% [libx264 @ 0x2b5c080] frame I:385 Avg QP:27.84 size:179849 [libx264 @ 0x2b5c080] frame P:4266 Avg QP:31.38 size: 23209 [libx264 @ 0x2b5c080] frame B:3667 Avg QP:32.67 size: 5110 [libx264 @ 0x2b5c080] consecutive B-frames: 26.4% 39.3% 15.7% 18.6% [libx264 @ 0x2b5c080] mb I I16..4: 11.6% 64.7% 23.7% [libx264 @ 0x2b5c080] mb P I16..4: 4.3% 7.1% 0.6% P16..4: 28.1% 7.5% 5.0% 0.0% 0.0% skip:47.4% [libx264 @ 0x2b5c080] mb B I16..4: 0.3% 0.3% 0.0% B16..8: 21.9% 1.0% 0.2% direct: 2.1% skip:74.2% L0:29.4% L1:66.0% BI: 4.6% [libx264 @ 0x2b5c080] 8x8 transform intra:61.4% inter:70.5% [libx264 @ 0x2b5c080] coded y,uvDC,uvAC intra: 58.8% 25.6% 11.0% inter: 12.6% 6.7% 0.2% [libx264 @ 0x2b5c080] i16 v,h,dc,p: 18% 55% 13% 13% [libx264 @ 0x2b5c080] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 45% 22% 3% 3% 2% 6% 3% 7% [libx264 @ 0x2b5c080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 41% 12% 5% 6% 4% 8% 4% 8% [libx264 @ 0x2b5c080] i8c dc,h,v,p: 81% 10% 7% 2% [libx264 @ 0x2b5c080] Weighted P-Frames: Y:3.9% UV:3.0% [libx264 @ 0x2b5c080] ref P L0: 72.1% 11.2% 11.7% 4.9% 0.1% [libx264 @ 0x2b5c080] ref B L0: 90.7% 8.5% 0.8% [libx264 @ 0x2b5c080] ref B L1: 94.4% 5.6% [libx264 @ 0x2b5c080] kb/s:4496.01 Conversion failed! You have mail in /var/spool/mail/root
comment:11 by , 7 years ago
I find
http://ffmpeg.gusari.org/viewtopic.php?f=11&t=3422
This is man have promlem too.
comment:14 by , 7 years ago
Priority: | normal → critical |
---|
comment:15 by , 7 years ago
Priority: | critical → normal |
---|
comment:16 by , 7 years ago
The error is returned by udp_write (libavformat/udp.c) when a circular buffer is used for the output and it overflows. overrun_nonfatal doesn't apply in this case. Make sure the output interface can sustain the bitrate and/or increase fifo_size.
comment:17 by , 7 years ago
How can check increase fifo_size?
cat /proc/sys/fs/pipe-max-size
1048576
comment:18 by , 7 years ago
See fifo_size in the documentation https://ffmpeg.org/ffmpeg-protocols.html#udp. It uses units of 188 bytes and you already set it in your command.
comment:19 by , 7 years ago
Server has 1G interface. 20 Mbis/s in and 8Mbit/s out.
I think thet output interface can sustain the bitrate
follow-up: 22 comment:21 by , 6 years ago
I'm having this problem on a freshly compiled git snapshot (N-93335-ga8c5ae4), without any UDP networking involved. The source is an MKV file on a linux cifsd mount, which appears as a local path to ffmpeg, and the destination is an MP4 file on a local ZFS mount.
I can provide the file that reproduces this but be advised it's 418 Gbytes. It crashes reliably, but the exact location seems to change slightly.
The host machine is a dual socket Xeon E5-2620 with 72GB ECC RAM.
ffmpeg version N-93335-ga8c5ae4 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/home/micah/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/micah/ffmpeg_build/include --extra-ldflags=-L/home/micah/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/micah/bin --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree libavutil 56. 26.100 / 56. 26.100 libavcodec 58. 47.103 / 58. 47.103 libavformat 58. 26.101 / 58. 26.101 libavdevice 58. 6.101 / 58. 6.101 libavfilter 7. 48.100 / 7. 48.100 libswscale 5. 4.100 / 5. 4.100 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Input #0, matroska,webm, from '/mnt/podcaster/2019-02-28_15-04-50.mkv': Metadata: ENCODER : Lavf57.83.100 Duration: 271:31:45.03, start: 0.000000, bitrate: 3664 kb/s Stream #0:0: Video: h264 (Main), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn, 60 tbc (default) Metadata: DURATION : 271:31:45.033000000 Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default) Metadata: title : Track1 DURATION : 271:31:44.981000000 Output #0, mp4, to '/filebox/shares/vidbox/lapser/auto/temp-mnt-podcaster-2019-02-28_15-04-50-remux.mp4': Metadata: encoder : Lavf58.26.101 Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 16k tbn, 1k tbc (default) Metadata: DURATION : 271:31:45.033000000 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (default) Metadata: title : Track1 DURATION : 271:31:44.981000000 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help av_interleaved_write_frame(): Cannot allocate memory=198:48:54.50 bitrate=3659.9kbits/s speed= 190x ffmpeg version N-93335-ga8c5ae4 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/home/micah/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/micah/ffmpeg_build/include --extra-ldflags=-L/home/micah/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/micah/bin --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree libavutil 56. 26.100 / 56. 26.100 libavcodec 58. 47.103 / 58. 47.103 libavformat 58. 26.101 / 58. 26.101 libavdevice 58. 6.101 / 58. 6.101 libavfilter 7. 48.100 / 7. 48.100 libswscale 5. 4.100 / 5. 4.100 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Input #0, matroska,webm, from '/mnt/podcaster/2019-02-28_15-04-50.mkv': Metadata: ENCODER : Lavf57.83.100 Duration: 271:31:45.03, start: 0.000000, bitrate: 3664 kb/s Stream #0:0: Video: h264 (Main), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn, 60 tbc (default) Metadata: DURATION : 271:31:45.033000000 Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default) Metadata: title : Track1 DURATION : 271:31:44.981000000 Output #0, mp4, to '/filebox/shares/vidbox/lapser/auto/temp-mnt-podcaster-2019-02-28_15-04-50-remux.mp4': Metadata: encoder : Lavf58.26.101 Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 16k tbn, 1k tbc (default) Metadata: DURATION : 271:31:45.033000000 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (default) Metadata: title : Track1 DURATION : 271:31:44.981000000 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help av_interleaved_write_frame(): Cannot allocate memory=198:49:05.98 bitrate=3659.9kbits/s speed= 201x ffmpeg version N-93335-ga8c5ae4 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/home/micah/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/micah/ffmpeg_build/include --extra-ldflags=-L/home/micah/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/micah/bin --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree libavutil 56. 26.100 / 56. 26.100 libavcodec 58. 47.103 / 58. 47.103 libavformat 58. 26.101 / 58. 26.101 libavdevice 58. 6.101 / 58. 6.101 libavfilter 7. 48.100 / 7. 48.100 libswscale 5. 4.100 / 5. 4.100 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Input #0, matroska,webm, from '/mnt/podcaster/2019-02-28_15-04-50.mkv': Metadata: ENCODER : Lavf57.83.100 Duration: 271:31:45.03, start: 0.000000, bitrate: 3664 kb/s Stream #0:0: Video: h264 (Main), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn, 60 tbc (default) Metadata: DURATION : 271:31:45.033000000 Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default) Metadata: title : Track1 DURATION : 271:31:44.981000000 Output #0, mp4, to '/filebox/shares/vidbox/lapser/auto/temp-mnt-podcaster-2019-02-28_15-04-50-remux.mp4': Metadata: encoder : Lavf58.26.101 Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 16k tbn, 1k tbc (default) Metadata: DURATION : 271:31:45.033000000 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (default) Metadata: title : Track1 DURATION : 271:31:44.981000000 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help av_interleaved_write_frame(): Cannot allocate memory=198:49:34.91 bitrate=3659.9kbits/s speed= 198x
follow-up: 23 comment:22 by , 6 years ago
Replying to scanlime:
I'm having this problem
Looks unrelated to me.
Please confirm that the issue is also reproducible with a default compilation (./configure && make
), please provide the command line you used (yes, I could guess it but that would really simplify understanding the issue) and confirm that this is a 64bit binary.
massif output may help.
comment:23 by , 6 years ago
Replying to cehoyos:
Looks unrelated to me.
Please confirm that the issue is also reproducible with a default compilation (
./configure && make
), please provide the command line you used (yes, I could guess it but that would really simplify understanding the issue) and confirm that this is a 64bit binary.
massif output may help.
Ok, I'll try that, thanks. The command was:
ffmpeg -i /mnt/podcaster/2019-02-28_15-04-50.mkv -c:v copy -c:a copy /filebox/shares/vidbox/lapser/auto/temp-mnt-podcaster-2019-02-28_15-04-50-remux.mp4
And I've also tried it with -loglevel trace but that didn't include anything additional and relevant. It's also segfaulting while trying to write the moov after the original error.
Program terminated with signal SIGSEGV, Segmentation fault. #0 build_chunks (trk=0x5559f0ae59d0) at libavformat/movenc.c:3858 3858 uint64_t chunkSize = chunk->size; (gdb) bt #0 build_chunks (trk=0x5559f0ae59d0) at libavformat/movenc.c:3858 #1 mov_write_moov_tag (pb=pb@entry=0x5559f0ae8440, mov=0x5559f0ae3180, s=0x5559f0b44e00) at libavformat/movenc.c:3940 #2 0x00005559ec95e5f3 in mov_write_trailer (s=0x5559f0b44e00) at libavformat/movenc.c:6730 #3 0x00005559ec97c4e4 in av_write_trailer (s=0x5559f0b44e00) at libavformat/mux.c:1276 #4 0x00005559ec70a3a6 in transcode () at fftools/ffmpeg.c:4723 #5 0x00005559ec6e5a35 in main (argc=<optimized out>, argv=0x7ffd33a70308) at fftools/ffmpeg.c:4891 (gdb) p chunk $1 = (MOVIentry *) 0x0
comment:24 by , 6 years ago
The results seem to be the same (error message and segfault) on a default configuration and with massif running. Here's what ms_print says. I'll dig further but so far i have no evidence there was a malloc failure. Maybe someone's using ENOMEM to indicate a 32-bit data structure is running out of space in the atom table?
-------------------------------------------------------------------------------- Command: /home/micah/ffmpeg_sources_alt/ffmpeg/ffmpeg -i /mnt/podcaster/2019-02-28_15-04-50.mkv -c:v copy -c:a copy /filebox/shares/vidbox/lapser/auto/temp-mnt-podcaster-2019-02-28_15-04-50-remux.mp4 Massif arguments: (none) ms_print arguments: massif.out.17523 -------------------------------------------------------------------------------- GB 3.002^ : | #::::::::::::::@ | #: : : : : :: :@ | #: : : : : :: :@ | #: : : : : :: :@ | :: ::::::::::@:: ::#: : : : : :: :@ | ::::::: :::: :@: :: #: : : : : :: :@ | ::: ::: :::: :@: :: #: : : : : :: :@ | ::: ::: :::: :@: :: #: : : : : :: :@ | ::: ::: :::: :@: :: #: : : : : :: :@ | :::@@@@:::: ::: :::: :@: :: #: : : : : :: :@ | : :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | : :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | :::::::@::: :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | : :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | ::::: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | :: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | @@:::::: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | :@ :: ::: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ | :::::@ :: ::: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : : :: :@ 0 +----------------------------------------------------------------------->Gi 0 845.6 Number of snapshots: 59 Detailed snapshots: [7, 18, 23, 24, 37, 41 (peak), 58] -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 0 0 0 0 0 0 1 16,053,034,096 76,496,040 76,473,253 22,787 0 2 29,536,767,934 152,306,280 152,278,890 27,390 0 3 45,994,253,464 202,990,752 202,960,055 30,697 0 4 61,735,334,680 303,235,408 303,217,708 17,700 0 5 73,633,252,645 303,747,152 303,720,490 26,662 0 6 92,641,335,924 404,812,832 404,781,684 31,148 0 7 113,249,490,128 605,905,064 605,881,526 23,538 0 100.00% (605,881,526B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->99.66% (603,815,936B) 0xF02636: av_realloc_f (mem.c:157) | ->99.65% (603,783,168B) 0xF02673: av_reallocp_array (mem.c:210) | | ->99.65% (603,783,168B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423) | | ->99.65% (603,783,168B) 0x4BDF43: mov_write_single_packet (movenc.c:5632) | | ->99.65% (603,783,168B) 0x4BE2D7: mov_write_packet (movenc.c:5752) | | ->99.65% (603,783,168B) 0x4DC5FB: av_interleaved_write_frame (mux.c:747) | | ->99.65% (603,783,168B) 0x28C2ED: write_packet.isra.14 (ffmpeg.c:815) | | ->99.65% (603,783,168B) 0x28CCF3: output_packet.constprop.24 (ffmpeg.c:886) | | ->99.65% (603,783,168B) 0x29461D: process_input_packet (ffmpeg.c:2075) | | ->99.65% (603,783,168B) 0x2969D8: transcode (ffmpeg.c:4515) | | ->99.65% (603,783,168B) 0x273D43: main (ffmpeg.c:4891) | | | ->00.01% (32,768B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.34% (2,065,590B) in 1+ places, all below ms_print's threshold (01.00%) -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 8 127,523,130,817 605,860,168 605,844,758 15,410 0 9 149,582,357,875 606,232,432 606,201,377 31,055 0 10 167,748,774,769 606,085,536 606,057,989 27,547 0 11 182,852,101,013 807,415,400 807,387,707 27,693 0 12 200,068,969,757 807,631,576 807,599,132 32,444 0 13 221,111,806,662 807,078,560 807,058,790 19,770 0 14 238,416,245,369 1,210,011,800 1,209,985,534 26,266 0 15 261,372,066,443 1,210,367,640 1,210,333,362 34,278 0 16 276,943,414,814 1,209,772,664 1,209,753,232 19,432 0 17 300,300,436,315 1,209,561,680 1,209,546,165 15,515 0 18 318,466,996,551 1,210,018,472 1,209,992,232 26,240 0 100.00% (1,209,992,232B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->99.82% (1,207,795,712B) 0xF02636: av_realloc_f (mem.c:157) | ->99.81% (1,207,762,944B) 0xF02673: av_reallocp_array (mem.c:210) | | ->99.81% (1,207,762,944B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423) | | ->99.81% (1,207,762,944B) 0x4BDF43: mov_write_single_packet (movenc.c:5632) | | ->99.81% (1,207,762,944B) 0x4BE2D7: mov_write_packet (movenc.c:5752) | | ->99.81% (1,207,762,944B) 0x4DC5FB: av_interleaved_write_frame (mux.c:747) | | ->99.81% (1,207,762,944B) 0x28C2ED: write_packet.isra.14 (ffmpeg.c:815) | | ->99.81% (1,207,762,944B) 0x28CCF3: output_packet.constprop.24 (ffmpeg.c:886) | | ->99.81% (1,207,762,944B) 0x29461D: process_input_packet (ffmpeg.c:2075) | | ->99.81% (1,207,762,944B) 0x2969D8: transcode (ffmpeg.c:4515) | | ->99.81% (1,207,762,944B) 0x273D43: main (ffmpeg.c:4891) | | | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.18% (2,196,520B) in 1+ places, all below ms_print's threshold (01.00%) -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 19 334,038,340,461 1,209,662,736 1,209,643,814 18,922 0 20 347,014,453,978 1,210,369,160 1,210,334,991 34,169 0 21 365,331,571,821 1,612,808,864 1,612,779,173 29,691 0 22 388,688,595,961 1,612,724,424 1,612,696,932 27,492 0 23 402,359,050,491 1,612,995,904 1,612,963,006 32,898 0 100.00% (1,612,963,006B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->99.84% (1,610,448,896B) 0xF02636: av_realloc_f (mem.c:157) | ->99.84% (1,610,416,128B) 0xF02673: av_reallocp_array (mem.c:210) | | ->99.84% (1,610,416,128B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423) | | ->99.84% (1,610,416,128B) 0x4BDF43: mov_write_single_packet (movenc.c:5632) | | ->99.84% (1,610,416,128B) 0x4BE2D7: mov_write_packet (movenc.c:5752) | | ->99.84% (1,610,416,128B) 0x4DC5FB: av_interleaved_write_frame (mux.c:747) | | ->99.84% (1,610,416,128B) 0x28C2ED: write_packet.isra.14 (ffmpeg.c:815) | | ->99.84% (1,610,416,128B) 0x28CCF3: output_packet.constprop.24 (ffmpeg.c:886) | | ->99.84% (1,610,416,128B) 0x29461D: process_input_packet (ffmpeg.c:2075) | | ->99.84% (1,610,416,128B) 0x2969D8: transcode (ffmpeg.c:4515) | | ->99.84% (1,610,416,128B) 0x273D43: main (ffmpeg.c:4891) | | | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.16% (2,514,110B) in 1+ places, all below ms_print's threshold (01.00%) -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 24 418,441,924,302 1,612,401,608 1,612,380,500 21,108 0 100.00% (1,612,380,500B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->99.88% (1,610,448,896B) 0xF02636: av_realloc_f (mem.c:157) | ->99.88% (1,610,416,128B) 0xF02673: av_reallocp_array (mem.c:210) | | ->99.88% (1,610,416,128B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423) | | ->99.88% (1,610,416,128B) 0x4BDF43: mov_write_single_packet (movenc.c:5632) | | ->99.88% (1,610,416,128B) 0x4BE2D7: mov_write_packet (movenc.c:5752) | | ->99.88% (1,610,416,128B) 0x4DC5FB: av_interleaved_write_frame (mux.c:747) | | ->99.88% (1,610,416,128B) 0x28C2ED: write_packet.isra.14 (ffmpeg.c:815) | | ->99.88% (1,610,416,128B) 0x28CCF3: output_packet.constprop.24 (ffmpeg.c:886) | | ->99.88% (1,610,416,128B) 0x29461D: process_input_packet (ffmpeg.c:2075) | | ->99.88% (1,610,416,128B) 0x2969D8: transcode (ffmpeg.c:4515) | | ->99.88% (1,610,416,128B) 0x273D43: main (ffmpeg.c:4891) | | | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.12% (1,931,604B) in 1+ places, all below ms_print's threshold (01.00%) -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 25 442,328,055,072 1,612,994,088 1,612,960,099 33,989 0 26 462,587,021,533 2,417,730,880 2,417,710,272 20,608 0 27 478,705,728,040 2,417,933,568 2,417,908,133 25,435 0 28 489,451,536,699 2,417,593,200 2,417,577,677 15,523 0 29 505,570,238,980 2,417,691,824 2,417,671,370 20,454 0 30 518,107,016,669 2,418,362,288 2,418,327,603 34,685 0 31 535,354,150,542 2,418,124,040 2,418,094,266 29,774 0 32 557,991,060,002 2,418,063,976 2,418,035,535 28,441 0 33 572,004,357,528 2,417,807,912 2,417,784,687 23,225 0 34 588,851,577,343 2,417,806,912 2,417,784,549 22,363 0 35 602,635,661,873 2,417,851,568 2,417,828,459 23,109 0 36 619,482,866,935 2,417,800,992 2,417,778,546 22,446 0 37 631,735,377,645 2,418,329,832 2,418,295,503 34,329 0 100.00% (2,418,295,503B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->99.89% (2,415,755,264B) 0xF02636: av_realloc_f (mem.c:157) | ->99.89% (2,415,722,496B) 0xF02673: av_reallocp_array (mem.c:210) | | ->99.89% (2,415,722,496B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423) | | ->99.89% (2,415,722,496B) 0x4BDF43: mov_write_single_packet (movenc.c:5632) | | ->99.89% (2,415,722,496B) 0x4BE2D7: mov_write_packet (movenc.c:5752) | | ->99.89% (2,415,722,496B) 0x4DC5FB: av_interleaved_write_frame (mux.c:747) | | ->99.89% (2,415,722,496B) 0x28C2ED: write_packet.isra.14 (ffmpeg.c:815) | | ->99.89% (2,415,722,496B) 0x28CCF3: output_packet.constprop.24 (ffmpeg.c:886) | | ->99.89% (2,415,722,496B) 0x29461D: process_input_packet (ffmpeg.c:2075) | | ->99.89% (2,415,722,496B) 0x2969D8: transcode (ffmpeg.c:4515) | | ->99.89% (2,415,722,496B) 0x273D43: main (ffmpeg.c:4891) | | | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.11% (2,540,239B) in 1+ places, all below ms_print's threshold (01.00%) -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 38 648,582,578,163 2,417,945,864 2,417,920,385 25,479 0 39 668,724,419,901 2,417,650,824 2,417,632,141 18,683 0 40 688,866,271,475 2,418,176,200 2,418,142,793 33,407 0 41 710,408,986,250 3,222,923,080 3,222,905,071 18,009 0 100.00% (3,222,905,071B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->99.94% (3,221,061,632B) 0xF02636: av_realloc_f (mem.c:157) | ->99.94% (3,221,028,864B) 0xF02673: av_reallocp_array (mem.c:210) | | ->99.94% (3,221,028,864B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423) | | ->99.94% (3,221,028,864B) 0x4BDF43: mov_write_single_packet (movenc.c:5632) | | ->99.94% (3,221,028,864B) 0x4BE2D7: mov_write_packet (movenc.c:5752) | | ->99.94% (3,221,028,864B) 0x4DC5FB: av_interleaved_write_frame (mux.c:747) | | ->99.94% (3,221,028,864B) 0x28C2ED: write_packet.isra.14 (ffmpeg.c:815) | | ->99.94% (3,221,028,864B) 0x28CCF3: output_packet.constprop.24 (ffmpeg.c:886) | | ->99.94% (3,221,028,864B) 0x29461D: process_input_packet (ffmpeg.c:2075) | | ->99.94% (3,221,028,864B) 0x2969D8: transcode (ffmpeg.c:4515) | | ->99.94% (3,221,028,864B) 0x273D43: main (ffmpeg.c:4891) | | | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.06% (1,843,439B) in 1+ places, all below ms_print's threshold (01.00%) -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 42 727,193,849,439 3,222,727,632 3,222,711,778 15,854 0 43 754,049,632,606 3,223,555,208 3,223,523,007 32,201 0 44 780,905,413,380 3,222,799,120 3,222,783,689 15,431 0 45 801,047,255,214 3,222,674,408 3,222,659,198 15,210 0 46 824,842,090,069 3,222,831,904 3,222,816,156 15,748 0 47 845,575,987,941 3,223,100,584 3,223,085,203 15,381 0 48 864,828,886,803 3,223,042,816 3,223,021,786 21,030 0 49 888,524,759,011 3,223,582,376 3,223,548,460 33,916 0 50 890,680,633,213 3,222,839,040 3,222,822,645 16,395 0 51 892,836,511,018 3,222,992,384 3,222,972,199 20,185 0 52 894,992,386,302 3,223,322,296 3,223,294,214 28,082 0 53 897,148,263,120 3,223,562,224 3,223,529,283 32,941 0 54 899,304,138,894 3,222,914,088 3,222,896,274 17,814 0 55 901,460,013,106 3,223,032,040 3,223,010,671 21,369 0 56 903,615,887,753 3,223,121,680 3,223,098,506 23,174 0 57 905,771,767,923 3,222,884,048 3,222,867,016 17,032 0 58 907,927,652,959 3,222,797,384 3,222,782,066 15,318 0 100.00% (3,222,782,066B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->99.95% (3,221,061,632B) 0xF02636: av_realloc_f (mem.c:157) | ->99.95% (3,221,028,864B) 0xF02673: av_reallocp_array (mem.c:210) | | ->99.95% (3,221,028,864B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423) | | ->99.95% (3,221,028,864B) 0x4BDF43: mov_write_single_packet (movenc.c:5632) | | ->99.95% (3,221,028,864B) 0x4BE2D7: mov_write_packet (movenc.c:5752) | | ->99.95% (3,221,028,864B) 0x4DC5FB: av_interleaved_write_frame (mux.c:747) | | ->99.95% (3,221,028,864B) 0x28C2ED: write_packet.isra.14 (ffmpeg.c:815) | | ->99.95% (3,221,028,864B) 0x28CCF3: output_packet.constprop.24 (ffmpeg.c:886) | | ->99.95% (3,221,028,864B) 0x29461D: process_input_packet (ffmpeg.c:2075) | | ->99.95% (3,221,028,864B) 0x2969D8: transcode (ffmpeg.c:4515) | | ->99.95% (3,221,028,864B) 0x273D43: main (ffmpeg.c:4891) | | | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%) | ->00.05% (1,720,434B) in 1+ places, all below ms_print's threshold (01.00%)
comment:26 by , 6 years ago
It is most probably not a memory issue, simply there is not enough space in the output fifo. Error message is a bit misleading. Try increasing the fifo size on the output.
Is network input required to reproduce the issue?
Is network output required to reproduce the issue?