Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to split a video by subtitles and encode into .mp4(h.264/aac) using ffmpeg, but it takes so much time! First pieces of video are splited and encoded really fast, but for each iteration time increases, and so 40 min video takes all night or more. Small 3 min video takes max 10 mins.

command for splitting and encoding:

ffmpeg -i filename.avi -ss 00:00:0(time of sub start) -t 0:0:3(time of sub duration) -acodec libfaac -vcodec libx264 -bf 0 -f mp4 filename.mp4

ffmpeg version N-34849-g07c7ffc (last, i think)

How I can make it faster? Are there, maybe, some magic arguments for ffmpeg or some hacks?

share|improve this question
    
I suspect that in order to process the -ss it has to decode the entire file up to that point? –  pjc50 Nov 17 '11 at 16:41
    
Hmm. If yor are right, how i can decode only that part, which i need? –  Rnd_d Nov 20 '11 at 10:52
add comment

1 Answer

Parameter order matters. Try putting the start time -ss parameter first.

ffmpeg -ss 00:00:0(time of sub start) -i filename.avi -t 0:0:3(time of sub duration) -acodec libfaac -vcodec libx264 -bf 0 -f mp4 filename.mp4
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.