Frequently Asked Questions
TECH TIPS
arrow Stream Header Replacement arrow CGMS and APS Flag Insertion arrow Logo Insertion
arrow MPEG to H.264 Transcoding arrow Closed Captioning Insertion arrow Transcoding
arrow Clip Extraction arrow PowerPoint to MPEG Conversion arrow Blu-Ray Encoding
arrow HD-DVD Encoding arrow Content Advisory (V-chip/Parental Control) arrow Encoding for Electrosonic Decoders
arrow Forensic Watermarking arrow Encoding for Alcorn McBride Decoders arrow Pan and Scan
arrow Batch Operation arrow Updating Time Code in MPEG Steams arrow CableLabs VOD Encoding
arrow Ultra HD Encoding arrow Repeat Frame  
WHITE PAPERS
Tutorial on how MPEG works. Why the buzz about H.264? Rate Control and H.264
PRODUCT SPECIFIC
MPEGRepairHD decoding, analyzing, and stream manipulation HDProQT
ExpertH264 SDK arrow PixelTools Blog


1. Do the products work on Macintosh?
Some of them do. Our high quality HD encoder with transport multiplexer is available as a plug-in to Final Cut Pro or any QuickTime enabled Mac (or PC) application. Our SDK library (which is the workhorse for our HD encoders) is available for MAC and has identical functionality to the PC library. The MAC SDK is optimized for the SSE computers as well as for the older Power PC machines.

2. Do the products run on Unix systems?
Our SDK is available for most Unix systems (Lynx, Solaris, Irix). The SDK has all of the functionality of our MPEGRepairHD flagship encoding/decoding tool without the Graphical User Interface.

3. Is there demo version of the software that we may try prior to purchasing?

Yes, all of our products have a limited demo version available. The SDK demo includes a demo dll for the PC, and demo framework for the Mac, and PC and Mac sample source code. Send us an email describing your application and we will get you a demo version of the product you are interested in.

4. Can your products run in an automated batch mode?

Yes, all of our stand-alone products can be run with DOS Shell Batch commands. This allows you to automate encode and decode sessions that are frequently repeated and allows you to add encoding as one process in a longer batch process. The general format to run in batch mode is:

ProductName FirstFilename options.
This launches the specific product like MPEGRepairHD and causes it to encode or decode FirstFileName using the configuration specified in the default ini found in the directory where the product is launched. Executing the following command from the DOS command shell:

MPEGRepairHD Frame0.bmp.
will cause MPEGRepairHD to encode a sequence of frames starting with Frame0.bmp.The parameters (number of frames to encode, frame size, etc.) are taken from the MPEGRep.ini file located in the same directory that the MPEGRep.exe is located. You can encode frames with different parameters by copying your specific parameter ini file to MPEGRep.ini file just before encoding. Note that MPEGRep.exe and associated dlls can be moved to your desired directory and does not need to be run where it was initially installed.

5. Are your products available as an SDK?

Yes, the functionality of MPEGRepairHD, our flagship encoder/decoder/analyzer is available as a SDK called Expert Workshop. Expert Workshop includes a complete users manual and sample source code that illustrates how to use the basic functionality. Both of our primary encoders (MPEGRepairHD and ExpertHD) use the identical library that is shipped with Expert Workshop so you can easily get an idea of the SDK’s performance and features without writing any code.

6. Do you provide video Watermarking?


We provide both visible and in-visible watermarking. In our visible watermarking, you mix a bitmap logo or watermark with the source frames as they are being encoded or transcoded. See the Logo Insertion for more details. Our MPEG Escort patented process enables hidden but detectable watermark data to be embedded in existing MPEG streams and extracted using your custom key. See the MPEG Escort section for more details.

top
MPEG Encoding

7. How can I increase encoding quality?

Encoding quality can best be improved by increasing the encoding bit-rate. The higher the bit-rate, the less image data that the encoder has to throw away, and the better the quality.

Increasing the bit-rate is often not an option due to bandwidth limitations of the transmission path or the decoder. The following additional encoding and analysis approaches can be tried to increase the encoding quality. These approaches are not applicable for all encoding situations (check into your encoding requirements specification).

Match Motion Estimation to that of the video content


At a specific bit-rate, high motion images will usually encode with better quality by setting the Encode Configure | Precision | options to the Large settings. In video scenes with minimal motion, a lower motion estimation setting will actually produce better quality. This is because the shorter motion vectors have better resolution and will to a better job of motion compensation. It is possible to vary the motion estimation scene by scene using the EDL file commands.

Increase the vbv_buffer size
The larger the vbv_buffer size set in Encode Configure | Parameters dialog, the more “head room” the encoder has in allocating more bits to frames that have more motion and fewer bits to frames that have less motion. The vbv_buffer size is dictated by the MPEG decoder’s internal memory. It us usually listed in the system encoding specifications. MPEG-2 standard definition buffer size is often specified at 118; HD is usually 488. The vbv number is the number of 16K bit blocks of data.

Increase the GOP size
The larger the Encode Configure | Parameters | N value, the large the GOP size. Increasing N provides more separation between I blocks which may allow more efficient encoding as I blocks consume the most bits. A GOP value of 60 or 90 often increases encoding quality over the default value of 15. Note that N needs to be easily divisible by M. Some systems, such as DVD, limit the N to 15.

Use Open GOPs

UnChecking the Encode Configure |Parameters | Closed GOPs will utilize the more efficient Open GOPs. Open GOPs can reference past and future GOPs for motion compensation and therefore provide better quality encoding. In closed GOPs the starting and encoding B (bi-directional) frames essentially become less efficient P (unidirectional frames).

Use Auto Scene Change Detection

Set the Encode Configure | Precision | Scene Change Detection to Auto to enable the encoder to detect and automatically start a new scene with an I frame. I frames utilize the most bits and are best at the start of a new scene. But the main advantage is that the next I frame is N frames away from this I frame.

Filter Frames before encoding to remove sharp edges

