Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

Error encoding dual pass video bitrate

Who doesn't love them :) But for faster response on your Bug Reports, please visit: http://www.ffmpeg.org/bugreports.html
Forum rules
First of all, please remember that all the developers working on FFmpeg are volunteers, we are not paid for analyzing, debugging, fixing and answering bug reports. While we try our best to create high quality software and be responsive, if you should not get an answer, please consider the above and be aware of the fact that we receive many bug reports and the amount of time it takes to deal with them can be substantial. Nevertheless most issues get resolved, just please understand that there are no guarantees nor promises.

Error encoding dual pass video bitrate

Postby danieldc » Wed Jan 25, 2017 9:15 pm

I'm trying to reconvert a big AVI file, it's a xvid movie, 1280x536, more than 2 GBytes, 2000 kbs video and AC3 audio.

With some really old version of ffmpeg I would use 2 pass encoding:

Code: Select all
ffmpeg.exe -i "myfileXviD.avi" -vcodec libxvid -vtag DIVX -b:v 900k  -an -pass 1 -passlogfile x -f rawvideo -y nul
ffmpeg.exe -i "myfileXviD.avi" -vcodec libxvid -vtag DIVX -b:v 900k  -acodec libmp3lame -b:a 96k -ac 2 -af "volume=1.2" -pass 2 -passlogfile x  -f avi -y newfile.avi


And the NEWFILE.avi would be a little small and at VIDEO BIT RATE of 900 kbps.

BUT with FFMPEG version N-83096-g6596b34 something is wrong and I'm getting always a bigger file at +1800 kbps video.

Is this a bug or am I doing some mistake?

Thank you, from Brazil



1st pass
Code: Select all
ffmpeg.exe -i "teste1.avi" -vcodec libxvid -vtag DIVX -b:v 950k -vf "scale=720x304, setdar=2.35, setsar=1.0" -an -pass 1 -passlogfile teste1log -f rawvideo -y nul

ffmpeg version N-83096-g6596b34 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx -
-enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei
0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-li
bbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --en
able-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-li
bopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --e
nable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable
-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --e
nable-lzma --enable-decklink --enable-zlib
  libavutil      55. 43.100 / 55. 43.100
  libavcodec     57. 72.100 / 57. 72.100
  libavformat    57. 62.100 / 57. 62.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 69.100 /  6. 69.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
[aac @ 053102a0] element type mismatch 1 != 0
Input #0, avi, from 'teste1.avi':
  Metadata:
    encoder         : Lavf57.62.100
  Duration: 00:01:00.03, start: 0.000000, bitrate: 2095 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 128
0x536 [SAR 1:1 DAR 160:67], 2022 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
    Stream #0:1: Audio: aac (HE-AAC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo
, fltp, 64 kb/s
Output #0, rawvideo, to 'nul':
  Metadata:
    encoder         : Lavf57.62.100
    Stream #0:0: Video: mpeg4 (libxvid) (DIVX / 0x58564944), yuv420p, 720x304 [S
AR 1:1 DAR 45:19], q=2-31, 950 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc57.72.100 libxvid
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (libxvid))
Press [q] to stop, [?] for help
frame=  145 fps=0.0 q=2.0 size=    1520kB time=00:00:06.04 bitrate=2059.6kbits/s
frame=  303 fps=302 q=2.0 size=    2989kB time=00:00:12.63 bitrate=1937.8kbits/s
frame=  437 fps=291 q=2.0 size=    5103kB time=00:00:18.22 bitrate=2293.6kbits/s
frame=  611 fps=305 q=2.0 size=    6274kB time=00:00:25.48 bitrate=2016.8kbits/s
frame=  776 fps=310 q=2.0 size=    7774kB time=00:00:32.36 bitrate=1967.7kbits/s
frame=  946 fps=315 q=2.0 size=    8987kB time=00:00:39.45 bitrate=1865.9kbits/s
frame= 1110 fps=316 q=2.0 size=   10311kB time=00:00:46.29 bitrate=1824.6kbits/s
frame= 1268 fps=316 q=2.0 size=   12020kB time=00:00:52.88 bitrate=1861.9kbits/s
frame= 1433 fps=318 q=2.0 size=   13718kB time=00:00:59.76 bitrate=1880.2kbits/s
frame= 1439 fps=318 q=2.0 Lsize=   13808kB time=00:01:00.01 bitrate=1884.7kbits/
s speed=13.3x
video:13808kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
 overhead: 0.000000%


