bravobit / FFmpeg-Android

FFMpeg/FFprobe compiled for Android
https://bravobit.nl/
MIT License
739 stars 175 forks source link

It's slow to run colorchannelmixer #67

Closed stonyz closed 5 years ago

stonyz commented 5 years ago

It spent over 77s to run the following command on a video (the video's length is 21 seconds)

 Finished command : ffmpeg -y -ss 0 -i /storage/emulated/0/DCIM/Camera/20180925_003627.mp4 -to 21 -s 640*640  -c:a copy -metadata:s:v rotate=90  -pix_fmt yuv420p -vf colorchannelmixer=1.2:0:0:0:0:1:0:0:0:0:.9:0:0:0:0:.9 -strict experimental /storage/emulated/0/myapp/temp/1537807036253.mp4
    Spend time: 77480ms

But I run the same command on the same video, only less 10s.

Pls help to improve the speed.

Brianvdb commented 5 years ago

The recorded video is probably a large file. This slows down the processing.

stonyz commented 5 years ago

No, the reason is not the file is too large. It's due to the speed is very slow,

ffmpeg frame=  630 fps=4.7 q=-1.0 Lsize=   30647kB time=00:00:21.01 bitrate=11944.2kbits/s speed=0.158x

You can see "speed=0.158x", but in my pc, the speed is over 1 (speed=1.19x).

BTW, my test device is Sumsung Note 8, should be powerful enough.