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 am running Ubuntu 10.10 (maverick) on an HP Pavillion dv3 with core2duo 2.29 GHz, NVidia Geforce G105M (512MB) with CUDA and 4GB RAM. I have the latest versions of ffmpeg and x264.

I recognise that these aren't fantastic specs for encoding, but I am used to encoding with DIVX on a (different) single core PC with approx 2GHz processor, and being able to convert 10+ hour-long TV episodes overnight.

I have just started encoding with x264 and ffmpeg on the above HP laptop, and I was astounded to find a single 2 hr film taking 22 hrs to encode!

The command-Line I used was:

ffmpeg -i infile.mpg -vcodec libx264 -preset slow -profile normal -crf 24 -threads 0 outfile.mp4

Is this normal or do I have a bottleneck somewhere?

Thanks

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Well, it's only a Core 2 Duo. The i7 would perform way better of course. Having CUDA doesn't help unfortunately, since x264 doesn't have GPU support. Also, encoding h.264 is computationally way more intensive than "just" into MPEG-4 Visual DivX.

That being said, x264 is a pretty fast encoder, and here's the thing. You see the -preset slow? You're actually telling the encoder to be slow.

Presets in x264 enable different algorithmic optimizations that yield better quality for the same amount of bits spent, or, less bits spent for a fixed quality. Thus: compression efficiency. Generally, the slower the preset is, the better the optimizations will be, but the more computation time they take.

You can choose other presets, as outlined in x264 --fullhelp, such as:

  • ultrafast
  • superfast
  • veryfast
  • faster
  • fast
  • medium (default)
  • slow
  • slower
  • veryslow

Pick the one that suits best, i.e. the one you can afford waiting for.

share|improve this answer
1  
+1 for pointing out that the user is using -preset slow! –  afrazier Jan 27 '12 at 21:27
1  
Oh, and btw your command line looks great so far, I'd only change profile to profile:v, since profile itself can be ambiguous and is often interpreted for audio. Don't ask why. –  slhck Jan 27 '12 at 21:27
    
Thank you for your prompt reply. A very clear and concise answer - it didn't occur to me that setting the preset to slow would make that much of a difference. I'm doing some testing now with the different presets. –  Stefan Jan 27 '12 at 23:25
    
You may want to consider encoding just part of the source file at different speeds to gauge quality. To do that, add -t <seconds> to your command. –  Macho Matt Jan 28 '12 at 3:17

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.