Opened 6 years ago

Closed 6 years ago

#7585 closed defect (duplicate)

Not correct reference number is displayed

Reported by: ponpon Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Source
Reference 3

ffmpeg -y -f lavfi -i nullsrc=s=1280x720 -c:v libx264 -t 5 test.mp4
ffmpeg version N-92458-gfc94e9704e Copyright (c) 2000-2018 the FFmpeg developers
  built with clang version 5.0.2 (tags/RELEASE_502/final)
  configuration: --prefix=/sw --cc=clang-mp-5.0 --cxx=clang++-mp-5.0 --disable-shared --enable-static --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --optflags=-Ofast --extra-cflags='-I/sw/include -I/opt/local/include ' --extra-ldflags=' -L/sw/lib -L/opt/local/lib -fopenmp' --extra-ldsoflags='-L/sw/lib -L/opt/local/lib -static--target-os=darwin' --arch=x86_64 --cpu=kabylake --enable-avresample --enable-libfdk-aac --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libfreetype --enable-gcrypt --enable-gmp --enable-openssl --enable-librtmp --enable-libass --enable-fontconfig --enable-libfribidi --enable-libbluray --enable-libdc1394 --enable-libmodplug --enable-lzma --enable-libx264 --enable-libx265 --enable-libzimg --enable-libvidstab --enable-libsoxr --enable-libsmbclient --enable-libcdio --enable-opengl --enable-opencl --pkg-config-flags=' --libs --static'
  libavutil      56. 23.101 / 56. 23.101
  libavcodec     58. 39.100 / 58. 39.100
  libavformat    58. 22.100 / 58. 22.100
  libavdevice    58.  6.100 / 58.  6.100
  libavfilter     7. 44.100 /  7. 44.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, lavfi, from 'nullsrc=s=1280x720':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7f9c0f802400] using SAR=1/1
[libx264 @ 0x7f9c0f802400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f9c0f802400] profile Progressive High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7f9c0f802400] 264 - core 156 r2917 3cf8a9c - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4':
  Metadata:
    encoder         : Lavf58.22.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.39.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  125 fps=0.0 q=-1.0 Lsize=       8kB time=00:00:04.88 bitrate=  13.4kbits/s speed=16.3x    
video:6kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 40.346363%
[libx264 @ 0x7f9c0f802400] frame I:1     Avg QP: 9.00  size:   222
[libx264 @ 0x7f9c0f802400] frame P:31    Avg QP: 9.23  size:    46
[libx264 @ 0x7f9c0f802400] frame B:93    Avg QP:12.67  size:    38
[libx264 @ 0x7f9c0f802400] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
[libx264 @ 0x7f9c0f802400] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x7f9c0f802400] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
[libx264 @ 0x7f9c0f802400] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%
[libx264 @ 0x7f9c0f802400] 8x8 transform intra:0.0%
[libx264 @ 0x7f9c0f802400] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x7f9c0f802400] i16 v,h,dc,p: 98%  0%  2%  0%
[libx264 @ 0x7f9c0f802400] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 0x7f9c0f802400] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f9c0f802400] kb/s:8.23

Result
Displayed reference is 1

ffmpeg -v verbose -i test.mp4
ffmpeg version N-92458-gfc94e9704e Copyright (c) 2000-2018 the FFmpeg developers
  built with clang version 5.0.2 (tags/RELEASE_502/final)
  configuration: --prefix=/sw --cc=clang-mp-5.0 --cxx=clang++-mp-5.0 --disable-shared --enable-static --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --optflags=-Ofast --extra-cflags='-I/sw/include -I/opt/local/include ' --extra-ldflags=' -L/sw/lib -L/opt/local/lib -fopenmp' --extra-ldsoflags='-L/sw/lib -L/opt/local/lib -static--target-os=darwin' --arch=x86_64 --cpu=kabylake --enable-avresample --enable-libfdk-aac --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libfreetype --enable-gcrypt --enable-gmp --enable-openssl --enable-librtmp --enable-libass --enable-fontconfig --enable-libfribidi --enable-libbluray --enable-libdc1394 --enable-libmodplug --enable-lzma --enable-libx264 --enable-libx265 --enable-libzimg --enable-libvidstab --enable-libsoxr --enable-libsmbclient --enable-libcdio --enable-opengl --enable-opencl --pkg-config-flags=' --libs --static'
  libavutil      56. 23.101 / 56. 23.101
  libavcodec     58. 39.100 / 58. 39.100
  libavformat    58. 22.100 / 58. 22.100
  libavdevice    58.  6.100 / 58.  6.100
  libavfilter     7. 44.100 /  7. 44.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[h264 @ 0x7f9588812c00] Reinit context to 1280x720, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.22.100
  Duration: 00:00:05.00, start: 0.000000, bitrate: 13 kb/s
    Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 9 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
At least one output file must be specified
[AVIOContext @ 0x7f9588425a40] Statistics: 8185 bytes read, 0 seeks

Attachments (1)

test.mp4 (8.0 KB ) - added by ponpon 6 years ago.

Download all attachments as: .zip

Change History (4)

by ponpon, 6 years ago

Attachment: test.mp4 added

comment:1 by Carl Eugen Hoyos, 6 years ago

I would expect your input to produce an output with one reference frame: How do you know that the output file has more reference frames?

in reply to:  1 comment:2 by ponpon, 6 years ago

Replying to cehoyos:
ref=3 is used in the setting of references in libx264. It is the default of libx264.
And it is gotten that

mediainfo --"Output=Video;%Format_Settings_RefFrames%" test.mp4
4

comment:3 by Carl Eugen Hoyos, 6 years ago

Resolution: duplicate
Status: newclosed

Duplicate of ticket #6001.

Note: See TracTickets for help on using tickets.