Encoding artifacts often occur around sharp edges (such as text). The encoder tends to discard higher frequencies as they carry less information. This sometimes results in ringing around those regions. You can apply softening filters on the images just prior to encoding by selecting a filter in Encode PreProcess | Filter dialog. This should decrease the ringing caused by the high frequencies at the expense of softer images. You can also filter just selected segments of a movie or just selected regions from within a frame using the FILTER command in the EDL file.

Incremental Approach to High Encoding Quality

There are lots of experiments that you can do on your image sequences with MPEGRepairHD to improve image quality. One basic test on a problem video would be to re-encode the bad sequence using virtually loss-less MPEG compression. Set the Encode Configure | Rate Control | Rate Control Strategy to Constant MQuant and enter a 1 in the adjacent Constant MQuant edit box. The resultant MPEG clip may not play properly on many MPEG decoders, but you can look at the result on MPEGRepairHD’s decode section. Any artifacts or problems with this video are most likely the result of something other than the MPEG compression itself.

Once you are satisfied with the encoding quality in this mode (at a very high output bit-rate), you can re-encode with a high constant bit rate and gradually reduce the bit-rate to your desired value … carefully monitoring the decoded video for artifacts. Problem areas (artifacts) can be addressed using the Preprocessing frame filters or other approaches as detailed above. Try the smooth filter to remove the rough edges from you video as sharp edges cause the most artifacts. The frame filters can be applied to all frames being encoded by setting the Preprocessing | Filter option. Or you can apply the filter to a specific scene or set of frames using the EDL FILTER commands. Or you can apply the filter within or without of a region on a selected frame sequence using the EDL REGIONFILTER commands.

In addition, you can suggest to the encoder to add more (or less) bits to a specific region within a specific set of frames using the MODIFYMQUANT EDL commands. You can combine the above EDL commands to enhance a region of interest in the encoded frames and apply a softening filter outside of the region of interest. You can also interactively enhance region quality and filter outside that region by selecting a region of interest using the right mouse button on any encoding window during encoding. Refer to the EDL command section and the Regional Enhancing section of you product documentation for additional details.

Analytical Quality Reports
While the only true judge of video quality is the human eye, you can have MPEGRepairHD print out Signal to Noise reports frame by frame and across the encode sequence. This provides rapid feedback on whether the parameter changes you have made have increased or decreased the quality. Before starting the encoding, depress the right hand St (Statistics window) and select the menu item View | SNR. The SNR and Mean Square Error are calculated and printed out in this window and in the encode log file for each frame. Also, the average SNR for the entire encode sequence is displayed in the closing pop-up message box. This is an excellent way to scope out the quality differences when applying multiple parameter change enhancements.


8. How do stop buffer underflows or overflows during encoding?


Our encoders do not guarantee that they will encode at your selected bit-rate and not underflow the decoder’s buffer for all bit-rates and all video content. You can always find a bit-rate on any video sequence that below that, the encoder cannot meet the bit-rate and buffer requirements. Automatic buffer underflow prevention involves skipping frames or radically quantizing the offending segments. This results in visually offensive encoding. Our encoders do not automatically prevent underflow but just alert you to buffer issues via the Statistics window and the encode.log file. Buffer underflows and overflows are not a problem for variable bit-rate systems (such as DVDs) and disk-based decoders. Buffer issues are a problem when transport multiplexing the video and when used in CBR transmission systems.

The best way to decrease the chance for buffer problems is to increase the encoder’s model vbv buffer as much as possible. This is done in the Encode Configure | Parameters Dialog. The vbv_buffer size is dictated by the MPEG decoder’s internal memory. It us usually listed in the system encoding specifications. MPEG-2 standard definition buffer size is often specified at 118; HD is usually 488. The vbv number is the number of 16K bit blocks of data. Your decoding system may not support an increase of vbv. Other approaches that minimize buffer overflows parallel the approaches listed above that increase encoding quality:

top Increase the GOP size
Increasing the N value in the Encode Configure | Parameters dialog will often give the encoder more opportunity to better manage the buffer and minimize underflows and overflows.

Increase (or decrease) the bit-rate

Often increasing the bit-rate gives the Encoder more headroom to encode without violating buffer limits. In some video with widely varying content, decreasing the bit-rate results in fewer buffer issues (by specifying tighter bit-rate targets per frame).

Increase the Motion Estimation on frames that have large motion.

Making the motion estimation closely match the source content provides the most efficient encoding and minimizes buffer issues. This is done in the Encode Configure | Precision dialog. Also, the motion estimation can be varied throughout the encoding via a command in the EDL file.

Apply Soften Filters
Applying soften filters to all frames via the Encoding PreProcessing | Filter dialog or to selected frames via the EDL file will often minimize the buffer issues.

Change the Kb and Kp in the rate control

Changing the Kb and Kp values in the Encode Configure | Rate Control dialog changes the mix of bits targeted for I, P and B frames. Use lower values for higher bit-rate issues.

Use Open GOPs

UnChecking the Encode Configure |Parameters | Closed GOPs will utilize the more efficient Open GOPs and likely minimize buffer issues.

Use Auto Scene Change Detection
Set the Encode Configure | Precision | Scene Change Detection to Auto to enable the encoder to detect and automatically start a new scene with an I frame

Change the reaction parameter.
The initial reaction parameter in the Encode Configure | Rate Control dialog controls the strength of the encoders response to changes in source content and thus affects buffer overflow and underflow issue. The default value of 0 causes the encoder to calculate the best reaction parameter for the given frame size and bit-rate. That value is printed in the encode.log file. It is recommended that you start with that value (instead of 0) in the Rate Control dialog, increase and decrease that value, and see which way decreases the buffer issues.

Incremental approach to minimizing buffer underflow.

The encode statistics window and encode.log file print the buffer problems at the frames where they occur and the total number of underflows and overflows. It is often instructive to look at the source content around the time of video problems. This can often direct the vbv_approach. Buffer underflow around an explosion scene may indicated that larger motion estimation will help minimize the problems for example. Buffer underflow around a slow fade may indicate rate-control problems.
One approach to minimize the buffer issues is to start with a default parameter set and note the total number of buffer overflows and underflows encountered. Modify the parameters as suggested above one at a time, and monitor their affect in the log file.

