Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMD VCE 265 has a input file bitrate dependent output bitrate #3447

Closed
PMunkes opened this issue Mar 2, 2021 · 10 comments
Closed

AMD VCE 265 has a input file bitrate dependent output bitrate #3447

PMunkes opened this issue Mar 2, 2021 · 10 comments
Labels
Milestone

Comments

@PMunkes
Copy link
Contributor

PMunkes commented Mar 2, 2021

With a 500MBit/s input video file it is not possible to produce an output file with a bitrate below ~36MBit/s.
Irrespective of the selected output bitrate, the resulting file always has a bitrate of about 36MBit/s.
Transcoding the video once and re-transcoding it again reduces the resulting bit rate.

"Transcoding" the file using OBS works without issues.

HandBrake version (e.g., 1.3.0):

Handbrake 1.3.3

Operating system and version (e.g., Ubuntu 19.10, macOS 10.15 Catalina, Windows 10 1909):

Windows 10 20H2

Error message text and/or screenshot:

The files in the screenshots are 17 seconds long.

grafik grafik

HandBrake Activity Log:

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19042.0
CPU: AMD Ryzen 7 5800X 8-Core Processor             
Ram: 32711 MB, 
GPU Information:
  Radeon (TM) RX 480 Graphics - 27.20.14535.1000
  AMD Radeon RX 6800 - 27.20.14535.1000
Screen: 2560x1440
Temp Dir: C:\Users\Philipp\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Philipp\AppData\Roaming\HandBrake

-------------------------------------------


# Starting Encode ...

[12:48:25] base preset: Production Max (Modified)
[00:48:25] hb_init: starting libhb thread
[00:48:25] Starting work at: Wed Mar 03 00:48:25 2021
[00:48:25] 1 job(s) to process
[00:48:25] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "F:\\Source 500Mbit X264-6k-vce265.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1440",
          "width": "2560"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "F:\\Downloads\\source_500mbit_x264.m4v"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "vce_h265",
    "Level": "auto",
    "Bitrate": 6000,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "quality",
    "Profile": "main",
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[00:48:25] CPU: AMD Ryzen 7 5800X 8-Core Processor
[00:48:25]  - logical processor count: 16
[00:48:25] Intel Quick Sync Video support: no
[00:48:25] hb_scan: path=F:\Downloads\source_500mbit_x264.m4v, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image F:\Downloads\source_500mbit_x264.m4v
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(F:\Downloads\source_500mbit_x264.m4v\) failed
[00:48:25] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[00:48:25] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\Downloads\source_500mbit_x264.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2021-03-01T21:53:16.000000Z
    encoder         : HandBrake 1.3.3 2020061300
  Duration: 00:00:17.43, start: 0.000000, bitrate: 479967 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 2560x1440 [SAR 1:1 DAR 16:9], 479977 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
    Metadata:
      creation_time   : 2021-03-01T21:53:16.000000Z
      handler_name    : VideoHandler
[00:48:25] scan: decoding previews for title 1
[00:48:28] scan: 10 previews, 2560x1440, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[00:48:28] scan: supported video decoders: avcodec qsv
[00:48:28] libhb: scan thread found 1 valid title(s)
[00:48:28] Starting Task: Encoding Pass
[00:48:28] Skipping crop/scale filter
[00:48:28] work: only 1 chapter, disabling chapter markers
[00:48:28] job configuration:
[00:48:28]  * source
[00:48:28]    + F:\Downloads\source_500mbit_x264.m4v
[00:48:28]    + title 1, chapter(s) 1 to 1
[00:48:28]    + container: mov,mp4,m4a,3gp,3g2,mj2
[00:48:28]    + data rate: 479967 kbps
[00:48:28]  * destination
[00:48:28]    + F:\Source 500Mbit X264-6k-vce265.m4v
[00:48:28]    + container: MPEG-4 (libavformat)
[00:48:28]  * video track
[00:48:28]    + decoder: h264
[00:48:28]      + bitrate 479977 kbps
[00:48:28]    + filter
[00:48:28]      + Framerate Shaper (mode=1)
[00:48:28]        + frame rate: 60.000 fps -> constant 60.000 fps
[00:48:28]    + Output geometry
[00:48:28]      + storage dimensions: 2560 x 1440
[00:48:28]      + pixel aspect ratio: 1 : 1
[00:48:28]      + display dimensions: 2560 x 1440
[00:48:28]    + encoder: H.265 (AMD VCE)
[00:48:28]      + preset:  quality
[00:48:28]      + profile: main
[00:48:28]      + level:   auto
[00:48:28]      + bitrate: 6000 kbps, pass: 0
[00:48:28]      + color profile: 1-1-1
[00:48:28] sync: expecting 1046 video frames
[00:48:28] encavcodecInit: H.265 (AMD VCE)
[00:48:28] encavcodec: encoding at rc=vbr_peak Bitrate 6000
[00:48:28] encavcodec: encoding with stored aspect 1/1
[00:48:28] sync: first pts video is 0
[00:48:28] sync: "Chapter 1" (1) at frame 1 time 0
[00:48:39] reader: done. 1 scr changes
[00:48:40] work: average encoding speed for job is 92.708130 fps
[00:48:40] vfr: 1046 frames output, 0 dropped and 0 duped for CFR/PFR
[00:48:40] vfr: lost time: 0 (0 frames)
[00:48:40] vfr: gained time: 0 (0 frames) (0 not accounted for)
[00:48:40] h264-decoder done: 1046 frames, 0 decoder errors
[00:48:40] sync: got 1046 frames, 1046 expected
[00:48:40] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
[00:48:40] mux: track 0, 1046 frames, 80953042 bytes, 37113.14 kbps, fifo 256
[00:48:40] Finished work at: Wed Mar 03 00:48:40 2021
[00:48:40] libhb: work result = 0

