- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there
I am using media SDK 1.26 and its sample_encode program to do a real-time H.264 streaming application. I would like to ask for some general advice on how to tune the encoding parameters for fast encoding speed.
I am encoding at 1280x720 and 1920x1080, using software encoder; the typical frame rate of my application is about 10~15 fps.
I have selected MFX_TARGETUSAGE_BEST_SPEED and the input format for encoder is NV12. What other configuration parameters can I look at to improve the encoding speed? any suggestion is much appreciated. thank you.
- Tags:
- Development Tools
- Graphics
- Intel® Media SDK
- Intel® Media Server Studio
- Media Processing
- Optimization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Yu,
Some basic things to achieve fast encoding:
1. set AsyncDepth to 1.
2. Avoid B frame encoding, use h264 baseline profile. B frame can cause additional latency of 1-2 frames in encoding.
3. Provide one complete frames in input to encoder in each call.
4. Set TargetUsage to MFX_TARGETUSAGE_BEST_SPEED in encoder param.
5. Though software encoding is also suffice to produce 1 h264 stream @15 fps, but if you can exploit hardware capability then it may slightly speed up. Of course hw encoding have its own pros n cons. So need to take decision as per your working scenario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If it is SW, the best way is to enable multi-slice, it'll make encoder to run multiple slices in parallel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ramashankar wrote:
Hi Yu,
Some basic things to achieve fast encoding:
1. set AsyncDepth to 1.
2. Avoid B frame encoding, use h264 baseline profile. B frame can cause additional latency of 1-2 frames in encoding.
3. Provide one complete frames in input to encoder in each call.
4. Set TargetUsage to MFX_TARGETUSAGE_BEST_SPEED in encoder param.
5. Though software encoding is also suffice to produce 1 h264 stream @15 fps, but if you can exploit hardware capability then it may slightly speed up. Of course hw encoding have its own pros n cons. So need to take decision as per your working scenario.
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Artem S. (Intel) wrote:
If it is SW, the best way is to enable multi-slice, it'll make encoder to run multiple slices in parallel.
is this related to mfxInfoMFX.NumSlice setting? or a group of parameters needs to be considered together?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leon,
Ramashankar and Artem has very good advices and they are all correct, just try to summarize the general guide lines:
1. Choose HW mode instead of SW, Ramashankar's suggestions are based on HW mode.
2. SW mode works as a fallback if HW mode is not available because it is slower than HW mode.
3. In HW mode, you can use graphic memory as the internal buffer to save the time of copying, especially when you have multiple component(encoder, decoder, vpp) in the pipeline, this will speed up the processing speed.
4. Different use case could have different arguments to speed up. MSDK is designed to process multiple stream at the same time, it would be more efficient to to them in parallel.
Mark
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page