9. How can I encode faster.

Faster encoding speed is attained with faster computers and more processors per system.
We are constantly improving our speed. Our latest released version encodes 1920x1080 source frames faster than real-time in a dual 3.6GHz Pentium. There are many reasons why your encoding speed may be slower than this such as slow, virus scan during or faulty disk access and delays in your codec that extracts frames from AVI or QuickTime files. For benchmarking our software (using our SDK or one of our HD encoders) we recommend that you duplicate our test conditions. Configure the encoder using our MP2Speed.ini and input HD YUV frames. Contact us if you have performance questions as we have included built in timers that allow benchmarking of the SDK or Stand Alone encoders right in your development environment.
(A note of interest: our first MPEG-2 encoder took 1000 seconds to encode a second of Standard Def video on the fastest PC available in 1995).

To attain the fastest encoding speed, load the encoder with M2Speed.ini and adapt the bit-rate and frame size your situations. Encoding with YUV source frames from a disk buffer should enable you to achieve the published encoding speeds. Encoding from RGB source files or via MOV or AVI files will slow down the encoding. Also, increasing the motion estimation for better quality in some videos will decrease the decoding speed. Yes there is a tradeoff between speed and quality. And our encoders provide the flexibility to optimize that decision.

10. Do you have any hints on working with EDL file?

The EDL (Encoding Decision List) is a text file that contains commands that modify the encode parameters during the encoding. The EDL format is very concise and does no syntax error checking on the EDL file, so it’s important to monitor the Status reports in the Statistics window during the first utilizations of your EDL file.

First of all, the EDL file must be named Expert.Edl and must be located in the directory where your encoded file is being stored. Each EDL command consists of a frame number line followed by a command line. The command will be executed at the specified EDL frame number or the very next opportunity after that specified frame.

You can add comments, empty lines, and any text case to the EDL file. The encoder will just execute the commands it understands and ignore the rest. The encoder’s reading of the Expert.Edl file is printed out in the Statistics window. So if all is working properly, you should see messages saying that each command had been read and a command when each command is executed. Commands and syntax are listed in the sample EDL file that is provided with the encoder.

top 11. What is the DDL file?

The DDL files contain Decoding Decision List items that modify decoding parameters during the decoding. The syntax and operation is similar to that of the Encoding EDL file, except that the commands are different and the status is reported in MPEGRepairHD’s Decode “St” Statistics window.

12. How do I insert a visible LOGO or Watermark in an MPEG stream?


Logo or watermark in a bmp file is added during encoding as specified in the Encoding Decision List (EDL File). Your logo must be stored as a 24 bit Microsoft bit-map file. The width of the logo must be evenly divisible by 16. Your logo can have one color that will be invisible when mixed with the source video.

In the EDL file, enter the first frame number at which the logo will be mixed with the source video. This frame number is the actual frame number of the source video that may not necessarily start at 0. In the next command line, enter the LOGO command followed by the full path name to the logo file, the horizontal and vertical offset to the upper left corner of the logo within the source frame. Enter the mix percentage in the range of 0 to 100 that determines what percentage of the logo will be mixed with the underlying video. A mix values of 80 will have 80% logo and 20% underlying video. Finally you can add the optional RGB value of the transparent color. If you have a RGB value of 240 230 220, the logo will mix a value of 0% to the underlying video all of the LOGO pixels that have the RGB value of 240 230 220.

A sample EDL command may look like:
FRAME 1930
LOGO c:\NewLogo.bmp 240 120 80 240 230 220

This will add the logo c:\NewLogo.bmp to the source video at an offset of 240 horizontal and 120 vertical with a mix value of 80% starting at frame number 1930. This logo has a transparent value of 240 230 220.

The requested logo will be mixed with the encoded video until a new logo command has been received or until the LOGO OFF command is received that instructs the encoder to not display the logo after the associated frame number.

13. How do I encode with I Frame Only?
Set the Encode Configure | Parameters | M to one and the Encode Configure | Parameters | N to one.14. How can I add Closed Caption or Line 21 data to my stream?
The Encoding Decision List (EDL) file is used to add User Data at specific frame. The EDL file for Closed Caption Data consists of a pair of lines; the first line contains the frame number at which the user data is to be added. The next line contains the HEXUSERDATA command followed by up to 128 pairs of hex characters representing the up to 128 bytes of user data to be added to each frame of the elementary video bit-stream. Contact PixelTools for additional support in converting your closed caption file format to that utilized by the PixelTools EDL file.

14. Why does the stream I just encoded not play on my decoder?
There are lots of reasons why decoders may not play certain streams. It could be that the decoder does not have a MPEG2 license (Apple and Microsoft sell a separate MPEG2 plug-in for their QuickTime and Media players for example) or the decoder does not support the multiplexing format (or lack of multiplexing). A quick answer to this question may be obtained via the Analyze feature of MPEGRepairHD. Just select your file in the tools left hand “MPEG File to Decode or Analyze” edit box and depress the Analyze button to get detailed stream properties. You can compare these stream properties with those of a stream that works properly on your decoder. Also, you can just run the decoder on your new stream and open the “de” decode window to view the decoding frame by frame.

We have managed to make our encoded streams playback properly on almost every decoder that we have encountered. The large parameter selection assures that the encoder will adapt to virtually any decoding situation. We have assisted quite a few customers in developing parameters that work with specific finicky decoders.

Contact us if you have a specific decoder you want to use.

15. What Parameters should I use for HiPix HD PC Decoder Card?

Encode Configure | Bitrate
Bit-rate = 17.772MBps
Encode Configure | Parameters
Frame Rate = 29.97
Aspect Ratio = 16:9
Encode Configure | Parameters | MPEG2
DC Precision = 10
TopFieldFirst = Checked 1
Progressive Frame = UnChecked
Progressive Sequence = Unchecked

Transport Multiplexing Options:
Video PID = 33
Audio PID = 36Observations:
Progressive Sequence Checked results in horizontal lines on right side of bright frames
TopFieldFirst unchecked results in field jerkiness
Bit-rates to 28mbs work
Audio needs to be AC3 (MPEG2 Audio does not work)
PIDS of 17/20 for the video/audio work

