[FFmpeg-user] [FFmpeg-devel]Video filter "setpts" works very slow on Android

Glorin Li ligr1991 at gmail.com
Fri Aug 19 11:41:53 EEST 2016


Hi all,

I am using ffmpeg to create timelapse videos on Android, I use the command
below to make a video 2x faster:

*    ffmpeg -i src.mp4 -filter:v setpts=0.5*PTS -c:v libx264 -threads 6
-preset ultrafast -t 20 dst.mp4*

The src.mp4 is a video file of 40 seconds duration, and the resolution is
1920x1080.

I run this command on a Nexus5X phone.

The problem is that the process takes really long time, it costs 300s -
400s (5min - 7min) to do the job.

The same task runs on my mac-mini only takes less than 20 seconds.

Can anybody give some help, I'll really appreciate it.


================================================
I use the scripts below to configure ffmpeg before build it:
#!/bin/bash
# You should export ANDROID_NDK={Your ndk root}

X264=~/Library/x264/armeabi-v7a

function build_one
{
./configure \
    --prefix=$PREFIX \
    --enable-shared \
    --enable-gpl \
    --enable-libx264 \
    --disable-static \
    --disable-doc \
    --disable-ffserver \
    --enable-cross-compile \
    --cross-prefix=$CROSS_PREFIX \
    --target-os=linux \
    --arch=$ARCH \
    --sysroot=$SYSROOT \
    --enable-neon \
    --extra-cflags="-I$X264/include -Os -fpic $ADDI_CFLAGS" \
    --extra-ldflags="-L$X264/lib $ADDI_LDFLAGS" \
    $ADDITIONAL_CONFIGURE_FLAG
}

# armeabi-v7a
SYSROOT=$ANDROID_NDK/platforms/android-23/arch-arm/
TOOLCHAIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
CROSS_PREFIX=$TOOLCHAIN/bin/arm-linux-androideabi-
ARCH=arm
CPU=armv7-a
PREFIX=~/Library/ffmpeg/armeabi-v7a
ADDI_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU"
build_one
================================================

Thanks very much for your attention.


More information about the ffmpeg-user mailing list