VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. I am trying to encode a file with this command line
    ffmpeg -i "source.mp4" -c:v libx265 -preset slow -crf 23.8 -vf scale=1920:-1:flags=lanczos -x265-params ref=6:bframes=5:no-sao=1:no-strong-intra-smoothing=1:cutree=0:aq-mode=3:deblock=-1,-1:rskip=0:rc-lookahead=80:subme=1:numa-pools=16:frame-threads=4 -c:a copy -movflags faststart output.mp4

    Some files are coming back with very different encoding setting. Even the CRF is wrong in mediainfo. I am seeing a warning when this happens that says
    [mp4 @ 00000148a5247040] track 1: codec frame size is not set
    I googled this and no one seems to mention this warning as causing a problem

    I am using a fairly recent build: ffmpeg version 2021-10-03-git-2761a7403b-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
    built with gcc 10.3.0 (Rev5, Built by MSYS2 project)

    SOURCE MEDIAINFO:
    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L5.1
    Format settings : CABAC / 4 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference frames : 4 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 32 min 43 s
    Bit rate : 20.5 Mb/s
    Width : 3 840 pixels
    Height : 2 160 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 25.000 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.099
    Stream size : 4.69 GiB (100%)
    Writing library : x264 core 157 r2969 d4099dd
    Encoding settings : 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=0 / 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=8 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=50 / keyint_min=5 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=25.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Language : English
    Codec configuration box : avcC

    X265 OUTPUT MEDIAINFO:
    Video
    ID : 1
    Format : HEVC
    Format/Info : High Efficiency Video Coding
    Format profile : Main@L4@Main
    Codec ID : hev1
    Codec ID/Info : High Efficiency Video Coding
    Duration : 32 min 43 s
    Bit rate : 5 186 kb/s
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 25.000 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0 (Type 0)
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.100
    Stream size : 1.19 GiB (100%)
    Encoding settings : 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=0 / 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=8 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=50 / keyint_min=5 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=25.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Language : English
    Color range : Limited
    Codec configuration box : hvcC

    These encoding settings seem to match the source instead of my encoder settings. Some files encode fine with the exact same settings, but don't have the warning message "codec frame size is not set". I have changed settings around quite a few times and same result for the problem files. If it only happened once I would think a problem with the source but it has happened to 2 of the last 4 files I encoded, so I must be missing something. It might just be incorrect metadata in the output, but I don't know for sure. Please help

    Edit: This is not happening in Handbrake
    Last edited by tony95; 9th Dec 2021 at 14:49.
    Quote Quote  
  2. Even encoding
    ffmpeg -i "input.mp4" -c:v libx265 -preset veryfast -crf 23.8 -c:a copy output.mp4
    Is giving the wrong encode setting in MediaInfo

    Edit: Tried different build, same problem

    Please help
    Last edited by tony95; 9th Dec 2021 at 16:05.
    Quote Quote  
  3. Apparently this is a bug in the August 2021 build, I am rolling back to the July build, seems to resolve the issue.
    Quote Quote  
  4. -crf 23.8?
    I think no decimals are allowed...
    Quote Quote  
  5. Originally Posted by ProWo View Post
    -crf 23.8?
    I think no decimals are allowed...
    This works fine, if you use more than 1 decimal place it rounds up to the nearest tenth. It is an issue with the metadata made in the August build.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!