- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I want to write some text (like subtitles) in yuv frames. Unlike the subtitles, the text data must become the part of video frame itself. So does IPP or Media SDK provide any lib/APIs to perform this operation?
For the time being, I have an alternative solution where first I encode the YUV frame into jpg, then by using some Microsoft APIs I merge the text data into jpg image, and then decode this final jpg image again to get YUV.
Though this approach is working fine from output point of view but it is consuming unnecessary of CPU and memory. So I am looking for any approach where I can write the text string directly into YUV frame.
Any suggestions?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ramashankar,
Intel Media SDK unfortunately does not provide such feature. You will have to find a third party solution for this or use for instance DirectX to compose a texture in which you can overlay text then extract surface for use with Media SDK.
On a side note. Linux Media SDK does have some new features allowing frame compositing, but no capabilities to insert text into frame.
Regards,
Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Petter,
Thanks for your reply. I understood your points.
I feel that using DirectX to compose texture, then Overlaying text and then extraction of surface may also take more time and CPU. It might be same in performance as our current approach (encode to Jpeg using IMSDK, merge text using Micorsoft API, then decode the Jpeg using IMSDK).
What do you think?
On more query: In our current approach, we are observing that most of CPU is being consumed only in merging of Text in Jpeg using Microsoft APIs. So Does Intel Media SDK provide any similar option of merging text in Jpeg?
~
Ramashankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> encode to Jpeg using IMSDK, merge text using Micorsoft API, then decode the Jpeg using IMSDK
I want to offer you two other techniques, with higher performance and less quality loss.
1. YUV -> RGB -> attach (without copying!) to gdiplus engine, draw text with it's means, detach -> YUV
2. Draw text with any engine, that supports alpha-channel output (text frame can be smaller than YUV-target) -> convert to ~AYUV, if need -> apply alpha blending straight on YUV color space to mix frames.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your insight dj_alek.
Ramashankar: Intel Media SDK does not have any support for inserting text into JPEG.
Regards,
Petter

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page