# Encode Completed ...


@PMunkes PMunkes changed the title AMD VCE 265 has a input file bit rate dependent output bitrate AMD VCE 265 has a input file bitrate dependent output bitrate Mar 3, 2021
@galad87
Copy link
Contributor

galad87 commented Mar 3, 2021

Maybe a duplicate of #2980

@PMunkes
Copy link
Contributor Author

PMunkes commented Mar 3, 2021

It is at least slightly different, as the quality settings work. QP45 produced a file that was 1/7th the size of the QP 35.

@PMunkes
Copy link
Contributor Author

PMunkes commented Mar 3, 2021

I spun my own version updated to AMF 1.4.18 just now and the issue persists. I have filed an issue on the AMF Repo.

Log:

HandBrake Nightly 20210303115253-4dc9fadd7-patch-1 (2021030301)
OS: Microsoft Windows NT 10.0.19042.0
CPU: AMD Ryzen 7 5800X 8-Core Processor             
Ram: 32711 MB, 
GPU Information:
  AMD Radeon RX 6800 - 27.20.14535.1000
Screen: 2560x1440
Temp Dir: C:\Users\Philipp\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Philipp\AppData\Roaming\HandBrake\Nightly

-------------------------------------------


# Starting Encode ...

[01:01:33] base preset: Production Max (Modified)
[13:01:33] hb_init: starting libhb thread
[13:01:33] Starting work at: Wed Mar 03 13:01:33 2021
[13:01:33] 1 job(s) to process
[13:01:33] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "F:\\Videos\\Source 500Mbit X264-vce265-4k.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1440",
          "width": "2560"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "F:\\Downloads\\source_500mbit_x264.m4v"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "vce_h265",
    "Level": "auto",
    "Bitrate": 4000,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "quality",
    "Profile": "main",
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[13:01:33] CPU: AMD Ryzen 7 5800X 8-Core Processor
[13:01:33]  - logical processor count: 16
[13:01:33] Intel Quick Sync Video support: no
[13:01:33] hb_scan: path=F:\Downloads\source_500mbit_x264.m4v, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image F:\Downloads\source_500mbit_x264.m4v
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(F:\Downloads\source_500mbit_x264.m4v\) failed
[13:01:33] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[13:01:33] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\Downloads\source_500mbit_x264.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2021-03-01T21:53:16.000000Z
    encoder         : HandBrake 1.3.3 2020061300
  Duration: 00:00:17.43, start: 0.000000, bitrate: 479967 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 2560x1440 [SAR 1:1 DAR 16:9], 479977 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
    Metadata:
      creation_time   : 2021-03-01T21:53:16.000000Z
      handler_name    : VideoHandler
