Video flicker using QSV encoder

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
steven52880
Posts: 4
Joined: Sun May 21, 2023 4:19 am

Video flicker using QSV encoder

Post by steven52880 »

Description of problem or question:

Hello. I am using qsv encoding for videos and using higher ICQ (lower quality). Whether using H264 or H265, the output video always "flickers" once per second. The lower the quality I use, the more obvious the flicker occurs. Choosing nvenc, amf, or x264 does not have this problem. Here is a piece of 5-seconds video using 45 ICQ: https://drive.google.com/file/d/1EQaGBf ... share_link


Steps to reproduce the problem (If Applicable):


HandBrake version (e.g., 1.0.0):

1.6.1 (2023012300)

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 21H2
Intel I5 12400 with UHD730

HandBrake Activity Log ***required***

Code: Select all

HandBrake 1.6.1 (2023012300)
OS: Microsoft Windows NT 10.0.19044.0
CPU: 12th Gen Intel(R) Core(TM) i5-12400
Ram: 32058 MB, 
GPU Information:
  NVIDIA GeForce RTX 2060 - 31.0.15.3179
  Intel(R) UHD Graphics 730 - 30.0.101.1371
Screen: 2048x1152
Temp Dir: D:\Tools\HandBrake\tmp\
Install Dir: D:\Tools\HandBrake\
Data Dir: D:\Tools\HandBrake\storage\HandBrake

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

 # Starting Encode ...

