what's the threads mode when using ffmpeg to transcode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

what's the threads mode when using ffmpeg to transcode

cmwu
hi,
I am confused how ffmpeg  allocate it's cpu resource when i am using ffmpeg to transcoding,

for example:
   how much resource to decode, and how much to encode

I have set the threads to 1 and do a experiment:
ffmpeg2.1 -i /home/mps/chd/out.avi -acodec pcm_s16le -ar 44100 -ac 2  -vcodec libx264 -coder 1 -b:v 250k -x264opts min-keyint=1:keyint=75:no-dct-decimate:partitions=all:8x8dct:merange=24:trellis=1:ratetol=1:qpmin=20:qpmax=45:aq-strength=1.0:psy-rd=1,0:subme=7:qcomp=0.6:chroma-qp-offset=0:me=umh:frameref=6:bframes=6:b-pyramid=1:b-adapt=2:weightp=2:direct=auto:deblock=1,0:stitchable=1, threads=1 -timelimit 6000 -r  15 -pass 1 -passlogfile /home/mps/cmwu/passlog_1414744300_h264_1.log -f null -y /dev/null

I found the cpu load use is 140%, it's not 100%

Can anybody explain it for me ?
Reply | Threaded
Open this post in threaded view
|

Re: what's the threads mode when using ffmpeg to transcode

Henk D. Schoneveld

On 06 Nov 2014, at 10:47, cmwu <[hidden email]> wrote:

> hi,
> I am confused how ffmpeg  allocate it's cpu resource when i am using ffmpeg
> to transcoding,
>
> for example:
>   how much resource to decode, and how much to encode
>
> I have set the threads to 1 and do a experiment:
> ffmpeg2.1 -i /home/mps/chd/out.avi -acodec pcm_s16le -ar 44100 -ac 2
> -vcodec libx264 -coder 1 -b:v 250k -x264opts
> min-keyint=1:keyint=75:no-dct-decimate:partitions=all:8x8dct:merange=24:trellis=1:ratetol=1:qpmin=20:qpmax=45:aq-strength=1.0:psy-rd=1,0:subme=7:qcomp=0.6:chroma-qp-offset=0:me=umh:frameref=6:bframes=6:b-pyramid=1:b-adapt=2:weightp=2:direct=auto:deblock=1,0:stitchable=1,
> threads=1 -timelimit 6000 -r  15 -pass 1 -passlogfile
> /home/mps/cmwu/passlog_1414744300_h264_1.log -f null -y /dev/null
>
> I found the cpu load use is 140%, it's not 100%
AFAIK threads 1 is meaning 1 Core for Encoding. So the extra 40% is used for decoding, logfile/IO activity and Audio stuff.

>
> Can anybody explain it for me ?
>
>
>
>
> --
> View this message in context: http://ffmpeg-users.933282.n4.nabble.com/what-s-the-threads-mode-when-using-ffmpeg-to-transcode-tp4668036.html
> Sent from the FFmpeg-users mailing list archive at Nabble.com.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: what's the threads mode when using ffmpeg to transcode

Carl Eugen Hoyos
In reply to this post by cmwu
cmwu <277893958 <at> qq.com> writes:

> ffmpeg2.1

This looks old

> -i /home/mps/chd/out.avi

> I found the cpu load use is 140%, it's not 100%

If you don't want FFmpeg to decode (!) with
automatically chosen number of threads (as many
cores as you have), tell it with:
$ ffmpeg -threads 1 -i file

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user