Tech Tip - Logo/Subtitle Insertion

PixelTools products can mix a logo or subtitle represented as a bitmap image with a video source during the MPEG encoding process. Logos and subtitles can also be added to an existing stream during a transcoding process.

Adding logos via MPEGRepairHD GUI

During encoding

Logo mixing during video encoding is controlled via the text Encoding Decision List (edl) file called Expert.edl which is located in the directory where your encoded MPEG file is being stored. The edl file specifies the bitmap files and the frame number or time clock at which they will be mixed with the underlying video. The edl file also contains the horizontal and vertical offset (from the upper left of the frame to the upper left of the bitmap), the percentage of mix with the underlying video, and an optional color that will be transparent on the video screen.

An example of the edl command is:

Frame 3
LOGO smouse3.bmp 20 20 80 0 255 0

This causes the smouse3.bmp to be mixed with the underlying video starting at frame 3. The location will be 20 horizontal and 30 vertical pixels from the upper left of the frame. The resultant frame will consist of 80% of the bitmap and 20% of the underlying video. The transparent color will be green with an RGB value of 0 255 0.

Add to an existing stream

Select the source MPEG stream that you want to add the logo to in the Encode Input edit box. Set up the encoding parameters (frame size, bit-rate, frame rate, etc) to match that of your source MPEG stream. Add the appropriate Expert.edl file to the directory used to store the Encode Output.

Depressing the Control Encode | Run button will cause the source MPEG file to be decoded frame by frame and immediately re-encoding mixing in the logo as specified in the Expert.edl file.

Adding logos via ExpertWorkship SDK

During Encoding

Specify the full path name of the edl file in the EdlFullFileName configuration parameter in the ExpEncodeConfigure function call. (The edl file can have any name and location). Then run the encoder normally. During each call to ExpEncodeNextFrame, the edl file will be read to determine if the logo should be added in the upcoming frames.

Add to an existing stream

Logos can be added to an existing stream via transcoding. Set up the Decoder to decode each frame to a buffer. Set up the encoder to encode each non-zero length decoded frame from the decode buffer. Specify the full path name of the edl file in the EdlFullFileName configuration parameter in the ExpEncodeConfigure function call. Set up the encode parameters to be identical to that of the decoded stream. Then just decode the next frame and then encode the next frame for the entire file. The logo will be mixed with the source video during the encoding as specified in the encoding edl file.


Logos or subtitles must be stored as a 24 bit MicroSoft bitmap (.bmp) file. The horizontal size of the .bmp file must be evenly divisible by 16.  Note that logos can be filled out to 16 pixel boundaries using the user defined transparent color.


Let us know if you would like a demo of any of our products or you have questions or comments about our tools. View our products features at a glance.  Visit our products page and check out at our PixelTools Store to purchase any of our products.

MPEGRepairHD, Expert-HD, Expert-Caption and Expert-Broadcast are trademarks of PixelTools Corporation. All other brand names are trademarks or registered trademarks of their respected holders.

Thank you for your interest in PixelTools


| Contact Us

© 2018 PixelTools| Privacy Policy