[FFmpeg-user] Running out of RAM when copying 1080p H264 stream

Tom Holmes tom at kamahi.com
Mon Jul 2 00:00:57 EEST 2018


Hi,

ffmpeg -f v4l2 -s 1920x1080 -v trace -r 5 -input_format h264 -i /dev/video0
-c:v copy /tmp/mounts/SD-P1/test.mp4 -y 1&> ffmpeg.log

see dmesg output here
<https://docs.google.com/document/d/15J8RqzrAXmAEadqs2hMIPrD9-NaSvs1k28Ay1INYfNs/edit?usp=sharing>
showing
call trace

ffmpeg.log:

ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (LEDE GCC 5.4.0 r3102-0224e32)
  configuration: --enable-cross-compile
--cross-prefix=mipsel-openwrt-linux-musl- --arch=mipsel --target-os=linux
--prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static
--enable-small --enable-pthreads --enable-zlib --disable-doc
--disable-debug --enable-gpl --enable-version3 --disable-dxva2
--disable-lzma --disable-vaapi --disable-vda --disable-vdpau
--disable-outdevs --disable-altivec --disable-vsx --disable-power8
--disable-amd3dnow --disable-amd3dnowext --disable-mmx --disable-mmxext
--disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4
--disable-sse42 --disable-avx --disable-xop --disable-fma3 --disable-fma4
--disable-avx2 --disable-aesni --disable-armv5te --disable-armv6
--disable-armv6t2 --disable-inline-asm --disable-mipsdsp
--disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-mmi
--disable-fast-unaligned --disable-runtime-cpudetect --disable-yasm
--enable-libopus --enable-decoder=libopus --enable-libx264
--enable-libmp3lame
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument
'v4l2'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or
abbreviation)) with argument '1920x1080'.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'trace'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value,
fraction or abbreviation)) with argument '5'.
Reading option '-input_format' ... matched as AVOption 'input_format' with
argument 'h264'.
Reading option '-i' ... matched as input url with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument
'copy'.
Reading option '/tmp/mounts/SD-P1/test.mp4' ... matched as output url.
Reading option '-y' ... matched as option 'y' (overwrite output files) with
argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument trace.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option s (set frame size (WxH or abbreviation)) with argument
1920x1080.
Applying option r (set frame rate (Hz value, fraction or abbreviation))
with argument 5.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x761248b0] fd:3 capabilities:84200001
[video4linux2,v4l2 @ 0x761248b0] Current input_channel: 0, input_name:
Camera 1, input_std: 0
[video4linux2,v4l2 @ 0x761248b0] Setting time per frame to 1/5
Killed


Thanks,
Tom

[image: Kamahi Electronics]
*Tom Holmes* ELECTRONICS ENGINEER
tom at kamahi.com
+64 3 481 1884
kamahi.com


On Sun, Jul 1, 2018 at 8:37 AM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2018-06-30 22:20 GMT+02:00, Tom Holmes <tom at kamahi.com>:
>
> > I'm trying to copy an H264 1920x1080 video only stream
> > from a USB camera and save to microSD using an
> > OpenWRT based  MT7688 SoC Microprocessor (Onion
> > Omega2+ 128MB RAM). This works fine for up to
> > 1280x720 (roughly 2.9Mb/s) but when I increase
> > resolution the os kills ffmpeg due to RAM.
>
> Please provide the command line you tested together
> with the complete, uncut console output.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list