2nd pass
Code: Select all
ffmpeg.exe  -i "teste1.avi"  -vcodec libxvid -vtag DIVX -b:v 950k -vf "scale=720x304, setdar=2.35, setsar=1.0" -acodec libmp3lame -b:a 96k -ac 2  -af "volume=1.2" -pass 2 -passlogfile teste1log -f avi -y output.avi

ffmpeg version N-83096-g6596b34 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx -
-enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei
0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-li
bbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --en
able-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-li
bopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --e
nable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable
-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --e
nable-lzma --enable-decklink --enable-zlib
  libavutil      55. 43.100 / 55. 43.100
  libavcodec     57. 72.100 / 57. 72.100
  libavformat    57. 62.100 / 57. 62.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 69.100 /  6. 69.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
[aac @ 05300b60] element type mismatch 1 != 0
Input #0, avi, from 'teste1.avi':
  Metadata:
    encoder         : Lavf57.62.100
  Duration: 00:01:00.03, start: 0.000000, bitrate: 2095 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 128
0x536 [SAR 1:1 DAR 160:67], 2022 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
    Stream #0:1: Audio: aac (HE-AAC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo
, fltp, 64 kb/s
Output #0, avi, to 'output.avi':
  Metadata:
    ISFT            : Lavf57.62.100
    Stream #0:0: Video: mpeg4 (libxvid) (DIVX / 0x58564944), yuv420p, 720x304 [S
AR 1:1 DAR 45:19], q=2-31, 950 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc57.72.100 libxvid
    Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo
, fltp, 96 kb/s
    Metadata:
      encoder         : Lavc57.72.100 libmp3lame
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (libxvid))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[aac @ 059dbe20] element type mismatch 1 != 0
    Last message repeated 3 times
frame=  109 fps=0.0 q=2.0 size=    1171kB time=00:00:04.63 bitrate=2071.3kbits/s
frame=  216 fps=215 q=2.0 size=    2179kB time=00:00:09.12 bitrate=1957.7kbits/s
frame=  316 fps=210 q=2.0 size=    3261kB time=00:00:13.24 bitrate=2016.6kbits/s
frame=  409 fps=204 q=2.0 size=    4774kB time=00:00:17.13 bitrate=2282.4kbits/s
frame=  510 fps=203 q=2.0 size=    5832kB time=00:00:21.31 bitrate=2241.9kbits/s
frame=  621 fps=207 q=2.0 size=    6628kB time=00:00:25.96 bitrate=2091.0kbits/s
frame=  727 fps=207 q=2.0 size=    7679kB time=00:00:30.40 bitrate=2068.8kbits/s
frame=  840 fps=209 q=2.0 size=    8601kB time=00:00:35.13 bitrate=2005.2kbits/s
frame=  952 fps=211 q=2.0 size=    9473kB time=00:00:39.79 bitrate=1950.2kbits/s
frame= 1064 fps=212 q=2.0 size=   10407kB time=00:00:44.47 bitrate=1917.0kbits/s
frame= 1173 fps=213 q=2.0 size=   11588kB time=00:00:49.00 bitrate=1937.1kbits/s
frame= 1281 fps=213 q=2.0 size=   12734kB time=00:00:53.47 bitrate=1950.8kbits/s
frame= 1385 fps=213 q=2.0 size=   13866kB time=00:00:57.84 bitrate=1963.9kbits/s
frame= 1439 fps=213 q=2.0 Lsize=   14540kB time=00:01:00.04 bitrate=1983.6kbits/
s speed=8.88x
video:13733kB audio:704kB subtitle:0kB other streams:0kB global headers:0kB muxi
ng overhead: 0.712789%
danieldc
 
Posts: 4
Joined: Thu Dec 01, 2016 12:31 am

Return to Bugs, bugs, bugs :)

Who is online

Users browsing this forum: No registered users and 1 guest