Ubuntu 20.04 LTS on a HP 8440w notebook.
I am having trouble when converting video from ts to mp4 and scaling down from 1280x720 to 852x480 size.
What happens is that the CPU gets overloaded and all other jobs on the system slow down awfully.
Is there a switch for ffmpeg to tell it NOT to use all available resources of the computer?
+ Reply to Thread
Results 1 to 9 of 9
-
-
I found the -threads argument to ffmpeg but there is no change if I use that...
Without this top reports 740% utilization and this is the same when using no -threads argument.
What am I doing wrong?
This is what I have now in my script:
Code:COMMAND="ffmpeg -hide_banner -threads 3 -i $INFILE -vf scale=w=-4:h=${VSIZE} -c:v libx264 -preset fast -crf 20 -c:a copy $OUTFILE" eval $COMMAND
-
It turned out that by setting argument "-threads 1" I managed to reduce the CPU load to about 400% as shown by top.
Conversion speed dropped too of course so a 1-hour video takes about 22 min to convert.
I should be able to schedule conversions at times when the download has been finished nightly. -
-
All linux systems support nice:
https://en.wikipedia.org/wiki/Nice_%28Unix%29
https://manpages.ubuntu.com/manpages/trusty/man1/nice.1.htmlLast edited by jagabo; 13th Mar 2021 at 16:54.
-
-
-
Jeez, this is so trivial. From the wikipedia link I gave earlier
If a user wanted to compress a large file, but not slow down other processes, they might run the following:
$ nice -n 19 tar cvzf archive.tgz largefile
Similar Threads
-
Video/Music Player that cycles through embedded images in mp3s
By jcikal in forum Newbie / General discussionsReplies: 1Last Post: 31st Mar 2020, 15:06 -
1080p 60fps mp4 capture device...that uses device CPU not PCs CPU?
By Blackout in forum Capturing and VCRReplies: 36Last Post: 11th Sep 2018, 12:40 -
Remaining/completed writing cycles: Measurement on ReWriteable optical disc
By TechLord in forum Newbie / General discussionsReplies: 1Last Post: 2nd Oct 2017, 15:28 -
Cpu meltdown transcoding with ffmpeg
By oduodui in forum Newbie / General discussionsReplies: 17Last Post: 26th Apr 2016, 18:34 -
(Willing to pay)ffmpeg Need help downloading live stream ffmpeg and rtmp
By grabyea in forum Video Streaming DownloadingReplies: 0Last Post: 10th Apr 2016, 16:54