- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is for anyone who is developing in c# directshow using the h264 encoder provided by intel.
The parameters used to set the quality of the encoder can be very annoying as I get really wacky results.
Instead of writing a thousand lines of code to create the parameter structures you can literally do this in about 12 lines of code. Here goes:
The parameters used to set the quality of the encoder can be very annoying as I get really wacky results.
Instead of writing a thousand lines of code to create the parameter structures you can literally do this in about 12 lines of code. Here goes:
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\\Intel\\Media SDK Sample Filters\\H264 Encoder", true);
key.SetValue("Level", 40);
key.SetValue("RCControl.bitrate", 21000);
key.SetValue("PCControl", 1);
key.SetValue("Preset", 0);
key.SetValue("Profile", 100);
key.SetValue("PSControl.GopPicSize", 200);
key.SetValue("PSControl.GopRefDist", 3);
key.SetValue("PSControl.NumSlice", 1);
key.SetValue("RCControl.rc_method", 1);
key.SetValue("TargetUsage", 4);
key.Dispose();
Everything is stored in the registry and as long as you set these values before creating the encoder object then the encoder will use these settings.
Much more convenient!
Cheers,
Marty
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marty,
Thanks for contributing to the community.
-Tony
Thanks for contributing to the community.
-Tony
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page