[12:28:54] base preset: Archive_Low (ICQ34) (Modified)
[12:28:54] hb_init: starting libhb thread
[12:28:54] Starting work at: Sun May 21 12:28:54 2023
[12:28:54] 1 job(s) to process
[12:28:54] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0,
        "Encoder": "copy:aac",
        "Gain": 0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac"
    ]
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "\u7AE0\u8282 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Steven\\Videos\\2023-04-17 23-40-26_quality45_2023-5-21-12-28.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 14,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1440",
          "width": "2560"
        }
      },
      {
        "ID": 7,
        "Settings": {
          "mode": "2",
          "rate": "27000000/450000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\Steven\\Videos\\2023-04-17 23-40-26.flv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "nvenc_h264",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "medium",
    "Profile": "auto",
    "Quality": 45,
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 4
  }
}
[12:28:54] CPU: 12th Gen Intel(R) Core(TM) i5-12400
[12:28:54]  - Intel microarchitecture Alder Lake performance hybrid architecture
[12:28:54]  - logical processor count: 12
[12:28:54] Intel Quick Sync Video support: yes, gpu list: 1
[12:28:54] Intel Quick Sync Video integrated adapter with index 1
[12:28:54] Impl mfx-gen library path: C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_08a52cf2f322ba79\libmfx64-gen.dll
[12:28:54]  - Intel Media SDK hardware: API 2.6 (minimum: 1.3)
[12:28:54]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[12:28:54]  - H.264 encoder: yes
[12:28:54]     - preferred implementation: hardware (2) via D3D11
[12:28:54]     - capabilities (hardware):  lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[12:28:54]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[12:28:54]     - preferred implementation: hardware (2) via D3D11
[12:28:54]     - capabilities (hardware):  lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[12:28:54]  - AV1 encoder: no
[12:28:54] hb_scan: path=C:\Users\Steven\Videos\2023-04-17 23-40-26.flv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image C:\Users\Steven\Videos\2023-04-17 23-40-26.flv
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
[12:28:54] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[12:28:54] dvd: not a dvd - trying as a stream/file instead
Input #0, flv, from 'C:\Users\Steven\Videos\2023-04-17 23-40-26.flv':
  Metadata:
    encoder         : Lavf59.27.100
  Duration: 00:01:11.18, start: 0.033000, bitrate: 15121 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709/bt709/iec61966-2-1, progressive), 2560x1440 [SAR 1:1 DAR 16:9], 2500 kb/s, 60 fps, 60 tbr, 1k tbn
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 320 kb/s
[12:28:54] scan: decoding previews for title 1
[12:28:54] scan: audio 0x1: aac, rate=48000Hz, bitrate=320000 Unknown (AAC LC) (2.0 ch) (320 kbps)
[12:28:55] scan: 10 previews, 2560x1440, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-13-1, chroma location: left
[12:28:55] scan: supported video decoders: avcodec qsv nvdec
[12:28:55] libhb: scan thread found 1 valid title(s)
[12:28:55] qsv: integrated qsv adapter with index 1 has been selected
[12:28:55] Skipping subtitle scan.  No suitable subtitle tracks.
[12:28:55] Starting Task: Encoding Pass
[12:28:55] Skipping crop/scale filter
[12:28:55] work: only 1 chapter, disabling chapter markers
[12:28:55] job configuration:
[12:28:55]  * source
[12:28:55]    + C:\Users\Steven\Videos\2023-04-17 23-40-26.flv
[12:28:55]    + title 1, chapter(s) 1 to 1
[12:28:55]    + container: flv
[12:28:55]    + data rate: 15121 kbps
[12:28:55]  * destination
[12:28:55]    + C:\Users\Steven\Videos\2023-04-17 23-40-26_quality45_2023-5-21-12-28.mp4
[12:28:55]    + container: MPEG-4 (libavformat)
[12:28:55]      + align initial A/V stream timestamps
[12:28:55]  * video track
[12:28:55]    + decoder: h264 8-bit (yuv420p)
[12:28:55]      + bitrate 2500 kbps
[12:28:55]    + filter
[12:28:55]      + Framerate Shaper (mode=2:rate=27000000/450000)
[12:28:55]        + frame rate: 60.000 fps -> peak rate limited to 60.000 fps
[12:28:55]    + Output geometry
[12:28:55]      + storage dimensions: 2560 x 1440
[12:28:55]      + pixel aspect ratio: 1 : 1
[12:28:55]      + display dimensions: 2560 x 1440
[12:28:55]    + encoder: H.264 (NVEnc)
[12:28:55]      + preset:  medium
[12:28:55]      + profile: auto
[12:28:55]      + level:   auto
[12:28:55]      + quality: 45.00 (CQ)
[12:28:55]      + color profile: 1-13-1
[12:28:55]      + chroma location: left
[12:28:55]  * audio track 1
[12:28:55]    + decoder: Unknown (AAC LC) (2.0 ch) (320 kbps) (track 1, id 0x1)
[12:28:55]      + bitrate: 320 kbps, samplerate: 48000 Hz
[12:28:55]    + AAC Passthru
[12:28:55] sync: expecting 4270 video frames
[12:28:55] encavcodecInit: H.264 (Nvidia NVENC)
[12:28:55] encavcodec: encoding at rc=vbr, multipass=fullres, 45.00
[12:28:55] encavcodec: encoding with stored aspect 1/1
[12:28:55] sync: first pts video is 0
[12:28:55] sync: "章节 1" (1) at frame 1 time 0
[12:28:55] sync: first pts audio 0x1 is 0
[12:29:14] reader: done. 1 scr changes
[12:29:14] work: average encoding speed for job is 227.747498 fps
[12:29:14] vfr: 4267 frames output, 0 dropped and 0 duped for CFR/PFR
[12:29:14] vfr: lost time: 0 (0 frames)
[12:29:14] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:29:14] aac-decoder done: 3333 frames, 0 decoder errors
[12:29:14] h264-decoder done: 4267 frames, 0 decoder errors
[12:29:14] sync: got 4267 frames, 4270 expected
[12:29:14] sync: framerate min 30.303 fps, max 60.000 fps, avg 59.972 fps
[12:29:14] mux: track 0, 4267 frames, 12526443 bytes, 1408.45 kbps, fifo 4096
[12:29:14] mux: track 1, 3333 frames, 2852040 bytes, 320.68 kbps, fifo 4096
[12:29:14] Finished work at: Sun May 21 12:29:14 2023
[12:29:14] libhb: work result = 0

 # Job Completed!
Deleted User 11865

Re: Video flicker using QSV encoder

Post by Deleted User 11865 »

Code: Select all

