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

Unable to show video encoded with 'rext' profile using NVIDIA' s NVENC #2306

Closed
4 tasks done
GRFTSOL opened this issue Jan 23, 2025 · 4 comments
Closed
4 tasks done

Comments

@GRFTSOL
Copy link

GRFTSOL commented Jan 23, 2025

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Steps to reproduce

Drop file to lossless-cut, video shows black.

Expected behavior

Like other .mp4 files, can be decoded/edited/output.

Actual behavior

Video playback shows black, re-encode with main/main10 profile using NVENC, playback works

Provide an error report

N/A

Share the file

File link

Share log from developer tools

-1737595744212.log

@mifi
Copy link
Owner

mifi commented Jan 25, 2025

thanks for sharing the file. what's your OS? i've tested on macOS and here it plays back smoothly.

stream meta for future reference:

{
    "mainStreams": [
      {
        "index": 0,
        "codec_name": "hevc",
        "codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)",
        "profile": "Rext",
        "codec_type": "video",
        "codec_tag_string": "hev1",
        "codec_tag": "0x31766568",
        "width": 1920,
        "height": 1080,
        "coded_width": 1920,
        "coded_height": 1088,
        "closed_captions": 0,
        "film_grain": 0,
        "has_b_frames": 1,
        "sample_aspect_ratio": "1:1",
        "display_aspect_ratio": "16:9",
        "pix_fmt": "yuv420p",
        "level": 153,
        "color_range": "tv",
        "chroma_location": "left",
        "refs": 1,
        "id": "0x1",
        "r_frame_rate": "30000/1001",
        "avg_frame_rate": "30000/1001",
        "time_base": "1/30000",
        "start_pts": 0,
        "start_time": "0.000000",
        "duration_ts": 7092085,
        "duration": "236.402833",
        "bit_rate": "1825290",
        "nb_frames": "7085",
        "extradata_size": 124,
        "disposition": {
          "default": 1,
          "dub": 0,
          "original": 0,
          "comment": 0,
          "lyrics": 0,
          "karaoke": 0,
          "forced": 0,
          "hearing_impaired": 0,
          "visual_impaired": 0,
          "clean_effects": 0,
          "attached_pic": 0,
          "timed_thumbnails": 0,
          "captions": 0,
          "descriptions": 0,
          "metadata": 0,
          "dependent": 0,
          "still_image": 0
        },
        "tags": {
          "creation_time": "2025-01-23T01:17:59.000000Z",
          "language": "und",
          "handler_name": "VideoHandler",
          "vendor_id": "[0][0][0][0]"
        }
      },
      {
        "index": 1,
        "codec_name": "opus",
        "codec_long_name": "Opus (Opus Interactive Audio Codec)",
        "codec_type": "audio",
        "codec_tag_string": "Opus",
        "codec_tag": "0x7375704f",
        "sample_fmt": "fltp",
        "sample_rate": "48000",
        "channels": 2,
        "channel_layout": "stereo",
        "bits_per_sample": 0,
        "initial_padding": 312,
        "id": "0x2",
        "r_frame_rate": "0/0",
        "avg_frame_rate": "0/0",
        "time_base": "1/48000",
        "start_pts": 0,
        "start_time": "0.000000",
        "duration_ts": 11349168,
        "duration": "236.441000",
        "bit_rate": "115706",
        "nb_frames": "11822",
        "extradata_size": 19,
        "disposition": {
          "default": 1,
          "dub": 0,
          "original": 0,
          "comment": 0,
          "lyrics": 0,
          "karaoke": 0,
          "forced": 0,
          "hearing_impaired": 0,
          "visual_impaired": 0,
          "clean_effects": 0,
          "attached_pic": 0,
          "timed_thumbnails": 0,
          "captions": 0,
          "descriptions": 0,
          "metadata": 0,
          "dependent": 0,
          "still_image": 0
        },
        "tags": {
          "creation_time": "2025-01-23T01:17:59.000000Z",
          "language": "und",
          "handler_name": "SoundHandler",
          "vendor_id": "[0][0][0][0]"
        }
      }
    ],
}

@mifi
Copy link
Owner

mifi commented Jan 25, 2025

i'm collecting issues like this in #2307 for future reference. A workaround is to "convert to supported format", but because it works on my computer I don't know how to fix this.

@mifi mifi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2025
@GRFTSOL
Copy link
Author

GRFTSOL commented Jan 25, 2025

what's your OS?

Both Windows and Linux:

  • Under windows, I tried microsoft edge with Media Foundation provided HEVC decoder, cannot display video; while Firefox can display well.
  • Under Linux, I tried, chromium and firefox with Mesa driver, same as windows.

Knowing it can be decoded on Mac OS, I did some search about hardware decode on chromium, and found this repo,

Mac OS on M Series is capable of decoding:

Note 1: Intel Macs support HEVC Rext software decoding of 8 ~ 12b 400, 420, 422, 444 contents. Apple Silicon Mac supports HEVC Rext hardware decoding of 8 ~ 10b 400, 420, 422, 444 contents, and software decoding of 12b 400, 420, 422, 444 contents.

And I found the answer of my problem:

Note 3: Although NVIDIA GPUs support HEVC Rext hardware decoding of 8 ~ 12b non-422 contents via CUVID or NVDEC, but because they did not provide a D3D11 interface, thus Chromium will not support it in the future.

I think this issue can be ignored, I will change my encoding profile, thank you Mikael :)

@mifi
Copy link
Owner

mifi commented Jan 25, 2025

Ok, nice research there, thanks. I will add that link to the other issue

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

No branches or pull requests

2 participants