Unable to encode Nvidia shadowplay clip

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
eamonx
New User
Posts: 2
Joined: Tue Sep 03, 2024 11:40 am

Unable to encode Nvidia shadowplay clip

Post by eamonx »

Description of problem or question:

Hello. I like to use Nvidia Shadowplay to record clips from videogames I play.

It's a little bit weird when it comes to HDR because it doesn't seem to always accurately know if a game I'm playing is in HDR mode or not. So sometimes, the resultant clip's color profile in its header doesn't match the color profile of the raw footage. As a result, when I play the video, the color is all dark and oversaturated etc.

I found a way to easily fix this without encoding, by muxing and altering a simple parameter. Via MKVToolNix, I simply add '1' in the "Transfer characteristics" box under "Color information". I believe this basically alters the color profile in the file header to rec 709 which is the original footage's color profile.

This process works as when I now play the video, it now presents in its correct color profile.

However, I wanted to re-encode a clip for the purpose of decreasing its filesize, I'm unable to even open it in Adobe Media Encoder. So I try Handbrake, and I am able to open it. But when start the job, it returns with an error message. I have no idea why this is happening.

I've pasted the log below. Hopefully someone knows what's going on?[/b]




HandBrake version: 1.8.2 (2024081000)




Operating system and version: Windows 10 Pro Version 22H2




HandBrake Activity Log

Code: Select all

 # Starting Encode ...

[12:42:24] base preset: Elden Ring
[12:42:24] Remote Process started with Process ID: 22284 using port: 8037. Max Allowed Instances: 1
[12:42:24] Worker: Starting HandBrake Engine ...
[12:42:24] Worker: Parent Process Id 16968
[12:42:24] Worker: Starting Web Server on port 8037 ...
[12:42:24] Worker: Starting Listener: 1
[12:42:24] Worker: Server Started
[12:42:25] Worker: Disconnected worker monitoring enabled!
[12:42:25] Compile-time hardening features are enabled
[12:42:25] nvenc: version 12.2 is available
[12:42:25] nvdec: is available
[12:42:25] CUDA Version: 8.6
[12:42:25] vcn: not available on this system
[12:42:25] qsv: not available on this system
[12:42:25] hb_init: starting libhb thread
[12:42:25] Starting work at: Tue Sep 03 12:42:25 2024
[12:42:25] 1 job(s) to process
[12:42:25] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0,
        "Encoder": "av_aac",
        "Gain": 0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [],
    "ChapterMarkers": false,
    "AlignAVStart": true,
    "File": "C:\\Users\\User\\Videos\\Captures\\Black Myth  Wukong\\converted\\Black Myth  Wukong 2024.08.31 - 16.17.44.05.Dvr-1.mp4",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 6,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 4,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 20,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "mode": "1",
          "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\\User\\Videos\\Captures\\Black Myth  Wukong\\Black Myth  Wukong 2024.08.31 - 16.17.44.05.DVR.mp4",
    "HWDecode": 4
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "Bitrate": 15,
    "MultiPass": true,
    "Turbo": true,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[12:42:25] CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
[12:42:25]  - Intel microarchitecture Skylake
[12:42:25]  - logical processor count: 8
[12:42:25] Intel Quick Sync Video support: no
[12:42:25] hb_scan: path=C:\Users\User\Videos\Captures\Black Myth  Wukong\Black Myth  Wukong 2024.08.31 - 16.17.44.05.DVR.mp4, title_index=1
Input #0, matroska,webm, from 'C:\Users\User\Videos\Captures\Black Myth  Wukong\Black Myth  Wukong 2024.08.31 - 16.17.44.05.DVR.mp4':
  Metadata:
    encoder         : libebml v1.4.5 + libmatroska v1.7.1
    creation_time   : 2024-09-01T00:01:24.000000Z
  Duration: 00:00:30.00, start: 0.000000, bitrate: 47660 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn (default)
      Metadata:
        BPS             : 47455321
        DURATION        : 00:00:30.000000000
        NUMBER_OF_FRAMES: 1800
        NUMBER_OF_BYTES : 177957456
        _STATISTICS_WRITING_APP: mkvmerge v86.0 ('Winter') 64-bit
        _STATISTICS_WRITING_DATE_UTC: 2024-09-01 00:01:24
        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
      Metadata:
        BPS             : 196092
        DURATION        : 00:00:30.000000000
        NUMBER_OF_FRAMES: 1406
        NUMBER_OF_BYTES : 735348
        _STATISTICS_WRITING_APP: mkvmerge v86.0 ('Winter') 64-bit
        _STATISTICS_WRITING_DATE_UTC: 2024-09-01 00:01:24
        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[12:42:25] scan: decoding previews for title 1