[12:28:54] Intel Quick Sync Video support: yes, gpu list: 1
[12:28:54] Intel Quick Sync Video integrated adapter with index 1
[12:28:54] Impl mfx-gen library path: C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_08a52cf2f322ba79\libmfx64-gen.dll
[12:28:54]  - Intel Media SDK hardware: API 2.6 (minimum: 1.3)
[12:28:54]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[12:28:54]  - H.264 encoder: yes
[12:28:54]     - preferred implementation: hardware (2) via D3D11
[12:28:54]     - capabilities (hardware):  lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[12:28:54]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[12:28:54]     - preferred implementation: hardware (2) via D3D11
[12:28:54]     - capabilities (hardware):  lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[12:28:54]  - AV1 encoder: no
Looks like ICQ_LA (or even the lookahead altogether) is possibly no longer supported by newer driveras and/or hardware? That used to help a lot.

Other than that, I am unsure how to best mitigate the issue other than possibly using the much less efficient constant quantizer mode ("force-cqp=1" without quotes in the advanced options text box, also remember to use a separating colon if there already are options there).

https://handbrake.fr/docs/en/latest/tec ... o-qsv.html

There's probably ways to play with the other parameters (using longer or shorter GOPs, trying to enable/disable ratecontrol-adjacent options in the H.264 encoder, etc.) that might help a bit but not sure where to begin exactly. If you're using the low-power mode, try disabling it (or vice-versa) and see if it makes any difference?
steven52880
Posts: 4
Joined: Sun May 21, 2023 4:19 am

Re: Video flicker using QSV encoder

Post by steven52880 »

Thanks for your reply. I have tried the following, but the problem still exists:

Update Driver
Using another laptop with 12700H
Add `force-cqp=1` to advanced options
Add `la-depth=11` or `la-depth=60` to advanced options
Turn off Intel QSV low-power hardware support

I also tried changing `gop-pic-size` to 300, and for a 60 frame video, it now flickers every five seconds. This reduces flickering to some extent, but cannot completely avoid flickering.

Here is the log with only add `force-cqp=1`

Code: Select all

HandBrake 1.6.1 (2023012300)
OS: Microsoft Windows NT 10.0.19044.0
CPU: 12th Gen Intel(R) Core(TM) i5-12400
Ram: 32058 MB, 
GPU Information:
  NVIDIA GeForce RTX 2060 - 31.0.15.3179
  Intel(R) UHD Graphics 730 - 30.0.101.1371
Screen: 2048x1152
Temp Dir: D:\Tools\HandBrake\tmp\
Install Dir: D:\Tools\HandBrake\
Data Dir: D:\Tools\HandBrake\storage\HandBrake

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

 # Starting Encode ...

