On Tue, 20 Apr 2021 00:52:07 +0200, Bo Berglund <bo.bergl...@gmail.com> wrote:

>I think that the " -threads 1 " part does not work to reduce the CPU load,
>though...

I got off-list advice and a link to a stack-exchange discussion on this matter:
https://superuser.com/questions/792525/how-to-change-ffmpeg-threads-settings

It turns out that my use is probably totally wrong since it limits the threads
for the download function, which is not a heavy worker:

"ffmpeg -threads 1 -user_agent \"Mozilla\" -i $VIDEOURL -vf scale=w=-4:h=360
-c:v libx264 -preset fast -crf 26 -c:a copy -t $CAPTURETIME $TARGETFILE"

The proper position seems to be *after* the VIDEOURL instead.
But I don't know where exactly it should be located. Maybe it does not matter?

Like this instead:

"ffmpeg -user_agent \"Mozilla\" -i $VIDEOURL -threads 1 -vf scale=w=-4:h=360
-c:v libx264 -preset fast -crf 26 -c:a copy -t $CAPTURETIME $TARGETFILE"

These items are arguments to the script or global variables:
$VIDEOURL    (read from file)
$CAPTURETIME (argument 1)
$TARGETFILE  (argument 2)


-- 
Bo Berglund
Developer in Sweden

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to