[FFmpeg-user] Make conversion go faster

Ferdi Scholten ferdi at sttc-nlp.nl
Fri Sep 15 10:02:59 EEST 2023


This is the output:
> ffmpeg version 4.4.1-full_build-www.gyan.dev Copyright (c) 2000-2021 the
> FFmpeg developers
>    built with gcc 11.2.0 (Rev1, Built by MSYS2 project)
>    configuration: --enable-gpl --enable-version3 --enable-static
> --disable-w32threads --disable-autodetect --enable-fontconfig
> --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma
> --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt
> --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray
> --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi
> --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg
> --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype
> --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg
> --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec
> --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2
> --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl
> --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt
> --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine
> --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc
> --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
> --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa
> --enable-libbs2b --enable-libflite --enable-libmysofa
> --enable-librubberband --enable-libsoxr --enable-chromaprint
>    libavutil      56. 70.100 / 56. 70.100
>    libavcodec     58.134.100 / 58.134.100
>    libavformat    58. 76.100 / 58. 76.100
>    libavdevice    58. 13.100 / 58. 13.100
>    libavfilter     7.110.100 /  7.110.100
>    libswscale      5.  9.100 /  5.  9.100
>    libswresample   3.  9.100 /  3.  9.100
>    libpostproc    55.  9.100 / 55.  9.100
> Guessed Channel Layout for Input Stream #0.0 : stereo
> Input #0, wav, from
> '\\.\pipe\FFMpegCore_5af55f72-2307-408f-989d-50a819539903':
>    Duration: N/A, bitrate: 256 kb/s
>    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, stereo,
> s16, 256 kb/s
> Stream mapping:
>    Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
> Press [q] to stop, [?] for help
> Output #0, mp3, to
> '\\.\pipe\FFMpegCore_3c1a6c57-09c6-4169-b5bb-9a7ce72c54da':
>    Metadata:
>      TSSE            : Lavf58.76.100
>    Stream #0:0: Audio: mp3, 8000 Hz, stereo, s16p
>      Metadata:
>        encoder         : Lavc58.134.100 libmp3lame
> size=       0kB time=00:00:00.00 bitrate=N/A speed=N/A
> size=      19kB time=00:00:06.19 bitrate=  24.9kbits/s speed=7.81x
> \\.\pipe\FFMpegCore_5af55f72-2307-408f-989d-50a819539903: Invalid argument
> size=      39kB time=00:00:13.10 bitrate=  24.4kbits/s speed=  16x
> video:0kB audio:39kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.112613%
>
> On Wed, Sep 13, 2023 at 7:08 PM Ferdi Scholten<ferdi at sttc-nlp.nl>  wrote:
>
>> Hi! I'm using this command to convert wav audio to mp3:
>>>    -i "\\.\pipe\FFMpegCore_d1110724-bf07-4ada-9ea4-5b404aea3d52" -b:a 64k
>> -f
>>> mp3 "\\.\pipe\FFMpegCore_c9edc9bd-8061-42a8-a806-ff34bfa7408d" -y
>>>
>>> I would like it to go faster. How can I make it faster?
>>> Thanks!
>>>
>> Please post complete terminal output of that command.
How about trying to use a recent version of FFmpeg instead of the 
ancient 4.4? We are at version 6 nowadays.

So your conversion speed is 16x. On my laptop ( 5 years old quadcore 
skylake based i7 8650U) a conversion from wav to mp3 with FFmpeg 6 runs 
at 17x while the system is at full load from other tasks. (mainly caused 
by simultaneously converting a 2 hour documentary movie to av1 with 
FFmpeg using libsvtav1 and opus).

Your speed might be limited by system constraints, like IO speed, cpu 
speed, number of cores, load and memory size/speed etc.


More information about the ffmpeg-user mailing list