You are not logged in.

#1 2010-08-21 05:31:42

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

[SOLVED] FFMPEG Using Only 1 Thread

Greetings,

I am having a problem that is killing me. I am using ffmpeg-svn from aur, with "-threads 8" on a core i7 and ffmpeg is only using 1 thread. It doesn't matter if I use ffmpeg from extra or "-threads 0". The commands I am using are:

ffmpeg -y -i movie.h264 -pass 1 -vcodec libx264 -vpre fast_firstpass -b 8192k -bt 1024k -threads 8 -r 24000/1001 -f rawvideo -an -ss 00:30:00 -vframes 2000 /dev/null
ffmpeg -y -i movie.h264 -pass 2 -vcodec libx264 -vpre fast -b 8192k -bt 1024k -threads 8 -r 24000/1001 -an -ss 00:30:00 -vframes 2000 movie.mp4

ffmpeg version:

FFmpeg version SVN-r24856, Copyright (c) 2000-2010 the FFmpeg developers
  built on Aug 20 2010 21:41:07 with gcc 4.5.1
  configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-libmp3lame --enable-libx264 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-postproc --enable-shared --enable-pthreads --enable-x11grab --enable-libvpx --enable-libvorbis --arch=x86_64
  libavutil     50.24. 0 / 50.24. 0
  libavcore      0. 6. 0 /  0. 6. 0
  libavcodec    52.85. 1 / 52.85. 1
  libavformat   52.78. 3 / 52.78. 3
  libavdevice   52. 2. 1 / 52. 2. 1
  libavfilter    1.37. 0 /  1.37. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

Where movie.h264 is a raw stream demuxed from a bluray m2ts file. Transcoding HD video with one thread is unbearable. Has anyone else ever had this problem?

Last edited by demizer (2010-08-21 06:16:33)

Offline

#2 2010-08-21 05:35:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] FFMPEG Using Only 1 Thread

http://aur.archlinux.org/packages.php?ID=5553

DrZaius wrote:

The ./configure option '--enable-pthreads' is redundant because it is now detected automatically:
$ ./configure --help | grep pthreads
--disable-pthreads disable pthreads [auto]

Maybe the package in extra also needs updating, maybe you don't need to explicitly tell ffmpeg how many threads to use and it gets confused.

Offline

#3 2010-08-21 05:46:16

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: [SOLVED] FFMPEG Using Only 1 Thread

I recompiled without "--enable-pthreads" and am still getting the same problem.

I used the following for testing:

ffmpeg -y -i /data/ripped/bluray/jobs/d9-raw.h264 -vcodec libx264 -vpre fast -b 8192k -bt 1024k -r 24000/1001 -vframes 1000 -an test.mp4

Offline

#4 2010-08-21 06:09:36

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] FFMPEG Using Only 1 Thread

tried ffmpeg-mt?


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2010-08-21 06:14:13

demizer
Member
From: Gilroy, CA
Registered: 2010-03-03
Posts: 116
Website

Re: [SOLVED] FFMPEG Using Only 1 Thread

Solved. I guess you shouldn't use the "-ss" option when encoding. Stupid me. Thanks guys/gals.

Offline

Board footer

Powered by FluxBB