16. Your software has too many parameters.

Yes. We have heard before (although some customers like all of the settings so they can really enhance their encoding.) The parameters default to the best settings and so, in many cases, you need to change no parameters.

17. How do I encode sound with my video?

Our MPEGRepairHD and version 4 and later of ExpertHD now include our Expert Audio encoder and TransMux multiplexer integrated in the products. Set up your audio source in the Encode Configure | Audio/Mux dialog. Hitting the start button on the encoder encodes the video, encodes the audio, and then multiplexes the resultant files.

18. What AVI formats can be encoded?
In particular I tried to get it to process an AVI/DV format file but it complained of being “Unable to locate AVI driver”.

The encoder will read all AVI files that have an appropriate CODEC or DirectShow filter installed in the computer you are using for encoding. The PixelTools encoder looks into the AVI file header and sends a command to start up the CODEC designated in the AVI file header to be compatible with the AVI file if appropriate. The encoder also attempts to build a DirectShow filter graph to access the AVI file if the computer has appropriate Direct Show filters. The CODECs are sometimes hardware frame capture boards. If the CODEC cannot be started, as in cases where the encoding is being performed in a computer that does not contain the hardware frame capture AVI CODEC, the encoder will output the message that it can not find the AVI driver.

19. Can I examine bits per frame and Signal to Noise Ratios during encoding?
Yes. MPEGRepairHD and ExpertHD have an Encoding Statistics “St” | View | Frame window that allows you to view how many bits are generated per frame during the code session. The Encoding Statistics | View | SNR window selection displays the Signal to Noise Ratio Encoding error frame by frame during an encoding. All data displayed in the log is also written to an encode.log text file. And the overall SNR average of the entire sequence is displayed at the end of each encoded session. The Encoding Statistics | View | Frame option causes the bits per frame and vbv buffer information to be displayed every frame

20. How does the .ini file relate to the source video format (such as AVI or YUV etc.)? Is it based on the file extension or read in from the file?
The encoder looks at the file extension (AVI, YUV, BMP, etc.) to determine the format of the input video source. The ini does not come into play here, except for setting the default file extension. This sets the extension that FIRST appears on the input file browser, but any of the accepted file formats can be used no matter what the extension default.

 top 21. Does your Encoder work across multiple computers?

Our encoders automatically detect the number of processors (up to 64) in the current host computer and spread the MPEG processing over the processors. There are some encoding steps that cannot be done in parallel which prevent the encoding speed from scaling inversely proportional to the number of processors. The encoders do have segment encode capability. It is possible to specify exact starting and ending vbv values such that multiple instances of the encoders can be utilized on multiple machines to encode one minute segments of a long movie. At the end of the encoding, all of the segments can be concatenated together to form a legal MPEG stream. Using the segment approach, quadrupling the number of processors would cause the encoding speed to increase by a factor of four. Each encoder instance can be launched via the batch file or programmed with our SDK.

22. How can I automatically encode all MOV or AVI files in a dir?
Our encoders can be made to encode all files in a directory with the same parameters and automatically rename each output file using the batch process.
One approach is:
1. Make a new dir
2. Copy MPEGRepair.exe, MPEGRepair.ini and all .dll files from the PixelTools\MPEGRepair install dir to this new dir
3. Edit your parameter file (containing your desired encoding parameters)
replacing the line
out.vbs /* Default Output File Path (enter - if default)*/
with
- /* Default Output File Path (enter - if default)*/
This will cause the encoder to automatically create the output MPEG file name based on the input file name.
Save this parameter file as MpegRepair.ini in your new dir.4. Run a batch file containing the line:
FOR %%K IN (c:\\SourceMov\\*.mov) DO Call ExpertHD %%K
where c:\SourceMov contains all of the mov files that you want to encode.The should caused MPEGRepairHD to encode all of the mov files in the c:\SourceMov directory using the parameters stored in MPEGRepair.ini and rename the resultant file with a .vbs extension

23. How can I make MPEG streams loop with no glitches?
Glitch-less looping places restrictions on the MPEG encoding, the multiplexing, the server (or system that controls the MPEG stream looping) and the MPEG decoder. Your best chance at successful looping is to set up the elementary video stream to have the identical starting and ending video buffer
Set the Encode Configure | Rate Control | Final Buffer Fullness and Encode Configure | Rate Control | Starting Buffer Fullness to be equal. You can use 20000 bytes as a starting number. Also, uncheck the Encode Configure | Parameters | Sequence Style | End of Sequence. An end_of_sequence header will NOT be inserted at the end of the stream.

It is sometimes required to add stuffing packets in the Program or Transport streams between streams to compensate for irregularities in the server looping. Stuffing packets can be Transport packets with only stuffing bytes. Sometimes just adding a lot of 0x00s or 0xffs to between streams smoothes out the transition. You can experiment with your system to see how many stuffing bytes are useful.

24. Are there any adjustments in the RGB to YUV Conversion?

Yes, there are few items to consider here. MPEG does it’s compression in the YUV color space and so when inputting RGB frames (as in BMP, TGA, AVI or MOV file formats), the encoder needs to convert the RGB 4:4:4 color space to YUV 4:2:0 or 4:2:2 (depending on the Encode Configure | Parameters | MPEG2 | Chroma Format setting). There are different specifications (used in different countries and within countries) that detail the RGB to YUV conversion. These different conversions are selected in the Encode PreProcess | PreProcess Input “Select RBG to YUV Coefficients” selection box. Refer to the users manual for more specifics on the coefficients.

The other consideration is the Video versus Graphic color space conversion (which is independent from the conversion coefficients.) MPEG encoders blindly convert YUV pixel values that range from 0 – 255 into MPEG streams that decoders decode into 0 – 255 pixel ranged values. Most television specs however require that the YUV values be between 16 and 239. So some part in the encoding process needs to assure that the pixel values are within the TV limits, if that is the intended player. Graphic systems generally work in the 0 – 255 pixel range. If your source content is in the 0 – 255 range, you can check the Encode Preprocess | PreProcess Input “Scale Graphics to Video Values” to convert each frame to the 16 – 239 value range. If your source content is already in the 16 – 239 value range, make sure that the “Scale Graphics to Video Values” is unchecked.
Note that there is an equivalent up-scaling option in the Decoder’s Configure | Extract Frames | “YUV to RGB conversion”.