[05:53:35] base preset: HighQuality (ICQ22) (Modified)
[05:53:35] hb_init: starting libhb thread
[05:53:35] Starting work at: Wed May 24 05:53:35 2023
[05:53:35] 1 job(s) to process
[05:53:35] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0,
        "Encoder": "copy:aac",
        "Gain": 0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac"
    ]
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "\u7AE0\u8282 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Steven\\Videos\\2023-05-08 06-12-07_quality45_2023-5-24-05-52.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 14,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1440",
          "width": "2560"
        }
      },
      {
        "ID": 7,
        "Settings": {
          "mode": "2",
          "rate": "27000000/450000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\Steven\\Videos\\2023-05-08 06-12-07.flv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "qsv_h265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "force-cqp=1:lowpower=0",
    "Preset": "quality",
    "Profile": "auto",
    "Quality": 45,
    "QSV": {
      "Decode": true
    },
    "HardwareDecode": 0
  }
}
[05:53:35] CPU: 12th Gen Intel(R) Core(TM) i5-12400
[05:53:35]  - Intel microarchitecture Alder Lake performance hybrid architecture
[05:53:35]  - logical processor count: 12
[05:53:35] Intel Quick Sync Video support: yes, gpu list: 1
[05:53:35] Intel Quick Sync Video integrated adapter with index 1
[05:53:35] Impl mfx-gen library path: C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_08a52cf2f322ba79\libmfx64-gen.dll
[05:53:35]  - Intel Media SDK hardware: API 2.6 (minimum: 1.3)
[05:53:35]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[05:53:35]  - H.264 encoder: yes
[05:53:35]     - preferred implementation: hardware (2) via D3D11
[05:53:35]     - capabilities (hardware):  lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[05:53:35]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[05:53:35]     - preferred implementation: hardware (2) via D3D11
[05:53:35]     - capabilities (hardware):  lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[05:53:35]  - AV1 encoder: no
[05:53:35] hb_scan: path=C:\Users\Steven\Videos\2023-05-08 06-12-07.flv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image C:\Users\Steven\Videos\2023-05-08 06-12-07.flv
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
[05:53:35] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[05:53:35] dvd: not a dvd - trying as a stream/file instead
Input #0, flv, from 'C:\Users\Steven\Videos\2023-05-08 06-12-07.flv':
  Metadata:
    encoder         : Lavf59.27.100
  Duration: 00:00:55.38, start: 0.033000, bitrate: 4250 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709/bt709/iec61966-2-1, progressive), 2560x1440 [SAR 1:1 DAR 16:9], 2500 kb/s, 60 fps, 60 tbr, 1k tbn
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 320 kb/s
[05:53:35] scan: decoding previews for title 1
[05:53:35] scan: audio 0x1: aac, rate=48000Hz, bitrate=320000 Unknown (AAC LC) (2.0 ch) (320 kbps)
[05:53:36] scan: 10 previews, 2560x1440, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-13-1, chroma location: left
[05:53:36] scan: supported video decoders: avcodec qsv nvdec
[05:53:36] libhb: scan thread found 1 valid title(s)
[05:53:36] qsv: integrated qsv adapter with index 1 has been selected
[05:53:36] Skipping subtitle scan.  No suitable subtitle tracks.
[05:53:36] Starting Task: Encoding Pass
[05:53:36] Skipping crop/scale filter
[05:53:36] work: only 1 chapter, disabling chapter markers
[05:53:36] job configuration:
[05:53:36]  * source
[05:53:36]    + C:\Users\Steven\Videos\2023-05-08 06-12-07.flv
[05:53:36]    + title 1, chapter(s) 1 to 1
[05:53:36]    + container: flv
[05:53:36]    + data rate: 4250 kbps
[05:53:36]  * destination
[05:53:36]    + C:\Users\Steven\Videos\2023-05-08 06-12-07_quality45_2023-5-24-05-52.mp4
[05:53:36]    + container: MPEG-4 (libavformat)
[05:53:36]      + align initial A/V stream timestamps
[05:53:36]  * video track
[05:53:36]    + decoder: h264_qsv 8-bit (yuv420p)
[05:53:36]      + bitrate 2500 kbps
[05:53:36]    + filters
[05:53:36]      + Framerate Shaper (mode=2:rate=27000000/450000)
[05:53:36]        + frame rate: 60.000 fps -> peak rate limited to 60.000 fps
[05:53:36]      + Format (format=nv12)
[05:53:36]    + Output geometry
[05:53:36]      + storage dimensions: 2560 x 1440
[05:53:36]      + pixel aspect ratio: 1 : 1
[05:53:36]      + display dimensions: 2560 x 1440
[05:53:36]    + encoder: H.265 (Intel Media SDK)
[05:53:36]      + preset:  quality
[05:53:36]      + options: force-cqp=1:lowpower=0
[05:53:36]      + profile: auto
[05:53:36]      + level:   auto
[05:53:36]      + quality: 45.00 (ICQ)
[05:53:36]      + color profile: 1-13-1
[05:53:36]      + chroma location: left
[05:53:36]  * audio track 1
[05:53:36]    + decoder: Unknown (AAC LC) (2.0 ch) (320 kbps) (track 1, id 0x1)
[05:53:36]      + bitrate: 320 kbps, samplerate: 48000 Hz
[05:53:36]    + AAC Passthru
[05:53:36] sync: expecting 3322 video frames
[05:53:36] encqsvInit: using encode-only path
[05:53:36] encqsvInit: H.265/HEVC Main profile @ level (null)
[05:53:36] encqsvInit: TargetUsage 1 AsyncDepth 6
[05:53:36] encqsvInit: GopRefDist 8 GopPicSize 64 NumRefFrame 4 IdrInterval 0
[05:53:36] encqsvInit: BFramesMax 7 BRefType pyramid
[05:53:36] encqsvInit: RateControlMethod CQP with QPI 45 QPP 47 QPB 49
[05:53:36] sync: first pts video is 0
[05:53:36] sync: "章节 1" (1) at frame 1 time 0
[05:53:36] sync: first pts audio 0x1 is 0
[05:53:36] qsv_enc_init: using 'hardware (2) via D3D11' implementation, API: 2.6
[05:54:14] reader: done. 1 scr changes
[05:54:14] work: average encoding speed for job is 87.219849 fps
[05:54:14] vfr: 3321 frames output, 0 dropped and 0 duped for CFR/PFR
[05:54:14] vfr: lost time: 0 (0 frames)
[05:54:14] vfr: gained time: 0 (0 frames) (0 not accounted for)
[05:54:15] aac-decoder done: 2593 frames, 0 decoder errors
[05:54:15] h264_qsv-decoder done: 3321 frames, 0 decoder errors
[05:54:15] sync: got 3321 frames, 3322 expected
[05:54:15] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
[05:54:15] mux: track 0, 3321 frames, 3004544 bytes, 434.13 kbps, fifo 4096
[05:54:15] mux: track 1, 2593 frames, 958998 bytes, 138.57 kbps, fifo 4096
[05:54:15] Finished work at: Wed May 24 05:54:15 2023
[05:54:15] libhb: work result = 0

 # Job Completed!