[13:01:33] scan: decoding previews for title 1
[13:01:35] scan: 10 previews, 2560x1440, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1
[13:01:35] scan: supported video decoders: avcodec qsv
[13:01:35] libhb: scan thread found 1 valid title(s)
[13:01:36] Starting Task: Encoding Pass
[13:01:36] Skipping crop/scale filter
[13:01:36] work: only 1 chapter, disabling chapter markers
[13:01:36] job configuration:
[13:01:36]  * source
[13:01:36]    + F:\Downloads\source_500mbit_x264.m4v
[13:01:36]    + title 1, chapter(s) 1 to 1
[13:01:36]    + container: mov,mp4,m4a,3gp,3g2,mj2
[13:01:36]    + data rate: 479967 kbps
[13:01:36]  * destination
[13:01:36]    + F:\Videos\Source 500Mbit X264-vce265-4k.m4v
[13:01:36]    + container: MPEG-4 (libavformat)
[13:01:36]  * video track
[13:01:36]    + decoder: h264 8-bit
[13:01:36]      + bitrate 479977 kbps
[13:01:36]    + filter
[13:01:36]      + Framerate Shaper (mode=1)
[13:01:36]        + frame rate: 60.000 fps -> constant 60.000 fps
[13:01:36]    + Output geometry
[13:01:36]      + storage dimensions: 2560 x 1440
[13:01:36]      + pixel aspect ratio: 1 : 1
[13:01:36]      + display dimensions: 2560 x 1440
[13:01:36]    + encoder: H.265 (AMD VCE)
[13:01:36]      + preset:  quality
[13:01:36]      + profile: main
[13:01:36]      + level:   auto
[13:01:36]      + bitrate: 4000 kbps, pass: 0
[13:01:36]      + color profile: 1-1-1
[13:01:36] sync: expecting 1046 video frames
[13:01:36] encavcodecInit: H.265 (AMD VCE)
[13:01:36] encavcodec: encoding at rc=vbr_peak Bitrate 4000
[13:01:36] encavcodec: encoding with stored aspect 1/1
[13:01:36] sync: first pts video is 0
[13:01:36] sync: "Chapter 1" (1) at frame 1 time 0
[13:01:46] reader: done. 1 scr changes
[13:01:46] work: average encoding speed for job is 104.184929 fps
[13:01:46] vfr: 1046 frames output, 0 dropped and 0 duped for CFR/PFR
[13:01:46] vfr: lost time: 0 (0 frames)
[13:01:46] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:01:46] h264-decoder done: 1046 frames, 0 decoder errors
[13:01:46] sync: got 1046 frames, 1046 expected
[13:01:46] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
[13:01:46] mux: track 0, 1046 frames, 80757896 bytes, 37023.68 kbps, fifo 256
[13:01:46] Finished work at: Wed Mar 03 13:01:46 2021
[13:01:46] libhb: work result = 0

# Encode Completed ...


@sr55
Copy link
Contributor

sr55 commented Mar 3, 2021

Does it happen to work if only the RX480 is in the machine?

Could be HB or ffmpeg related. Sadly I don't have a card to hand to do any testing.

@PMunkes
Copy link
Contributor Author

PMunkes commented Mar 4, 2021

No change with the RX 480. Though there has been something of a development in the AMF ticket. It seems that the issue stems from ffmpeg and some poorly chosen default values.
Quote from #256 from the AMF repository:

In hevc_amf implementation QP values defaulted to 0-51.
The problem is that ffmpeg sets qmin = 2 and qmax=31 as defaults in options_table.h and hevc_amf picks them up if hevc_amf QPs are not set.

Common properties like qmin and qmax could be re-defaulted in hevc_amf but it is not good practice. Or handbrake should set them explicitly.

HandBrake Nightly 20210303115253-4dc9fadd7-patch-1 (2021030301)
OS: Microsoft Windows NT 10.0.19042.0
CPU: AMD Ryzen 7 5800X 8-Core Processor             
Ram: 32711 MB, 
GPU Information:
  Radeon (TM) RX 480 Graphics - 27.20.14535.1000
Screen: 2560x1440
Temp Dir: C:\Users\Philipp\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Philipp\AppData\Roaming\HandBrake\Nightly

-------------------------------------------


# Starting Encode ...

[01:05:21] base preset: Production Max (Modified)
[01:05:21] hb_init: starting libhb thread
[01:05:21] Starting work at: Thu Mar 04 01:05:21 2021
[01:05:21] 1 job(s) to process
[01:05:21] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "F:\\Videos\\Source 500Mbit X264-1.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1440",
          "width": "2560"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "F:\\Downloads\\source_500mbit_x264.m4v"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "vce_h265",
    "Level": "auto",
    "Bitrate": 5000,
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "quality",
    "Profile": "main",
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[01:05:21] CPU: AMD Ryzen 7 5800X 8-Core Processor
[01:05:21]  - logical processor count: 16
[01:05:21] Intel Quick Sync Video support: no
[01:05:21] hb_scan: path=F:\Downloads\source_500mbit_x264.m4v, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image F:\Downloads\source_500mbit_x264.m4v
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(F:\Downloads\source_500mbit_x264.m4v\) failed
[01:05:21] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[01:05:21] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\Downloads\source_500mbit_x264.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2021-03-01T21:53:16.000000Z
    encoder         : HandBrake 1.3.3 2020061300
  Duration: 00:00:17.43, start: 0.000000, bitrate: 479967 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 2560x1440 [SAR 1:1 DAR 16:9], 479977 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
    Metadata:
      creation_time   : 2021-03-01T21:53:16.000000Z
      handler_name    : VideoHandler