25. How do I use a different Quant Matrix?

You can cause the encoder to utilize a custom Inter and/or Inter Quant Matrix via the Encode Configure | Rate Control | Quant Matrix edit box. Enter the full path name of the Quant Matrix file that you wish to use. The Quant Matrix files are text files containing 8 lines of 8 values each. The INTER.MAT and INTRA.MAT files included with the install are examples of the file format.

The Quant Matrix files control how much data at each frequency is discarded. The upper left values control the low frequency components (like a solid sky color) and the lower right values control the higher frequency components (like the edges of text). The larger the value, the more data will be discarded as needed to meet the selected bit-rate. The MPEG specification defines a default Intra and Inter Quant matrix that is used if no matrix is included in the stream. The INTER.MAT and INTRA.MAT files contain these default values. So you may want to start out editing these files for you development.
Some notes on the usage of custom matrixes:
A. The file suffix does not matter.
B. The default matrix is used if the matrix name is set to “-“ in the rate control dialog.
C. The “-“ must be replaced with your matrix file name to use your custom matrix
D. If your custom matrix is placed in the same dir as the encoder, you probably can get away with just adding the name of the matrix in the rate control dialog. If your matrix is located elsewhere, you need to include the full path name (including drive letter) of your custom matrix file.
E. You can also change the quant matrix periodically throughout the encoding using the EDL file method. The EDL file should contain the frame number that the new matrix is applied and name of the quant matrix text file.

26. How do I create an MPEG stream from a single bitmap?

Select the bitmap (or TGA, DIB, etc) in the encoder’s Encode Input edit box. Set the Encode Configure | Number of Frame to Encode to the frame length of your desired MPEG. Set the Encode Configure | Input Frame Control to Repeat Frame. Depressing the encoder’s Run button will cause an almost instant creation of the MPEG file from your bit-map. If you decoder can handle variable bit rate files, un-checking the Encode Configure | Parameters | System Options | Enable Stuffing will result in very small MPEG files.

27. How do I create a VCD streams?

Select the VCD.ini parameter file to create VCD streams. The VCD setting sets the bi-rate to 1.159 mbps, the encoding to MPEG1 and checks the Encode Configure | Parameters | Const Parm Flag

28. How do I create quality low bit-rate streams?
High Quality Low Bit Rate encoding concepts are similar those detailed in the [LINK HIGH QUALITY] section. If your decoders can handle variable bit-rate encoding, uncheck Encode Configure | Parameters | System Options | Enable Stuffing.

Increase the encoding buffer to as large as your decoders can handle. You can often eliminate encoding artifacts by applying a Preprocess | Filter | Soft or Super Soft. The interactive encoding optimization feature, activated by selecting an area of interest with the right mouse button on any encode window during encoding, brings up a dialog box that allows you to enhance the area you selected and optionally apply a filter to the area outside of the selected area. (Be sure to set the number of frames you wish this enhancement to apply). You can also optimize regions of groups of frames using EDL commands.

29. Can I edit a MPEGRepair ini file?

PixelTools does not recommend direct editing of the ini file. We recommend changing the ini file by opening the ini file using the PixelTools encoder, changing the options in the dialog settings and then saving the ini file. You can edit the ini file, but PixelTools does not guarantee the results. The ini includes settings that provide backward compatibility to product features that are no longer supported.

30. Why is the first GOP shorter than the rest and can I make it the same length?
We decided to make the first GOP M-1 frames shorter than the following GOP for our rate control. The decoder will see I frames exactly every 15 frames for example with this approach if N is set to 15. There is no easy way to change the length of the first GOP.

31. Since our video sequence starts with a static image, what initial average activity would you recommend?
The Configure Encoding | Rate Control | Initial Parameters | Average Activity can be set to provide the encoder a hint as to how complex the first second of frames in your movie are. Black frames have an Average Activity of 1. Complex frames (e.g. forests, leaves) have an Average Activity of about 500. The encoder in it’s Auto setting (a 0 in the Average Activity edit box) assumes the worst IE the highest activity and throttles down the encoding at the start of the first frame to keep the decoder’s buffer from under flowing. But in cases where the first frame is black or a static sequence, you can cause the encoder to start with the quantization wide open by setting the Average Activity to 1.

32. How do I encode with Variable Bit Rate?
MPEGRepairHD has several modes of VBR depending on your decoder and specific system capability. One approach is to unselect the Configure Encoding | Parameters | System Options | Enable Stuffing switch. This causes the encoder’s rate control to work as in the constant bit-rate mode but in scenes where the minimum compression will still not produce the selected bit-rate, stuffing will NOT be added resulting in a smaller file and not a constant bit-rate.

MPEGRepairHD’s bitrate can be modified on a GOP by GOP basis IE approximately twice a second using the EDL BITRATE command. The bit-rate you set in the EDL file is essentially a constant bit-rate over that GOP. You can also enable MPEGRepairHD to vary the bit-rate frame by frame. This might not work acceptably on all decoders. Selecting the constant or average MQuant in the Rate Control dialog will allow you to enter the specific MQuant you wish to apply over the entire image. The CONSTANTMQUANT or AVERAGEGMQUANT EDL commands allow you to change the Constant or Average Mquant frame by frame. In these modes, all rate control functions are disabled.

33. Can your Encoders Encode Motion JPEG files?

Yes, provided the associated Motion JPEG AVI CODEC is installed in the computer that doing the encoding. Many Motion JPEG AVI CODECs are performed in the hardware capture cards. In these cases, the MPEG encoding must be performed in the capture computer. Some capture cards have software AVI CODECs that allow you to play back captured files on computers other than the one used for video capture. These software AVI CODECs also enable you to perform MPEG encoding on any computer.