Deleted User 11865

Re: Video flicker using QSV encoder

Post by Deleted User 11865 »

I'm mostly out of ideas. Here's a shot in the dark that probably won't make a difference: "force-cqp=1:cqp-offset-p=0:cqp-offset-b=0" (without quotes).

Although, a constant QP of 45 is ridiculously high (i.e. low quality), I'm surprised any frame is the output is watchable regardless of flicker.
steven52880
Posts: 4
Joined: Sun May 21, 2023 4:19 am

Re: Video flicker using QSV encoder

Post by steven52880 »

force-cqp=1:cqp-offset-p=0:cqp-offset-b=0
I have tried but there is no difference with the above parameters

Using 45cqp is to make the flicker more noticeable and easy to demonstrate. Generally, I use icq30 as the option for recording 2k game screens.

Strangely, using qsv with ffmpeg command line did not cause flickering issues.
Deleted User 11865

Re: Video flicker using QSV encoder

Post by Deleted User 11865 »

That is interesting. Can you provide the ffmpeg log output?
steven52880
Posts: 4
Joined: Sun May 21, 2023 4:19 am

Re: Video flicker using QSV encoder

Post by steven52880 »

Here is the command and log.

Code: Select all

C:\Users\Steven\Desktop>ffmpeg -i "C:/Users/Steven/Videos/2022-12-25 16-37-24.flv" -c:v hevc_qsv -global_quality:v 30 -preset:v slow -b:a 128k -c:a aac  -vf scale=1920:1080 -r 30 "C:/Users/Steven/Desktop/2022-12-25 16-37-24.mkv"

ffmpeg version 2023-05-18-git-01d9a84ef5-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58.  7.100 / 58.  7.100
  libavcodec     60. 14.100 / 60. 14.100
  libavformat    60.  5.100 / 60.  5.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  8.100 /  9.  8.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, flv, from 'C:/Users/Steven/Videos/2022-12-25 16-37-24.flv':
  Metadata:
    encoder         : Lavf59.16.100
  Duration: 00:01:35.45, start: 0.033000, bitrate: 24897 kb/s
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 2560x1440 [SAR 1:1 DAR 16:9], 30000 kb/s, 60 fps, 60 tbr, 1k tbn
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 160 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_qsv))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, matroska, to 'C:/Users/Steven/Desktop/2022-12-25 16-37-24.mkv':
  Metadata:
    encoder         : Lavf60.5.100
  Stream #0:0: Video: hevc, nv12(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 30 fps, 1k tbn
    Metadata:
      encoder         : Lavc60.14.100 hevc_qsv
    Side data:
      cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc60.14.100 aac
[out#0/matroska @ 0000020408e9ed00] video:25968kB audio:1507kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.196897%
frame= 2864 fps=125 q=-0.0 Lsize=   27529kB time=00:01:35.36 bitrate=2364.8kbits/s dup=0 drop=2860 speed=4.15x
[aac @ 000002040911cc00] Qavg: 641.619

C:\Users\Steven\Desktop>
But the video output from ffmpeg cannot be fast forwarded. There is a website that says it may be related to sps pps
Post Reply