[FFmpeg-user] Using the -threads option with -c:v mpeg4?

andrew andrew at andrews-corner.org
Thu Dec 27 00:49:41 CET 2012


On Wed, Dec 26, 2012 at 11:19:25AM +0000, Carl Eugen Hoyos wrote:
> andrew <andrew <at> andrews-corner.org> writes:
> 
> > -c:v mpeg4 -q:v 5 -vtag XVID -threads auto
> 
> Complete command line and complete, uncut console output missing.

My apologies here it is:

---->
andrew at skamandros~/media/YouTube$ ffmpeg -y -i "Cold_Chisel_Bow_River.mp4" -threads auto \
> -c:v mpeg4 -q:v 5 -vtag XVID -f avi -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 \
> -c:a libmp3lame -ac 2 -q:a 3 -ar 44100 \
> "Cold_Chisel_Bow_River.avi"
ffmpeg version N-48210-g955c7c7 Copyright (c) 2000-2012 the FFmpeg developers
  built on Dec 26 2012 22:28:14 with gcc 4.7.1 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/man --enable-postproc --enable-avfilter --enable-pthreads --enable-shared --disable-static --disable-ffserver --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-zlib --enable-libfreetype --enable-x11grab --enable-libopus --enable-nonfree --enable-gpl --enable-version3
  libavutil      52. 12.100 / 52. 12.100
  libavcodec     54. 81.100 / 54. 81.100
  libavformat    54. 50.102 / 54. 50.102
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 30.101 /  3. 30.101
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Cold_Chisel_Bow_River.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomavc1mp42
    creation_time   : 2007-12-16 01:33:53
  Duration: 00:07:02.44, start: 0.000000, bitrate: 375 kb/s
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 119 kb/s
    Metadata:
      creation_time   : 2007-12-16 01:33:53
      handler_name    : (C) 2007 Google Inc. v06.24.2007.
    Stream #0:1(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 253 kb/s, 29.92 fps, 29.92 tbr, 29917 tbn, 59834 tbc
    Metadata:
      creation_time   : 2007-12-16 01:33:53
      handler_name    : (C) 2007 Google Inc. v06.24.2007.
Output #0, avi, to 'Cold_Chisel_Bow_River.avi':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomavc1mp42
    ISFT            : Lavf54.50.102
    Stream #0:0(und): Video: mpeg4 (hq) (XVID / 0x44495658), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 29.92 tbn, 29.92 tbc
    Metadata:
      creation_time   : 2007-12-16 01:33:53
      handler_name    : (C) 2007 Google Inc. v06.24.2007.
    Stream #0:1(und): Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp
    Metadata:
      creation_time   : 2007-12-16 01:33:53
      handler_name    : (C) 2007 Google Inc. v06.24.2007.
Stream mapping:
  Stream #0:1 -> #0:0 (h264 -> mpeg4)
  Stream #0:0 -> #0:1 (aac -> libmp3lame)
Press [q] to stop, [?] for help
frame=12638 fps=129 q=5.0 Lsize=   28881kB time=00:07:02.43 bitrate= 560.1kbits/s    
video:22918kB audio:5256kB subtitle:0 global headers:0kB muxing overhead 2.509047%
---->

> > but I believe that:
> > 
> > 1. -threads may not work with mpeg4 encoding
> 
> The mpeg4 encoder supports slice-level multi-threaded encoding.

Which is great news for my encoding efforts with mpeg4 :)

> > 2. -threads auto is deprecated and should be an integer from 0 to?
> >             ^^^^
> 
> I was unable to find any source for this claim, 
> could you elaborate?

In part this was idle gossip on a Forum:

http://ubuntuforums.org/showthread.php?t=2094937

I note the option is still in the FFmpeg help:

-threads           <int>        ED.V.. (from 0 to INT_MAX)
   auto                         ED.V.. autodetect a suitable number of threads to use

but I guess I was after confirmation that this option (auto) worked
for mpeg4 encoding?

Thanks for your trouble,

Andrew
-- 
You think that's air you're breathing now?


More information about the ffmpeg-user mailing list