34. Can your Encoders produce both 1/2 and 2/3 D1 formatted outputs?

Yes, our encoders can encode any frame size. They will require 2/3 D1 source to encode 2/3 D1. MPEGRepairHD and Expert-DVD include high quality downsampling filters to convert images from D1 to half D1. PixelTools can also provide specific downsampling upon request.

35. Which video capture board do you recommend for use with your software in order to produce high quality professional MPEG-2 video?
Any video capture card that outputs AVI MOV BMP or TGA files will work with our encoder. Video capture card quality has been increasing dramatically. We don’t have any specific recommendations.

36. How does the MPEG-2 Alternate Scan Help?

Alternate scan is a minor MPEG-2 innovation over MPEG-1 that defines a second method of storing the coefficients of each DCT block. This method favors field based content and sometimes provides a slight quality improvement over the normal scan when encoding field based content. You can select it in MPEGRepairHD by Encode Configure | Parameters| and depress the MPEG2 button. Then check the DCT Scan | Alternate Scan button.

37. What is the relationship between vbv buffer size and bit-rate settings?

The larger the buffer and the higher the bit-rate, the better the quality. The largest buffer size supported in Main Profile/Main Level is 112 (x16 Kbytes). The largest ATSC HD encoding buffer is specified as 488 (x16 Kbytes). Higher bit-rates and higher frame sizes potentially can have larger swings in the number of bits created per frame and thus can benefit with larger buffers.

38. For best results, do I check all of the field motion estimation check boxes?
Yes, for the best quality check all of the Motion Estimation boxes. The encoder performs all of the motion estimations that are checked and then selects the one that will product the best quality. Motion estimation is the longest part of compression (time wise) and the more boxes checked, the slower it will compress. (Also the Encoding Precision dialog allows you to increase quality at the expense of encoding time).

39. Does auto detect scene change do anything other than create an edit decision list (EDL) file? Does it affect encoding quality?
The auto detect does increase the encoding quality very slightly if the Closed GOP Parameter is NOT checked. The encoder automatically forces I blocks when it needs to (like during scene changes) when the Auto Detects is off. With the Auto Detect ON, the encoder forces an I frame and starts a new GOP at scene changes. This results in a slightly better encoding as it guarantees that the next I frame is N frames apart. AutoDetect will probably help more when encoding the Closed GOP mode. However, Closed GOPs are less efficient and produce lower quality encoding.

40. What does "Audio never acquired" mean?
This means that the Transport multiplexer can not find valid audio headers in the selected compressed audio file that is to be multiplexed with the video. In MPEGRepairHD, check the “save elementary” option in the Encode Configure | Audio/Mux dialog before running the encode. Try playing the resultant audio compressed file on a decoder to see if it is valid.

41. What does "DirectX Failure"mean?
The Microsoft DirectX AVI display components installed in your PC are not able to decode your AVI file. It could be that a specific codec or direct show filter required for decoding is not installed on your system. Sometimes the codec is located in a piece of hardware (like a video capture board). The AVI file should be able to play on the media player on the machine you are using for the compression.

42. What PIDs should I select when creating transport stream?

The PIDs need to be set up per your decoder’s requirements if any. Some transport specifications suggest that the PMT PID be one less than the PCR and Video PID. The PixelTools products default to “popular” PID values, so without any other guidance, it’s good to start with the defaults.

43. What does “mux internal initialization error” indicate?
This implies that the multiplexer could not initialize it’s internal states when starting up. Possibly the previous run did not completely shut down or somehow corrupted the muxer executable code. It’s best to shut down the MPEGRepairHD and restart when you are running another encode until you get the issues resolved.

top MPEG Stream Repairing

44 . How can MPEGRepairHD repair broken MPEG streams?

MPEGRepair does not automatically repair MPEG streams, but rather empowers you with steam analysis features so you can determine what causes the broken stream. MPEGRepairHD includes a decoder and an encoder providing you with the option of decoding and re-encoding a video segment if that will fix the problem. MPEGRepairHD can change certain headers without re-encoding MPEGRepairHD also includes GOP editing tools so you can re-encode and insert fixed video segment into a “bad” elementary video stream.

45. Can MPEGRepairHD fix certain stream issues without re-encoding?
MPEGRepairHD includes a suite of header modification options in the Decode | Configure | Fix Stream dialog that can be performed on an encoded stream without re-encoding. Most of the field encoding flags can be changed as well as video profile, level, and video source flags. Pan and Scan flags can be added. Also, the time code for an entire video can be re-synchronized.

46. Can I add closed caption or line 21 data to an existing MPEG without re-encoding?
Yes! The MPEGRepairHD decoder can read a Decoding Decision List [DDL] file that contains the user data for each frame number. To add user data, generate a text DDL file that contains a pair of lines for each frame to have user data added. The first line should contain the frame number at which the user data will be added. The second line should contain the HEXUSERDATA command followed by up to 128 pairs of characters representing the up to 128 bytes of user data to be added to the frame. The file format is identical to that of the EDL file. Then check the Use Commands in DDL File option in the Decode | Configure | Fix dialog. Add the name of the file that will contain the resultant MPEG stream with user data added in the Decode | Configure | Fix | Save Fixed File text edit. Select your source file in the Decode MPEG File to Decoder or Analyze and depress the Run button to start the process. The Decode “St” Statistics window will display the functionality of the DDL file during the decode and add user data process. Contact PixelTools for additional support in converting your closed caption file format to that utilized by the PixelTools EDL file.

47. What are the limitations on the MPEGRepairHD’s editing functions?
The editing functions are designed to work on elementary video streams (not multiplexed streams). The append function will work with elementary or multiplexed streams. The editing functions work on GOP boundaries. When replacing streams with open GOPs (IE encoded frames between key frames that use reference frames from adjacent GOPs) the first few frames after the splice may not decode properly as the reference frame used in their decoding may have changed. The errors occur in the first B frames (usually one or two frames) prior to the P frame.

top MPEG Decoding

