Log in

View Full Version : ffmpeg takes too long to start reencoding


kromak
28th September 2019, 20:17
Hello. I am trying to reencode a certain video file while also splitting it in two, cutting off the first one hour and fourty minutes. Here is the command I use:

ffmpeg -y -i input.mp4 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -ss 1:40:00 -t 800000 -pass 1 -an -f avi /dev/null && ffmpeg -i input.mp4 -c:a libmp3lame -b:a 48k -ac 1 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -ss 1:40:00 -t 80000 -pass 2 /media/C10B-34F3/output.avi

however ffmpeg is stuck on this in the last half hour or so:

Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 size= 6kB time=00:00:00.00 bitrate=N/A speed= 0x

So my questions are:

1) It will ever be stuck there or at some moment it will start to reencode for real ?
2) If 1) is true, is there anything I can do to speed-up the process?

Thanks for the help.

sneaker_ger
5th October 2019, 22:14
Try to put the -ss before the -i parameter to enable input seeking. If seeking is what takes long then that should speed things up.

https://trac.ffmpeg.org/wiki/Seeking