2
votes

I'm trying to cut and resize video on Android(but it is similar on MacOS) , but when I run the ffmpeg command it returns me

frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed=

It repeats for about 20 sec (I have 4K video with 3 sec duration).

Is there any way to improve process speed? Here is example of my ffmpeg command

ffmpeg -y -i input.mp4 -ss 00:01.82 -to 00:02.94 -vf scale=500:1024 -c:v libx264 -c:a aac -b:v 500k -b:a 96k output.mp4

1

1 Answers

2
votes

Use of -ss after the input performs a decoded frame seek, which is slower. Switch to demuxer seek

ffmpeg -y -ss 00:01.82 -to 00:02.94 -i input.mp4 -vf scale=500:1024 -c:v libx264 -c:a aac -b:v 500k -b:a 96k output.mp4

-to for demuxer was only recently added, so get a current git version. Else, use -t with the calculated duration.