48. How do I get MPEGRepairHD to recognize my particular MPEG file?
The MPEGRepairHD decoder ignores the MPEG file suffix. It investigates the file contents to see what type of a file it is. MPEGRepairHD looks at the first file header to see whether it is an elementary or multiplexed stream. If your MPEG file does not start with a valid MPEG header, MPEGRepairHD assumes it is a transport stream and aggressively attempts to sync up the transport packet structure and identify the program contents.

49. How do I decode in the batch mode?
The decoder can be launched using the command window in the format MPEGRepairHD –d DemoFile.mpg
This will cause MPEGRepairHD to decode the DemoFile.mpg file. The parameters (number of frames to decode, frame size, etc.) are taken from the MPEGRep.ini file located in the same directory that the MPEGRep.exe is located. You can decode frames with different parameters by copying the specific parameters to the MPEGRep.ini file just before decoding. Note that MPEGRep.exe and it’s associated dlls can be moved to your desired directory and does not need to be run where it was initially installed.

MPEG Analysis

50. How can I analyze an MPEG file?

The properties of the MPEG stream can be obtained by depressing the left hand Analyze button on MPEGRepairHD. This will cause the application to decode the starting and the ending segments of the stream. Salient stream properties including length are then displayed in a decoding statistics dialog box. In addition, the analysis properties will be stored in a text file called Analyze.txt in the directory where the MPEG file is stored. Specific headers can be analyzed throughout the entire MPEG stream by depressing the left-hand St (Statistics Window) speed bar button and then checking your desired headers in the View menu. Details of the (the most recent) selected Video, Audio, and Stream headers can be viewed in this window during stream decoding. All of the information in the Statistics window will also be stored in a file called decode.log.

MPEGRepairHD also has a decode window which you can add graphic overlays representing the motion vectors, the quantization values, and the block encoding decision types for in each frame.

MPEG Plug-Ins

51. Do you have a plug-in for Adobe Premiere and After Effects?
Our HDProQT Plug-In for the Macintosh operating systems is actually a plug-in for QuickTime. As such, the Plug-In will provide PixelTools HD Transport Encoding Export from any Mac program that provides QuickTime exporting, including Adobe Premiere and Adobe After Effects. Our HDPro Adobe Premiere PC Plug-In is custom made for Premiere and will not work in other programs. PixelTools is currently porting the Macintosh QuickTime Plug-In to PC QuickTime7 that will enable After Effects on the PC to use the PixelTools HD Transport Encoding Export. Contact PixelTools for the latest status on the product.

52. What are the limits of the demo version?
The 30 day evaluation is limited to 5 minutes of video and 10 Mbytes of transport output.
PixelTools does not show up in the Export Menu on my Mac?
PtHDMpeg.component is not found in the /library/quicktime dir of your boot drive.
What are the meanings of the error codes returned in the QuickTime player just after starting an encode operation?
-5829 ===> Demo Has Timed out
-4960 ===> PtAltevec.bundle or PtMacEnc.framework not found in the /library/frameworks dir

top H.264 (MPEG4) Encoding ExpertH264

53. What H264 decoder do you recommend that works with your encoder?
There are several low cost or free H.264 decoders currently available and the selection is constantly changing … so we don’t have a favorite for long. Our H.264 encoder can produce a wide variety of H.264 elementary streams so they should be able to play on all decoders.

54. Do your tools have a way to view encoded content?
ExpertH264 actually outputs decoded YUV content in a file called test_rec.yuv. Part of the compression process includes reconstructing each compressed image so that it can be used as a reference for other images. These reconstructed images represent the decoding quality of the H264 file. So you can view the amazing quality of H264 by viewing the test_rec.yuv file.

55. Great, but how can I view the ExpertH264 decoded YUV frames?
Advanced Viewer is a program to view and edit image files and convert it to different file formats. One of main features is ability to play mp3, avi, wav, midi and other file formats. This program is a good YUV viewer and is available shareware.

56. Why is ExpertH264 so slow?
As noted in the information on H264, ExpertH264 does a lot of calculations in order to achieve the amazing compression ratios. This takes a lot of computer time. PixelTools is currently optimizing our H.264 code. We have achieved a 3000x speed up in our MPEG2 encoders since they were first released and anticipate a similar speed up in our H264 code. We are focused on helping our customers evaluate and customize H.264 using the very latest H.264 reference code that is updated frequently.

57. Why can’t I just compile the latest committee source code and build my own encoder?

You certainly can try and let us know if you are successful. But you will save many many man months if you use our code. We have compiled and tested the latest reference code. We have made it into an easy to use graphical user interface. We have simplified the parameter file by exposing the critical encoding parameters in an easy to use documented interface. ExpertH264 inputs files from a wide variety of input sources including AVI, QuickTime, BMP, and targa in addition to the YUV format accepted by the reference code. We also have added rate control that will save weeks of encoding to achieve a target bit-rate on each of your movies.

58. When will an SDK for ExpertH264 be available?

As stated above, ExpertH264 is a highly fluid product. H264 SDKs are made available upon request and incorporate the latest updates to our code. The SDK interface is very similar to our Expert Workshop SDK.

top Transport Multiplexing


59. How can I stop the “Transport Error: Video internal decoder underflow” message during multiplexing?
This message indicates that your source video has severe enough video buffer underflow problems that the stream cannot be multiplexed to achieve a compliant multiplexed stream with audio/video sync. The multiplexer works on only constant bit-rate elementary streams (not variable bit-rate streams). The fix is to re-encode your video stream at a constant bit-rate with no (or few) buffer underflows.

60. Video and audio are out of sync after splitting and re-muxing a stream?

TransMux assumes that the elementary streams are in sync to start with; and then assures that they remain in sync. The audio/video synchronization should be maintained to within about 20msec. If your audio and video is out of sync after re-multiplexing, it is first necessary to determine if the problem had come about through the splitting or the re-multiplexing.

Some transport streams are captured from a longer stream and do not start with the required transport and elementary headers. Sometimes theses streams, when split, result in a few seconds missing from the start of the video as TransMux cannot start the split until the first video sequence header is encountered. So it’s important to see that the split video length is identical to the split audio length and the original multiplexed stream if your re-multiplexed streams are out of sync.