[12:42:25] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 Unknown (AAC LC, 2.0 ch)
[12:42:25] using container PAR 1:1
[12:42:25] scan: 10 previews, 1920x1080, 60.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[12:42:25] scan: supported video decoders: avcodec hwaccel
[12:42:25] libhb: scan thread found 1 valid title(s)
[12:42:25] Skipping subtitle scan.  No suitable subtitle tracks.
[12:42:25] Starting Task: Analysis Pass
[12:42:25] work: skipping crop/scale filter
[12:42:25] work: track 1, dithering not supported by codec
[12:42:25] job configuration:
[12:42:25]  * source
[12:42:25]    + C:\Users\User\Videos\Captures\Black Myth  Wukong\Black Myth  Wukong 2024.08.31 - 16.17.44.05.DVR.mp4
[12:42:25]    + title 1, chapter(s) 1 to 1
[12:42:25]    + container: matroska,webm
[12:42:25]    + data rate: 47660 kbps
[12:42:25]  * destination
[12:42:25]    + C:\Users\User\Videos\Captures\Black Myth  Wukong\converted\Black Myth  Wukong 2024.08.31 - 16.17.44.05.Dvr-1.mp4
[12:42:25]    + container: MPEG-4 (libavformat)
[12:42:25]      + align initial A/V stream timestamps
[12:42:25]  * video track
[12:42:25]    + decoder: hevc 10-bit (yuv420p10le)
[12:42:25]    + filters
[12:42:25]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[12:42:25]      + Decomb (mode=39)
[12:42:25]      + Framerate Shaper (mode=1:rate=27000000/450000)
[12:42:25]        + frame rate: 60.000 fps -> constant 60.000 fps
[12:42:25]      + Format (format=yuv420p)
[12:42:25]    + Output geometry
[12:42:25]      + storage dimensions: 1920 x 1080
[12:42:25]      + pixel aspect ratio: 1 : 1
[12:42:25]      + display dimensions: 1920 x 1080
[12:42:25]    + encoder: H.264 (libx264)
[12:42:25]      + preset:  fast
[12:42:25]      + profile: main
[12:42:25]      + level:   4.2
[12:42:25]      + bitrate: 15 kbps, pass: 1
[12:42:25]      + fast first pass
[12:42:25]      + options: ref=1:8x8dct=0:me=dia:trellis=0
[12:42:25]                 analyse=i4x4 (if originally enabled, else analyse=none)
[12:42:25]                 subq=2 (if originally greater than 2, else subq unchanged)
[12:42:25]      + color profile: 1-1-1
[12:42:25]      + color range: tv
[12:42:25]      + chroma location: left
[12:42:25]  * audio track 1
[12:42:25]    + decoder: Unknown (AAC LC, 2.0 ch) (track 1, id 0x1)
[12:42:25]      + samplerate: 48000 Hz
[12:42:25]    + mixdown: Stereo
[12:42:25]    + encoder: AAC (libavcodec)
[12:42:25]      + bitrate: 160 kbps, samplerate: 48000 Hz
[12:42:25] sync: expecting 1800 video frames
[12:42:25] encx264: min-keyint: 60, keyint: 600
[12:42:25] encx264: encoding at average bitrate 15
[12:42:25] encx264: unparsed options: level=4.2:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=62500:vbv-maxrate=50000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 UnalignedStack
x264 [info]: profile Main, level 4.2, 4:2:0, 8-bit
[12:42:25] sync: first pts video is 0
[12:42:25] sync: Chapter 1 at frame 1 time 0
[12:42:25] sync: first pts audio 0x1 is 0
[12:42:57] reader: done. 1 scr changes
[12:42:57] work: average encoding speed for job is 56.190754 fps
[12:42:57] comb detect: heavy 362 | light 425 | uncombed 1013 | total 1800
[12:42:57] decomb: deinterlaced 362 | blended 425 | unfiltered 1013 | total 1800
[12:42:57] vfr: 1800 frames output, 0 dropped and 0 duped for CFR/PFR
[12:42:57] vfr: lost time: 0 (0 frames)
[12:42:57] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:42:58] aac-decoder done: 1406 frames, 0 decoder errors
[12:42:58] hevc-decoder done: 1800 frames, 0 decoder errors
[12:42:58] sync: got 1800 frames, 1800 expected
[12:42:58] sync: framerate min 60.000 fps, max 60.000 fps, avg 60.000 fps
x264 [info]: frame I:10    Avg QP:51.00  size:  1034
x264 [info]: frame P:569   Avg QP:51.00  size:    70
x264 [info]: frame B:1221  Avg QP:51.00  size:    68
x264 [info]: consecutive B-frames:  4.8% 10.9% 10.3% 74.0%
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:99.9%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%
x264 [info]: final ratefactor: 67.85
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 89%  9%  2%  0%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: Weighted P-Frames: Y:2.5% UV:1.6%
x264 [info]: kb/s:35.44
[12:42:58] Starting Task: Encoding Pass
[12:42:58] work: skipping crop/scale filter
[12:42:58] work: track 1, dithering not supported by codec
[12:42:58] job configuration:
[12:42:58]  * source
[12:42:58]    + C:\Users\User\Videos\Captures\Black Myth  Wukong\Black Myth  Wukong 2024.08.31 - 16.17.44.05.DVR.mp4
[12:42:58]    + title 1, chapter(s) 1 to 1
[12:42:58]    + container: matroska,webm
[12:42:58]    + data rate: 47660 kbps
[12:42:58]  * destination
[12:42:58]    + C:\Users\User\Videos\Captures\Black Myth  Wukong\converted\Black Myth  Wukong 2024.08.31 - 16.17.44.05.Dvr-1.mp4
[12:42:58]    + container: MPEG-4 (libavformat)
[12:42:58]      + align initial A/V stream timestamps
[12:42:58]  * video track
[12:42:58]    + decoder: hevc 10-bit (yuv420p10le)
[12:42:58]    + filters
[12:42:58]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[12:42:58]      + Decomb (mode=39)
[12:42:58]      + Framerate Shaper (mode=1:rate=27000000/450000)
[12:42:58]        + frame rate: 60.000 fps -> constant 60.000 fps
[12:42:58]      + Format (format=yuv420p)
[12:42:58]    + Output geometry
[12:42:58]      + storage dimensions: 1920 x 1080
[12:42:58]      + pixel aspect ratio: 1 : 1
[12:42:58]      + display dimensions: 1920 x 1080
[12:42:58]    + encoder: H.264 (libx264)
[12:42:58]      + preset:  fast
[12:42:58]      + profile: main
[12:42:58]      + level:   4.2
[12:42:58]      + bitrate: 15 kbps, pass: 2
[12:42:58]      + color profile: 1-1-1
[12:42:58]      + color range: tv
[12:42:58]      + chroma location: left
[12:42:58]  * audio track 1
[12:42:58]    + decoder: Unknown (AAC LC, 2.0 ch) (track 1, id 0x1)
[12:42:58]      + samplerate: 48000 Hz
[12:42:58]    + mixdown: Stereo
[12:42:58]    + encoder: AAC (libavcodec)
[12:42:58]      + bitrate: 160 kbps, samplerate: 48000 Hz
[12:42:58] sync: expecting 1800 video frames
[12:42:58] encx264: min-keyint: 60, keyint: 600
[12:42:58] encx264: encoding at average bitrate 15
[12:42:58] encx264: unparsed options: level=4.2:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=62500:vbv-maxrate=50000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 UnalignedStack
x264 [error]: requested bitrate is too low. estimated minimum is 24 kbps
encx264: x264_encoder_open failed.
Failure to initialise thread 'H.264/AVC encoder (libx264)'
[12:42:58] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[12:42:58] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[12:42:58] vfr: lost time: 0 (0 frames)
[12:42:58] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:42:58] aac-decoder done: 0 frames, 0 decoder errors
[12:42:58] hevc-decoder done: 0 frames, 0 decoder errors
[12:42:58] sync: got 0 frames, 1800 expected
[12:42:58] Finished work at: Tue Sep 03 12:42:58 2024
[12:42:58] libhb: work result = 3

 # Job Failed to Initialise. Check log and input settings (3)
Woodstock
Veteran User
Posts: 4655
Joined: Tue Aug 27, 2013 6:39 am

Re: Unable to encode Nvidia shadowplay clip

Post by Woodstock »

Just a quick look at the logs, x264 calculates that the minimum required bandwidth for your parameters is 24kbps, and you're set the maximum at 15kbps. Is there a reason you set the bandwidth so low?
mduell
Veteran User
Posts: 8329
Joined: Sat Apr 21, 2007 8:54 pm

Re: Unable to encode Nvidia shadowplay clip

Post by mduell »

Why are you trying to encode from 47660 kb/s to 15 kb/s? A more reasonable target bitrate (1500? 15000?), or a target quality, should get you a result.
eamonx
New User
Posts: 2
Joined: Tue Sep 03, 2024 11:40 am

Re: Unable to encode Nvidia shadowplay clip

Post by eamonx »

Ahh, a silly mistake on my part. I thought it was in Mbps not Kbps. I changed it from 15 to 15000 and it worked.

Thanks for pointing this out.
Post Reply