[FFmpeg-user] Running out of RAM when copying 1080p H264 stream
Carl Eugen Hoyos
ceffmpeg at gmail.com
Mon Jul 2 00:12:56 EEST 2018
2018-07-01 23:00 GMT+02:00, Tom Holmes <tom at kamahi.com>:
> ffmpeg -f v4l2 -s 1920x1080 -v trace -r 5 -input_format h264
> -i /dev/video0 -c:v copy /tmp/mounts/SD-P1/test.mp4
Probably unrelated:
The input option "-r" is wrong here, use "-framerate", this is
mentioned in the documentation.
The command line should not have a big memory impact,
could the issue be the v4l2 driver?
> ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
This is old and unsupported, please also test current FFmpeg
git head.
> 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
To make debugging easier, start with removing all "--disable-" option,
especially the ones that make no sense whatsoever (--disable-power8,
seriously? I didn't even know this exists). --disable-runtime-cpudetect
does not do what you think it does, please remove it.
To save system memory, start with "--disable-everything
--disable-network" and add the things you need, possibly:
--enable-indev=v4l2 --enable-parser=h264 --enable-muxer=mp4
Please do not top-post here, Carl Eugen
More information about the ffmpeg-user
mailing list