top Expert Workshop SDK

61. What operating systems does the SDK work on?
Our Expert Workshop SDK comes complete with dynamic libraries for the PC (with SSE2 support) and a framework for the Max OSX (with Altevec support). Our libraries also support legacy Mac Systems and we are currently porting the code to the new Intel based Mac systems. Our UNIX libraries (that support LYNX, IRIX, and Solarus) are available upon request.

62. Why do the SDK API functions crash when they are called from my development system?

Our PC dll expects that the calling program will have been compiled with 1 byte alignment. The Microsoft Development system defaults to 8-byte alignment so you need to set it to 1 byte alignment or set the alignment in just the code that calls the PixelTools SDK to 1 byte alignment. Always do ExpEncodeOpen, even for just a decode or multiplex session.  The SDK is encoder centric and ExpEncodeOpen loads dll file paths and sets parameter defaults. Many structures that are used as calling parameters need to be allocated but not necessarily filled out.  Some null pointers in place of structure pointers will cause a crash.  Refer to the sample code for specific structure usage.

63. How do I add closed captioning or update headers in existing MPEG files?
To update headers or to add closed captioning to an existing stream use the ExpDecode functions.
Put your closed captioning text in Expert.ddl text file.  This file must exist in the directory where your resultant MPEG file will be stored.

Closed captioning and header updates are saved in an elementary video file.  You can then multiplex this video file with the audio files (also saved during the update process) using the ExpTransportMux or the ExpProgramMux.

64. How do I disable the SDK timers that appear when the encode finishes?
In the call to ExpEncodeOpen, change the Level parameter from 1024 to 0. 1024 is the profile level that turn on the internal benchmarking profilers.

65. Does your SDK work on Windows XP-64 running on AMD processors?
Yes.

66. How do I use the C libraries in the Microsoft .NET environment?
You can wrap the API in a C++ class using ATL (Active Template Library). This exposes it as a COM object for .NET interoperability.

top MPEGRepairHD

67. MPEGRepairHD prints an error when encoding audio from QuickTime files.

We currently do not have our QuickTime Audio extractor written and so MPEGRepairHD can not encode audio directly from a QuickTime Audio/Video file. You can get by by exporting the audio track to a WAV, AIF, or PCM file ahead of the encoding using the QuickTime Pro version or other utility. Then set up MPEGRepairHD Audio/Mux to encode audio from the file you just created.

68. How can I join MPEG streams and make them play seamlessly in my decoder?

Joining multiple legal MPEG streams by a simple concatenation will introduce many discontinuities in your joined MPEG stream which may cause erratic and random playback issues. All of these issues can be resolved individually with MPEGRepairHD.

MPEG is optimized so that a minimum cost decoder (with a small amount memory) can properly decode a stream delivered over a constant and low bit-rate channel.  These constraints make some MPEG decoders sensitive to discontinuities in stream encoding. Some decoders may stop and reset for a few seconds with discontinuities; others may play seamlessly through the discontinuities.

The following are some of the discontinuities encountered in joining MPEG streams and their fix:

Elementary Stream Discontinuities

Vbv buffer

Encoders vary the actual bit-rate per frame but not more than can be handled by the decoder’s small buffer. The buffer discontinuity formed by joining two streams could be such that the decoder’s buffer overflows or underflows.  This could result in pausing, stuttering, torn frames; or could not be a problem at all.

MPEGRepairHD and ExpertHD can be setup to encode segments with a specific starting and ending buffer state (in the Rate Control dialog).  With fixed buffer states on each segment, the ending buffer state of one segment is identical to the starting buffer state of the next segment and no buffer discontinuity will be encountered.

End of Sequence

MPEG streams end with a 4 byte end_of_sequence header.  These headers may confuse a decoder playing concatenated streams.  MPEGRepairHD and ExpertHD can be set up (in the Parameters dialog) to encode segments with no end_of_sequence headers.

Time Code

MPEG streams include SMPTE time codes in each GOP header.  Joining independent streams will likely cause GOP time code discontinuities.   Although not very common, some decoders may be display erratically across time code boundaries. MPEGRepairHD and ExpertHD can be set up to encode with specific starting time codes and so if you know the length and position of each segment, you can encode with the time code that will provide no discontinuities when joining the segments.  In addition, MPEGRepairHD fix can resequence the time code of concatenated streams without re-encoding.

Program multiplexed stream discontinuities

Buffer

Program multiplexers assemble video, audio, and padding packets such that the video and audio data arrives at the correct intervals to maintain the elementary video and audio buffers.  Concatenating program segments could result in buffer overflows or underflows and result in improper playback.

Time Stamps

Program multiplexers add time stamps to the video and audio streams to assure in sync playback.  Time stamp discontinuities could cause audio/video sync issues or erratic play back.

End of Sequence

Program multiplexers add a 4 byte end_of_sequence header (different from the elementary stream’s end_of_sequence header) to the end the multiplexing sequence. This may cause some decoders to stop at the end of a segment.

All of the above issues can most easily be resolved by splitting the individual segments into their audio and video components before multiplexing (using MPEGRepairHD save elementary stream option) and then re-multiplexing after stream concatenation.

Transport multiplexed stream discontinuities:

Buffer

Transport multiplexers assemble video, audio, and padding packets such that the video and audio data arrives at the correct intervals to maintain the elementary video and audio buffers.  Concatenating program segments could result in buffer overflows or underflows and result in improper playback.

Time Stamps

Transport multiplexers add time stamps to the video and audio streams to assure in sync playback.  Time stamp discontinuities could cause audio/video sync issues or erratic play back.

Packet Number

Each transport packet has a numerical sequence that assists in re-sequencing packets.  Concatenating transport streams will likely result in a discontinuous sequence.  Decoder response could be seamless or could just stop decoding for a while.

 

All of the above issues can most easily be resolved by splitting the individual segments into their audio and video components before multiplexing (using MPEGRepairHD save elementary stream option) and then re-multiplexing after stream concatenation.

 

 

Hope this helps. know if there are any additional questions.

©1998-2007 PixelTools Corporation