[01:05:22] scan: decoding previews for title 1
[01:05:24] scan: 10 previews, 2560x1440, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1
[01:05:24] scan: supported video decoders: avcodec qsv
[01:05:24] libhb: scan thread found 1 valid title(s)
[01:05:24] Starting Task: Encoding Pass
[01:05:24] Skipping crop/scale filter
[01:05:24] work: only 1 chapter, disabling chapter markers
[01:05:24] job configuration:
[01:05:24]  * source
[01:05:24]    + F:\Downloads\source_500mbit_x264.m4v
[01:05:24]    + title 1, chapter(s) 1 to 1
[01:05:24]    + container: mov,mp4,m4a,3gp,3g2,mj2
[01:05:24]    + data rate: 479967 kbps
[01:05:24]  * destination
[01:05:24]    + F:\Videos\Source 500Mbit X264-1.m4v
[01:05:24]    + container: MPEG-4 (libavformat)
[01:05:24]  * video track
[01:05:24]    + decoder: h264 8-bit
[01:05:24]      + bitrate 479977 kbps
[01:05:24]    + filter
[01:05:24]      + Framerate Shaper (mode=1)
[01:05:24]        + frame rate: 60.000 fps -> constant 60.000 fps
[01:05:24]    + Output geometry
[01:05:24]      + storage dimensions: 2560 x 1440
[01:05:24]      + pixel aspect ratio: 1 : 1
[01:05:24]      + display dimensions: 2560 x 1440
[01:05:24]    + encoder: H.265 (AMD VCE)
[01:05:24]      + preset:  quality
[01:05:24]      + profile: main
[01:05:24]      + level:   auto
[01:05:24]      + bitrate: 5000 kbps, pass: 0
[01:05:24]      + color profile: 1-1-1
[01:05:25] sync: expecting 1046 video frames
[01:05:25] encavcodecInit: H.265 (AMD VCE)
[01:05:25] encavcodec: encoding at rc=vbr_peak Bitrate 5000
[01:05:25] encavcodec: encoding with stored aspect 1/1
[01:05:25] sync: first pts video is 0
[01:05:25] sync: "Chapter 1" (1) at frame 1 time 0
[01:05:43] reader: done. 1 scr changes
[01:05:45] work: average encoding speed for job is 53.962543 fps
[01:05:45] vfr: 1046 frames output, 0 dropped and 0 duped for CFR/PFR
[01:05:45] vfr: lost time: 0 (0 frames)
[01:05:45] vfr: gained time: 0 (0 frames) (0 not accounted for)
[01:05:45] h264-decoder done: 1046 frames, 0 decoder errors
[01:05:45] sync: got 1046 frames, 1046 expected
[01:05:45] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
[01:05:45] mux: track 0, 1046 frames, 96951274 bytes, 44447.58 kbps, fifo 256
[01:05:45] Finished work at: Thu Mar 04 01:05:45 2021
[01:05:45] libhb: work result = 0

# Encode Completed ...


PMunkes added a commit to PMunkes/HandBrake that referenced this issue Mar 4, 2021
By default ffmpeg restricts qp factors to a range of 2 to 31, unless otherwise overwritten. This significantly constrains the low bitrate performance of VCE in H.264 mode.
This should fix issue HandBrake#3447 and could also address parts of issue HandBrake#2980.
@PMunkes
Copy link
Contributor Author

PMunkes commented Mar 4, 2021

Since the fix is fairly trivial, would it be desirable to backport this for a potential 1.3.4 release?

@bradleysepos
Copy link
Contributor

Since the fix is fairly trivial, would it be desirable to backport this for a potential 1.3.4 release?

I can merge it to the 1.3.x branch (there are a few other minor fixes there). Realistically, we will likely not be doing 1.3.4 proper as 1.4.0 is in sight.

@PMunkes
Copy link
Contributor Author

PMunkes commented Mar 4, 2021

Fair enough.

TimothyGu pushed a commit to FFmpeg/FFmpeg that referenced this issue Mar 9, 2021
…zer scale.

Current settings makes bitrate larger than expected, more information:
HandBrake/HandBrake#3447 (comment)

Signed-off-by: James Almer <jamrial@gmail.com>
sr55 pushed a commit that referenced this issue Mar 9, 2021
By default ffmpeg restricts qp factors to a range of 2 to 31, unless otherwise overwritten. This significantly constrains the low bitrate performance of VCE in H.264 mode.
This should fix issue #3447 and could also address parts of issue #2980.
@sr55
Copy link
Contributor

sr55 commented Mar 9, 2021

PR Merged :)

@sr55 sr55 closed this as completed Mar 9, 2021
@sr55 sr55 added the Bug label Mar 9, 2021
@sr55 sr55 added this to the 1.4.0 milestone Mar 9, 2021
@PMunkes
Copy link
Contributor Author

PMunkes commented Mar 10, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants