[FFmpeg-user] ffmpeg multi threading
Lou
lou at fakeoutdoorsman.com
Wed Apr 27 19:10:52 CEST 2011
On Wed, 27 Apr 2011 09:39:58 +0200
shacky <shacky83 at gmail.com> wrote:
> I solved the problem on the x264 preset.
> I made a benchmark between the x264 with -threads 0 option and the flv
> codec with the command I specified in my first message, but the flv
> codec is faster than the x264 one.
>
> How is it possible?
You could use a faster preset. Show your FFmpeg command and the complete
terminal output.
> 2011/4/27 shacky <shacky83 at gmail.com>:
> > 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
More information about the ffmpeg-user
mailing list