[FFmpeg-user] ffmpeg multi threading

shacky shacky83 at gmail.com
Wed Apr 27 08:43:31 CEST 2011


Thank you very much for your answer.
I've never used the libx264 codec, so I'm looking to its options.
I tried your command but I got the "Unrecognized option 'preset'" error.
I tried to remove the -presets parameter but I got this error:

Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters
such as bit_rate, rate, width or height

Could you help me please?


2011/4/26 Lou <lou at fakeoutdoorsman.com>:
> On Tue, 26 Apr 2011 16:52:27 +0200
> shacky <shacky83 at gmail.com> wrote:
>
>> Hi.
>> I'm using ffmpeg on my Windows machine to convert some videos from TS
>> to FLV. I have a quadcore processor and I'm making some benchmark to
>> have the conversion process as fast as possible.
>>
>> I'm using the binary win32 static version of ffmpeg from
>> http://ffmpeg.arrozcru.org/autobuilds/.
>
> Newer Windows builds are located here:
> http://hawkeye.arrozcru.org/
>
>> The command I use to convert from TS to FLV is the following:
>>
>> C:\Record\tv>c:\utils\ffmpeg-r26400\bin\ffmpeg.exe -i myfile.ts -y -f
>> flv -s 320x240 -b 464k -ac 2 -ar 22050 -ab 48k myfile.flv
>>
>> But if I try to add the -threads 2 or -threads 4 parameter I get this
>> error:
>>
>> Error while opening encoder for output stream #0.0 - maybe incorrect
>> parameters such as bit_rate, rate, width or height
>>
>> so I'm thinking that ffmpeg is not using all available cores of my
>> CPU...
>>
>> Could you help me please?
>>
>> Thank you very much!
>> Bye.
>
> flv (the encoder, not the container) does not support multithreaded
> encoding.
>
> Use libx264 if you want to output to flv and have multithreaded
> encoding. Example:
>
> ffmpeg -i input -vcodec libx264 -preset medium -crf 24 -threads 0 \
> -vf scale=320:-1 -acodec libmp3lame -ar 44100 -aq 5 output.flv
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list