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

MediaTranscoder ignores MediaEncodingProfile.Video.Bitrate #4804

Open
lostmsu opened this issue Oct 15, 2024 · 0 comments
Open

MediaTranscoder ignores MediaEncodingProfile.Video.Bitrate #4804

lostmsu opened this issue Oct 15, 2024 · 0 comments
Labels
area-External area-Media Support for media playback or encoding

Comments

@lostmsu
Copy link

lostmsu commented Oct 15, 2024

Describe the bug

I record the video from screen capture (4928x2160) using the following profile:

var encodingProfile = MediaEncodingProfile.CreateHevc(VideoEncodingQuality.Uhd2160p);
// encodingProfile.Video = VideoEncodingProperties.CreateHevc();
encodingProfile.Video.Bitrate = 10_000_000;
encodingProfile.Video.FrameRate.Numerator = 20;
encodingProfile.Video.FrameRate.Denominator = 1;
encodingProfile.Video.PixelAspectRatio.Numerator = 1;
encodingProfile.Video.PixelAspectRatio.Denominator = 1;
// Describe audio input
encodingProfile.Audio = MediaEncodingProfile.CreateM4a(AudioEncodingQuality.Low).Audio;
encodingProfile.Audio.SampleRate = 48000;

The resulting file has video bitrate of ~30Mbps instead of ~10Mbps.

On a different machine this problem does not reproduce

Steps to reproduce the bug

Prereq: AMD 9950X for CPU+GPU, Win 11 24H2

  1. Create MediaTranscoder with any media source and HardwareAccelerationEnabled = true
  2. Create MediaEncodingProfile as described above
  3. Prepare and start transcoding

Expected behavior

Output has the specified bitrate.

Screenshots

No response

NuGet package version

<TargetFramework>net6.0-windows10.0.26100.0</TargetFramework>

Packaging type

Desktop app

Windows version

24H2 26100.1742

IDE

N/A

Additional context

I have two machines, and one experiences the bug, while the other does not.

  • The one with the bug has Windows 11 24H2 26100.1742 + AMD 9950X CPU (only embedded GPU; supposed to use its hardware encoding block; I can see it used in Task Manager)
  • The one without the bug has Windows 11 23H2 22631.4317 + NVidia 3090 (NVenc seems to be used)
@codendone codendone added area-Media Support for media playback or encoding area-External and removed needs-triage labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-External area-Media Support for media playback or encoding
Projects
None yet
Development

No branches or pull requests

2 participants