FAQ

General

What is the meaning of your encoder settings?
Please refer to the Advanced Settings documentation that describes each encoder parameter
Should I specify all the parameters in the configuration file? And what are the default values?
No. You need to explicitly specify only those values which should change. The rest of the parameters will initialize to their default values, which are specified in v4enc.cfg
How can I use all of the cores of my CPU? What are the proper settings?
The H.264 encoder automatically detects the number of available CPU cores and initializes corresponding number of threads to run. To enable this default automatic mode : mt.disable=0, mt.num_threads=0.
How do I tune the encoder for real-time operation on a particular hardware?
Use the speed parameters (speed.i, speed.p, speed.b) to adjust the quality/speed trade-off. Only use the speed.automatic option under instructions from technical support.
What are recommended speed settings for the encoder?
0:0:0- offline encoding, 0-2-2 - best quality, 2:4:4 -recommended, 4-4-4 average real-time. Contact support if these do not produce satisfactory results.
What are required settings for strict Baseline profile encoding?
You need to specify at least the following two settings: profile_idc=66, gop.bframes=0
What are recommended settings for mobile content?
Although some new devices support AVC High Profile and AAC HEv2 profile, for general compatibility we recommend 264 Baseline Profile, picture size up to 640x480 and AAC/LC profile only. Please refer to the manufacturer's specification for details.
How to configure the stream for Adobe Flash/MS Silverlight playback?
The latest versions of these players support all AVC profiles up to High and AAC audio up to HEv2.
Why do I get level_idc value changed in the output stream compared to what I specified in the cfg?
The H.264 encoder automatically validates and corrects if necessary the level setting to comply with the H.264 standard.
How to get a proper aspect ratio (AR) on the playback side (4:3, 16:9)?
The simplest method is to use correct resolution for the desired aspect ratio for the output picture. For example, 320x180 or 640x360 for 16:9, 320x240 or 640x480 for 4:3. Another option is to specify the aspect ratio idc in the output H.264 stream. See Advanced Settings documentation (section 4.13) for the list of predefined values and calculation formula for the custom id. For example, in case of 320x240 it would be necessary to specify idc=14 (4:3). Please note that the second option may not work with some players (for example, it won't affect QT playback, because QT ignores the aspect ratio idc data in the stream).
How do I get a more stable bandwidth usage with the encoder?
Do not use the fixed QP mode (rc.type=0). Use CBR (or even CBR+filler) rate-control mode. If results are still not satisfactory, try to decrease the rc.vbv_length (1000 ms is the default value for CBR). But please note that values lower than 500 ms may produce skipped frames in the output (especially at the low target bit-rate setting). Turn on the CIR feature to avoid I frames altogether.
I get skipped frames (freezing image) in CBR encoding. How can I eliminate this?
Try either one of the following, or both: use VBR mode (skips are forbidden in VBR mode), increase the target bitrate (rc.kbps), increase the VBV buffer setting (rc.vbv_length), increase the maximum QP limit (if changed from the default 51) and increase the minimum QP (if the default value of 12 is used).
Why do I get different H.264 output stream from the same source every other run?
In the MT mode, the encoder will produce slightly different outputs due to the asynchronous nature of the Rate Control update operations.
I get an error trying to encode 720x486i picture in interlaced mode. What is the solution?
The H.264 encoder requires that the input resolution be a multiple of 2 for progressive coding and a multiple of 4 for interlaced video.
What is the maximum resolution supported?
Our encoder and decoder can handle resolutions up to 4096x2048
How do I calculate the size of decoded video?
It depends on video resolution and sampling format (444,422,420). Thus for 420 sampling you will have 12bits/pixel, for 422 - 16 bits/pixel, for 444 - 24 bits/pixel. The formula is as following: (HxWx[#bits/pixel])
How do I calculate the size of encoded video?
Since you specify bitrate in Kbit/second you know the size of 1 second of encoded data. Thus if you divide bitrate by 8 (to get the size in Kbytes) and multiply it by number of seconds, you'll get the approximate size of entire encoded data. The formula is as following: (bitrate_of_the_highest_layer/8)*[duration_of_video_in_seconds]. Note that this calculation is rough, the actual size also depends on many parameters of configuration file

SDK

What parameters can be changed on-the-fly (without encoder restart)?
The following encoding parameters may be changed in between frames after encoder start (on-the-fly):
- frame rate and bit rate - see v4e_change_bitrate() and v4e_change_bitrate_and_framerate() API functions
- individual frame/slice parameters (slice type, QP) - see frame_modifier_t structure
- loss rate for Error Resilience - see v4e_set_current_loss_percents()
What about other configuration parameters?
To change all other encoder settings the application needs to re-create encoder instance with v4e_settings_t containing all the parameters. Please note that this implies immediate I-frame generation.
Can I only specify encoder parameters of interest rather than setting all of them?
Yes. It is a recommended technique to fill the v4e_settings_t structure with default settings first (v4e_default_settings() API call) and then modify only desired parameters.
How do I change the target bitrate value on-the-fly?
Consider using v4e_change_bitrate() or v4e_change_bitrate_and_framerate() API function. To make changes to an SVC layer use v4e_change_svc_bitrate_and_framerate() call.
Does your encoder support on-the-fly I-frame insertion?
The Structure frame_modifier_t is used to set specific encoding parameters for a specific frame. The user's application can modify the slice type, set IDR flag and modify the Quant Parameter.
How frequently can we change the bitrate on-the-fly?
It is not recommended to change bitrate/framerate (change_bitrate_and_frame_rate() API call) more than once per second (25-30 frames). If the change is larger than 50%, then it's better not to make it more often than once per 2-3 seconds.
How to make dual-pass encoding?
Each pass encoding is performed for the same source but with its own rate control mode (rc.type = 4, 5). See sample encoder source code for more details.
What is output_delay parameter of the H.264 decoder settings (v4d_settings_t.output_delay)?
Decoder outputs frames in display order, which is not the same as the encoding order. The decoder introduces a delay in order to ensure that the decoded frames will be output in display order. This delay is calculated automatically from stream SPS VUI data (if present). If for some reason, a lower value than the automatically calculated delay value is desired, it may be set by this parameter. Note that a lower value may present frames out-of-order. The value is set to zero to achieve low-delay decoding, when you are sure, that coding and display order are the same.
What is the default setting for output_delay?
The default value for output delay is 15, which causes the decoder to calculate automatically the correct value based on the stream data (profile, level information and optional "hints" encoder can place in SPS VUI ). The value will never exceed 15. Note, that the correct delay will be calculated automatically if the following setting was set when encoding: vui.bitstream_restriction_flag = 1
What is the proper setting for output_delay to minimize the latency?
For streams created with the VSS encoder without B-frames or bidirectional P frames, delay can be set to zero. For streams, created with VSS encoder with ordinary (not hierarchical) B-frames, or with bidirectional P frames, delay can be set to 1, no matter how many B-frames were set. For streams, created with hierarchical B-frames delay can be set to 2.
How does the H.264 decoder get the picture timing?
The H264 Decoder doesn't depend on time stamps at all. It is common practice to keep timestamps outside of elementary stream - on the system level - to allow for correct a/v sync. It is the application's responsibility to attach time-stamp value to a particular compressed data block and then receive it along with a decoded frame and use while playback (see decoded frame -> frame info -> timestamp). The time stamp has no significance to the encoder or decoder. The decoder simply copies it from input to output.
How can I reduce I-Frame size?
In order to reduce the size of the I-frame, you can set rc.qp_delta_p = 0 This will reduce the I-frames size, which may still be larger than desired. You can use the setting: rc.max_intra_frame_bytes to force it to be of a specified size. The parameter is available from version 4.6 0r later. Note, that if using this option, the visual quality of I-frame will be worse than P-frames before it.
Which decoder errors require that I request another key frame to avoid display of corrupted frames?
Any error returned in info.error_no indicates a decoding issue in the stream. If the encoder is using the Error Resilience tools, it is not necesssary to insert an I-frame after the error is detected, because the decoder will have sufficient information to perform error concealment.
Will the decoder be able to properly decode the stream if NAL units from the first key frame were lost and decoder was not able to decode it, and NAL Units of the following non-key frame were delivered correctly to the decoder?
The decoder will handle such situation. It will apply Error Concealment (EC) mechanism the key frame. Setting the flag: EC_FULL_ERR_CONC in the decoder settings activates a more thorough and slower mechanism.
In the sample code vp_raw_frame_t.timestamp field contains timestamp of current frame using 10^7 timer frequency. Does the value of this field affect encoding in any way?
The ""timestamp"" field has no effect on the encoding process. The value is just copied from the frame to all output mediasamples, related to that frame. Thus it can be used to link output media samples with input frames.
What is the unit for the vp_raw_frame_t.mediatime field? Does the value of this field affect encoding?
The value of the "mediatime" field does not affect the encoding process.
Can I receive call back for each encoded NAL?
Yes, you can receive call back for each encoded NAL. See 'nal_receive_local.callback' in sample encoder.
Can I configure the encoder API to generate fixed size NAL units? (MTU-RTP header = N_bytes)?
The encoder offers a packetizing mode that lets you set the payload size to not exceed a fixed number "N", which is usually the MTU of the connection minus the RTP header size. Set the following parameters in encoder config: slice.mode = 2, slice.parm = N
I receive "level limits exceeded" error. How do I fix it?
If you want to encode at that level, you will need to reduce the resolution. However, if the level indication is incorrect, set the level_idc parameter as zero (0), and the encoder will calculate and report the correct value.
What information can I get from decoder to determine that a key frame is required from the encoding party?
Decoder starts decoding as soon as it receives at least one key frame after it is created with v4d_open() function. If packet is lost or corrupted, decoder still returns frames. You can also analyze dec_frame->info.error_no field during decoding to detect packets corruption/loss and to decide, whether new key frames is needed. Error codes are defined in file v4_error.h. Typically VSSH_ERR_FRAME_DROP_DETECTED, or VSSH_ERR_SLICE_DROP_DETECTED signals packet loss. Other errors signal packet corruption.
What does multithreading do in encoding/decoding process? Does it add delay in output?
Multithreading attempts to load all processor cores equally. The API functions return control immediately if no output is available, so that other tasks can be executed. Multithreading can increase latency in cases where the resolution is small. Ask support for advice on this point.
What does call to v4d_get_frame return if only a few NALUs (not all) of a frame have been sent to decoder through v4d_set_nal_unit?
Even if output delay is set to zero, decoder will not output frame until it receives all available NAL-units of the current frame. That event is demarcated by the presence of the first NAL-unit of the next frame or the Access-Unit-Delimiter NAL unit. You can force the decoder to disgorge the current frame, by setting function 4d_set_end_of_access_unit().
Why SVC encoding is slower than AVC? Does the encoder try to reuse motion and other similar decisions in different layers during SVC encoding process, or does it encode each layer independently of others?
SVC encoding is more complex than AVC. SVC layers encoding reuses motion and other similar decisions, using the ""base-mode"" macroblock type and the ""residual prediction"" flag. The per-mb encoding can be adaptive or fixed. To speed up the process, set encoder Flags 0x50 - to force reuse of all decisions and residual from underlying layer. In addition, you may set the max speed (speed.[x]=8) which will speed up the base layer encoding.
I am currently working on 10-bit encoding. From what I read in the SDK documentation, when I pass the frame buffer to the api, it expects 2 bytes per pixel and I need to format the 10-bit data into 16-bit. I am wondering if I should put the 10-bit data in the msb or the lsb of the 16-bit.
2 bytes are treated as unsigned short, little endian (lsb first). 10-bit data should be placed to lsb of these 2 bytes.
Is there any way to get frame type from VSS Decoder?
Decoder SDK function returns "yuv_frame_t" structure. I, B or P can be determined from "info.slice_type" field of this structure.
Does VSS API has functionality for parsing an SVC NAL Unit, so that we can determine its type, and what layer it belongs to, etc.
You can analyze NAL type and it's SVC layer using a set of macros, defined in file v4_nalu.h. Another way to extract proper SVC layer is using SVC substream extractor module. See details in "4.6 what's new" document and sample_dec.c source code.
What is the overhead on calling v4d_get_frame after every call to v4d_set_nal_unit? Is it better to track frame boundary (base on timestamp etc) and call v4d_get_frame on frame boundary?
Practically no overhead. Function returns NULL immediately if frame is not ready.

StreamingPack

What is GraphEdit? Where can I get it?
With Microsoft's GraphEdit the user can quickly build and test filter chains (so called graphs) to see if they function as expected. It comes with MS Platform SDK package. It is also available for free download on the web. Please apply to GraphEdit Help for the usage instructions.
I don't see any VSS filters in the GraphEdit list. I'm using a 64-bit version of Windows.
Please note that all VSS filters are 32-bit binaries. GraphEdit x64 won't show you any of these. That's why you need to use a 32-bit version of GraphEdit (graphedt.exe rather than graphedt_x64.exe).
Why can't I see pin properties in GraphEdit?
The GraphEdit executable must come with proppage.dll. Register it once with the following command line call: 'regsvr32 proppage.dll'
Why should I reconnect the filters every time I change their settings?
Important information is passed from one filter to the other when they connect (see the connected pins property window. If changes are made to filter parameters, such as video capture resolution, audio capture sampling rate or video encoding profile, then the filter must be reconnected in order to pass the updated information. For greater certainty the graph should be rebuilt
I'm having a problem with a filter graph. What information should I provide to the support team?
The simplest way to record all your graph configuration details for support, is to save your filter graph as .grf file and send to support@vsofts.com. This file contains all the information needed (filter versions and settings used). You may provide filter logs as well.
How do I turn on filter logging?
To enable a filter log find its name under VSS registry key: 'HKEY_CURRENT_USER\Software\VSS'. Create the following values there: 1. Log_file of String type that contains log file name/path and 2. Log_enable of DWORD that switches log on(1) / off(0).
I'm getting too low frame rate on the encoder with a web cam source. What could be the reason for that?
Web cameras may reduce their frame rate due to their automatic exposure control in low light conditions. Turn this feature off to maintain a fixed frame rate.
Why do I get audio played on the decoder side with a wrong pace? I'm using a DV camera source?
There is a known issue with DV camcorder source filter, that the actual audio sampling frequency is followed by the source filter after the graph starts (the default is 32 KHz). To work around this problem, it is necessary to run and stop the graph, then it is possible to continue to build the graph with the correct audio frequency information used. See Streaming Pack User's Manual for more details.
I used VSS TS Muxer to create files with H.264 video and AAC LC, HE and HEv2 audio tracks. Only the LC stream played correctly with VSS StreamPlayer. The HE and HEv2 files played with what seemed to be the audio at half speed. These files all played back correctly in the VLC Player.
HE-AAC was developed after the MPEG2TS container, and requires audio meta-information (so called audio specific config) to be included in the audio information. MPEG2TS does not provide a mechanism to transfer the meta information. That actually means AAC-HE is not natively supported by the TS format VLC, is a newer format player, that is using heuristics to pull the AAC profile from the elementary stream itself.
I have HE/HEv2 audio stream detected erroneously as LC. I'm using TS-over-RTP streaming. Is there any reason why?
Do not use Transport Stream multiplexor if you want to stream AAC HE or HEv2. Only LC profile is supported naturally in TS container. Contact support to discuss other transport options.
How do I get the actual settings of the H.264 Encoder DMO?
Besides the settings available in the GUI front-end there are also the ones that can be set or get through the configuration file. Use 'save config' button on the config tab to obtain the list of parameters that are modified from their default values. At the same time 'save full config' will give you the whole bunch of settings in effect.
What is the proper way of configuring the H.264 Encoder DMO?
It is a good practice to press 'set defaults' button first and then load configuration file or modify the GUI controls. This way you won't have any unpredicted results from the settings that are not seen.
What is the latency parameter in VSS Demuxer filter? Can I set it to zero to minimize the delay?
The data packets take time to reach the receiver side. Moreover, the encoder itself introduces the initial delay. To compensate for these various delay sources, the latency parameter is introduced into Demuxer filter controls. It must always be a positive value (except for file playback case). The actual setting depends on the network conditions and other factors.
Why do I get frame jitter/audio stuttering on the playback side?
See the lag statistics in VSS Demuxer filter for the elementary streams. If any of them tends to show negative values then increase the latency parameter to compensate for the transport delay.
Is it possible to execute multiple instances of RTSP filters?
You can run multiple instances of RTP Broadcaster and RTSP Receiver filters in a system. But only one instance of the RTSP Sender is allowed.
When analyzing the RTP stream from the RTP Broadcaster I see that the video packets have a 90KHz clock timestamp but the audio packets have a 48KHz clock timestamp. Is that normal?
That is normal according to the standard. See RFC 3640 issue 3.1. Timestamps for AAC audio as well as for MPEG-4 audio must be at sampling rate. For video it is recommended that the rate be set to 90 kHz.
Is there an option to set the connection timeout on the RTSP Sender in the registry?
No, there's not. The default time-out is 3 mins.
What is the optimal combination for Latency, Restart on Gap and Reorder buffer settings in Demuxer for streaming in lossy network environment?
Reorder Buffer - The default setting is 100 ms at 500 ms latency. Roughly speaking, that means to use 100 ms for re-order and the other 400 ms to compensate for the network delays. You can vary the reorder buffer to have the optimum balance. The Reorder buffer should be low, such that the remaining delay latency is sufficient to accomodate the network delays, and lag times remain non-negative. Restart on gap: the playback graph is restarted automatically (resetting the a/v sync) when the timestamp difference (of the incoming packet and the previous received one) exceeds the specified threshold. This feature may be useful when occasional network shut-downs are expected. If that is not the case, you can disable it by setting to 0. Use values that are at least 2x higher than the latency.
How does the packet re-order buffer work in VSS Demuxer filter? How should I choose the buffer length? And what is the correlation with the latency parameter?
Latency and reorder buffer are two independent things actually. Reorder buffer length is the value you set. So that, if a packet is missing from the sequence it is awaited for until the time stamp difference (between incoming packet and the packet awaited) is lower than the buffer length. Once the threshold is reached a drop is detected. Latency parameter is simply used to increment media samples time stamps. So that you can have positive lags on the output - what is required for proper rendering (media time stamps to go ahead of the graph time. And the thing is that reordering option can increase the effective delay (for the reorder buffer length maximum). That means the latency setting should be higher than the reorder buffer length to compensate for the delays in the buffer. And additionally, as always, care to have some extra latency to compensate for the network transport delays.
I'm having problems connecting your H.264 and AAC Decoder outputs to the Blackmagic Decklink SDI Renderers. What is the solution?
SDI standard has strict requirements for video and audio signals. That means that you must be sure that decoder has precisely SD (720x480@30 for NTSC or 720x576@25 for PAL) or HD on the output- both the resolution and the frame rate. Same thing about audio- the sampling frequency must be 48 Khz. You won't be able to connect the renderer filters unless the requirements above are met. We recommend to use professional capture boards/cams (like DV) to have the appropriate signal parameters. Web cams do not generally provide those.

ParallelStreamer

vCompress

What are the input formats supported?

vCompress application supports as an input:
- Raw video YUV streams
- Video/Audio input via Direct Show.

It means all the containers/video/audio formats that are recognized by DS filters installed on the computer
- QuickTime files
- Image (picture) files

What is the possible output?
vCompress application supports the following output:
- Containers: Raw video, MP4, MPEG2TS
- Audio formats: AAC
- Video formats: H.264 Video (AVC, SVC, MVC, Multi-AVC, AVC-Intra)
Can vCompress application read directly from a DVD?
Most probably no. The task can be done by reading VOB file via DS filter but we don't have such experience.
Does vCompress have workflow/batch features - such that it can pick up a list of files and process them?
vCompress package includes both GUI and Console applications. Console application can be launched in the batch mode.
Can the program just read all the files in a particular folder?
vCompress Console application can be launched from some script to do that.
Can the program create an MPEG2TS?
Yes, vCompress supports output of MPEG2TS container.
Can the program read a bluray 3D input and generate a lower bitrate MVC output?
vCompress can generates MVC output:
- User should feed vCompress application with 2 separate video input streams (either raw video or via DirectShow).
- vCompress application runs in BD MVC (3D) preset. Lower bitrate is specified.
- vCompress outputs MVC elementary streams.
We are not aware of DS filters that can read "whole" bluray 3D and then extract 2 inputs from it.
How to enable Temporal Scalability for SVC encoding?
Temporal scalability is being enabled by 'SVC Temporal Scalability' checkbox in 'Full video settings' window (Ctrl+F3).

ARM SDK

What colorspace conversions are supported
General: RGB555, RGB565, RGB24 and RGB32 to IYUV conversions and backward IYUV to this RGB formats. Neon-optimized: only forward RGB24 to IYUV and RGB32 to IYUV conversions.
© Vanguard Software Solutions - The Art of Advanced Video Coding
Privacy Policy  |  Terms of Service