[FFmpeg-user] Combining download of ts stream with geometry modification into mp4?

Bo Berglund bo.berglund at gmail.com
Tue Apr 20 22:22:05 EEST 2021


On Tue, 20 Apr 2021 00:52:07 +0200, Bo Berglund <bo.berglund at 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



More information about the ffmpeg-user mailing list