0

I have a bunch of non-consecutivly numbered jpegs (they are in order, but there are gaps in the sequence) that I want to convert into a movie. When I try using convert, ffmpeg or avconv, it creates large amounts of temporary files, eventually filling my tmp directory and dragging my i7 machine with 16 gigs of ram down into an unresponsive heap.

Is there a way to do this without using all my memory and filling up my disk?

  • Just to clarify, your finished movies are coming out OK are they? You just want to limit CPU usage while transcoding so your computer is still responsive for other tasks? – thomasrutter Mar 23 '13 at 14:32
  • Actually, I've never had the patience to let it complete. I need that computer to work. – Paul Tomblin Mar 23 '13 at 14:35
  • 1
    I tried letting it finish, and it filled up the temp dir and died with a bus error (leaving behind all the temp files that filled up the partition). So I tried with TMPDIR=/var/tmp convert *.jpg cam.mov and that time it filled up the /var partition and died with a bus error. So I'm looking for options that don't use all my memory and don't fill up my disk. – Paul Tomblin Mar 24 '13 at 1:26
  • Thanks for the extra information, I hope you don't mind I've edited your question. – thomasrutter Mar 24 '13 at 7:43
  • 1
    What is your ffmpeg command and the complete ffmpeg console output? – llogan Mar 26 '13 at 4:17
2

One simple trick to try is to use the nice command to reduce the scheduler priority of the process that's doing the conversion.

For example

nice avconv <arguments>

This may or may not do as much as you want though, because system responsiveness can have a lot more to do with I/O (input/output) activity as anything else. But it is worth it for a first try.

The other thing you can do is try to limit the number of simultaneous threads on the converter so that some of your CPU cores can remain idle.

avconv <arguments> -threads 1

Note that if you do effectively reduce the CPU time allocated to a conversion process, it will take longer to complete.

  • No, I tried nice already. I think it might be memory rather than CPU. – Paul Tomblin Mar 23 '13 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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