<p>I was trying to do some basic profiling on <code>ffmpeg</code>, following my previous question  <a href="https://superuser.com/questions/1464184">here</a>. I have a relatively high-bitrate .ts file (17mbps), and I have two versions of ffmpeg (2017.3 and 2019.4), and tried to run a decoding process (blackdetect filter) on both of them. I notice the 2019 version is at least 2.2 times faster. More especifically, execution of the following command takes 2.2x faster on the 2019 version:</p>

<pre><code>ffmpeg -i in.ts -vf blackdetect=d=0.1:pix_th=.1 -f rawvideo -y null
</code></pre>

<p>Is this really expected? Is there a known, major performance improvement on ffmpeg that wasn't there in 2017 version? If that's really the case, updating my ffmpeg core should really make it run faster!</p>

<p><strong>EDIT:</strong> 
File is H264 encoded, but relatively higher bitrate. I actually compiled both <code>ffmpeg</code> versions from source code with same build options. If it is decoding improvement, that's something very interesting. </p>

<p>The 2019 <code>ffmpeg</code> command output:</p>

<pre><code>ffmpeg version N-94171-g0cbdedb Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
  configuration: --prefix=/home/user/usr/local --enable-shared
  libavutil      56. 30.100 / 56. 30.100
  libavcodec     58. 53.101 / 58. 53.101
  libavformat    58. 28.101 / 58. 28.101
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 56.100 /  7. 56.100
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
</code></pre>

<p>And the 2017 output:</p>

<pre><code>ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
  configuration: --prefix=bin --bindir=bin
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
</code></pre>

<p><strong>EDIT 2:</strong></p>

<p>Full log for <code>ffmpeg -i in.ts -t 100 -benchmark -an -f null -</code>: <a href="https://www.dropbox.com/s/9skp82wd4qkplr7/2019.txt?dl=0" rel="nofollow noreferrer">2019</a> and <a href="https://www.dropbox.com/s/zt2xc3xpbf6vb5w/2017.txt?dl=0" rel="nofollow noreferrer">2017</a></p>

CC BY-SA 4.0
2019-08-13T15:44:23.013Z
Added the command. Curious why we see this huge improvement.
angel_30
CC BY-SA 4.0
2019-08-14T15:34:10.797Z
File is H264, but high bitrate. I actually compiled both versions from source code with same build options. If it is decoding improvement, that's something I'd be interested.
angel_30
CC BY-SA 4.0
2019-08-15T14:36:36.153Z
@PaulB.Mahol Builds you mean just the `configure` outputs, or also all the `make` outputs?
angel_30
CC BY-SA 4.0
2019-08-15T15:23:02.197Z
oh ok...wait a second...
angel_30
CC BY-SA 4.0
2019-08-15T15:27:39.143Z
@PaulB.Mahol just added those details.
angel_30
CC BY-SA 4.0
2019-08-15T18:25:28.710Z
Yes. Everything the same.
angel_30
CC BY-SA 4.0
2019-08-16T19:21:08.417Z
@PaulB.Mahol any updates?
angel_30
CC BY-SA 4.0
2019-08-17T13:36:58.910Z
Total time to decode. Also, there is a `speed:2.5x` notation on ffmpeg when decoding.
angel_30
CC BY-SA 4.0
2019-08-18T16:13:38.257Z
Well, i meant if speed for 2017 was whatever, the same for 2019 was 2.2x more (I think maybe 2 vs 4.6 or something)
angel_30
CC BY-SA 4.0
2019-08-20T08:50:50.173Z
Share full log for `ffmpeg -i in.ts -t 100 -benchmark -an -f null -` with both versions.
Gyan
CC BY-SA 4.0
2019-08-20T14:56:10.313Z
@Gyan Added those full logs in revised question.
angel_30
<video><ffmpeg><encoding><video-capture><decoding>
FFmpeg 2017 vs 2019 decoding performance improvement
angel_30
# FFmpeg 2017 vs 2019 decoding performance improvement

(Asked by: username_0 on 2019-08-12)

I was trying to do some basic profiling on ffmpeg, following my previous question  here. I have a relatively high-bitrate .ts file (17mbps), and I have two versions of ffmpeg (2017.3 and 2019.4), and tried to run a decoding process (blackdetect filter) on both of them. I notice the 2019 version is at least 2.2 times faster. More especifically, execution of the following command takes 2.2x faster on the 2019 version:
ffmpeg -i in.ts -vf blackdetect=d=0.1:pix_th=.1 -f rawvideo -y null

Is this really expected? Is there a known, major performance improvement on ffmpeg that wasn't there in 2017 version? If that's really the case, updating my ffmpeg core should really make it run faster!
EDIT: 
File is H264 encoded, but relatively higher bitrate. I actually compiled both ffmpeg versions from source code with same build options. If it is decoding improvement, that's something very interesting. 
The 2019 ffmpeg command output:
ffmpeg version N-94171-g0cbdedb Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
  configuration: --prefix=/home/user/usr/local --enable-shared
  libavutil      56. 30.100 / 56. 30.100
  libavcodec     58. 53.101 / 58. 53.101
  libavformat    58. 28.101 / 58. 28.101
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 56.100 /  7. 56.100
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

And the 2017 output:
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
  configuration: --prefix=bin --bindir=bin
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

EDIT 2:
Full log for ffmpeg -i in.ts -t 100 -benchmark -an -f null -: 2019 and 2017

**Tags:** video, ffmpeg, encoding, video-capture, decoding

> **Comments:**
> **username_0**: Added the command. Curious why we see this huge improvement.  
> **username_0**: File is H264, but high bitrate. I actually compiled both versions from source code with same build options. If it is decoding improvement, that's something I'd be interested.  
> **username_0**: @PaulB.Mahol Builds you mean just the `configure` outputs, or also all the `make` outputs?  
> **username_0**: oh ok...wait a second...  
> **username_0**: @PaulB.Mahol just added those details.  
> **username_0**: Yes. Everything the same.  
> **username_0**: @PaulB.Mahol any updates?  
> **username_0**: Total time to decode. Also, there is a `speed:2.5x` notation on ffmpeg when decoding.  
> **username_0**: Well, i meant if speed for 2017 was whatever, the same for 2019 was 2.2x more (I think maybe 2 vs 4.6 or something)  
> **username_1**: Share full log for `ffmpeg -i in.ts -t 100 -benchmark -an -f null -` with both versions.  
> **username_0**: @username_1 Added those full logs in revised question.  

---

## 0 answers

