X
56 Rate this article:
No rating

INTERNAL: Additional information about using IDLffVideoWrite

Anonym

The purpose of this Help Article is to supplement the IDL online help information about the IDLffVideoWrite object class, which became available beginning with IDL 8.1.

The IDLffVideoWrite object class allows the creation of video files, created from the choice of a large number of possible video file format and video/audio codec combinations. The underlying functionality is derived from the FFmpeg library (www.ffmpeg.org).

The IDLffVideoWrite::GetFormats and IDLffVideoWrite::GetCodecs methods generate a full listing of available file formats and video/audio codecs (see also Tables 2 through 4 below). The underlying IDLffVideoWrite functionality is provided by the FFmpeg library (www.ffmpeg.org). Not all standard FFmpeg library formats and codecs are available to IDLffVideoWrite, because our version of the library is compiled to prevent the inclusion of proprietary technologies (such as the proprietary "H.264" video codec).

Use of the MPEG-4 (mp4) and AVI file formats are mentioned in the IDL documention. However, that because of the large variety of format and codec standards provided with the underlying FFmpeg library and the many different requirements and limitations of the various video players available, it is not possible for ITT to document the use of all of the video (and audio) file formats and codecs implemented by IDLffVideoWrite or to document compatibility with all video player software.

Instead, it is up to the expertise of the end-user to determine what video file formats, codecs and other settings will work best for their own purposes.

General documentation about the IDLffVideoWrite object class can be found in the IDL Online Help under the Contents section:

 

    IDL Programming > Objects > File Format Object Classes > IDLffVideoWrite

Other useful information about IDLffVideoWrite:

 

  • MP4 and AVI are file container formats which can contain both video and audio streams that may be compressed with various codecs. In general, the AVI file format seems to be less restrictive than MP4 with regard to the types of codec streams that it can hold.

     

  • For IDLffVideoWrite, if you don't provide any codec or bit rate settings to an AVI or MP4 file, then the following codecs and bit rates are used:

      Video Codec: MPEG-4 Part 2 (mp4)
      Video Bit Rate: 2 Mbps
      Audio Codec: AAC
      (Audio Bit Rate: 128 Kbps)

  • One approach to deciding what format, codec, bit rate, frame rate, etc., to include in the video that you will create is to base this on the capabilities of the video player that is expected to play the file that IDL will create.

     

  • Another strategy for deciding what will work best is to look at the various format and stream properties of files that you know to work well in various video players and then try to reproduce those settings in the video file that you create with IDLffVideoWrite.

     

  • For reference, below are some video format/codec combinations and test results for player compatibility on Windows XP in a few popular video players. Actual compatibility results on your operating system and the version of video player software you use may differ from the information below. The bit rate and frame rate (frames per second (fps)) you use to create video files may also affect your results.

    Table 1: Example Video Format /Codec Combinations and Usable Video Players

    Video Format Video Codec Usable Video Players
    avi mjpeg VLC, Windows Media Player, QuickTime Player
    avi wmv1 VLC, Windows Media Player
    avi msmpeg4v2 VLC, Windows Media Player
    mp4 mpeg4 VLC, QuickTime Player

     

     

  • Below are the listings produced by the GetFormat and GetCodec methods to IDLffVideoWrite, providing both the short string codes and the descriptive strings of the various formats and codecs available through the IDLffVideoWrite class.

    >>
    Table 2: Full listing/description output from IDL 8.1 IDLffVideoWrite::GetFormats
    >> Table 3: Full listing/description output from IDL 8.1 IDLffVideoWrite::GetCodecs (Video)
    >> Table 4: Full listing/description output from IDL 8.1 IDLffVideoWrite::GetCodecs (Audio)

    Table 2: Full listing/description output from IDL 8.1 IDLffVideoWrite::GetFormats
    Video Container Format String Video Container Format Description
    ac3 raw AC-3
    adts ADTS AAC
    aiff Audio IFF
    amr 3GPP AMR file format
    asf ASF format
    ass SSA/ASS format
    asf_stream ASF format
    au SUN AU format
    avi AVI format
    avm2 Flash 9 (AVM2) format
    crc CRC testing format
    daud D-Cinema audio format
    dirac raw Dirac
    dnxhd raw DNxHD (SMPTE VC-3)
    dts raw DTS
    dv DV video format
    eac3 raw E-AC-3
    ffm FFM (FFserver live feed) format
    filmstrip Adobe Filmstrip
    flac raw FLAC
    flv FLV format
    framecrc framecrc testing format
    gif GIF Animation
    gxf GXF format
    h261 raw H.261
    h263 raw H.263
    h264 raw H.264 video format
    image2 image2 sequence
    image2pipe piped image2 sequence
    ipod iPod H.264 MP4 format
    m4v raw MPEG-4 video format
    matroska Matroska file format
    matroska Matroska file format
    mjpeg raw MJPEG video
    mlp raw MLP
    mmf Yamaha SMAF
    mp2 MPEG audio layer 2
    mp3 MPEG audio layer 3
    mp4 MP4 format
    mpeg MPEG-1 System format
    vcd MPEG-1 System format (VCD)
    mpeg1video raw MPEG-1 video
    dvd MPEG-2 PS format (DVD VOB)
    svcd MPEG-2 PS format (VOB)
    mpeg2video raw MPEG-2 video
    vob MPEG-2 PS format (VOB)
    mpegts MPEG-2 transport stream format
    mpjpeg MIME multipart JPEG format
    mxf Material eXchange Format
    mxf_d10 Material eXchange Format, D-10 Mapping
    null raw null video format
    nut NUT format
    ogg Ogg
    alaw PCM A-law format
    mulaw PCM mu-law format
    f64be PCM 64 bit floating-point big-endian format
    f64le PCM 64 bit floating-point little-endian format
    f32be PCM 32 bit floating-point big-endian format
    f32le PCM 32 bit floating-point little-endian format
    s32be PCM signed 32 bit big-endian format
    s32le PCM signed 32 bit little-endian format
    s24be PCM signed 24 bit big-endian format
    s24le PCM signed 24 bit little-endian format
    s16be PCM signed 16 bit big-endian format
    s16le PCM signed 16 bit little-endian format
    s8 PCM signed 8 bit format
    u32be PCM unsigned 32 bit big-endian format
    u32le PCM unsigned 32 bit little-endian format
    u24be PCM unsigned 24 bit big-endian format
    u24le PCM unsigned 24 bit little-endian format
    u16be PCM unsigned 16 bit big-endian format
    u16le PCM unsigned 16 bit little-endian format
    u8 PCM unsigned 8 bit format
    psp PSP MP4 format
    rawvideo raw video format
    rm RealMedia format
    RoQ raw id RoQ format
    rtp RTP output format
    rtsp RTSP output format
    sox SoX native format
    spdif IEC958 - S/PDIF (IEC-61937)
    swf Flash format
    3g2 3GP2 format
    3gp 3GP format
    truehd raw TrueHD
    rcv VC-1 test bitstream
    voc Creative Voice file format
    wav WAV format
    webm WebM file format
    yuv4mpegpipe YUV4MPEG pipe format


    [ back to top ^ ]

    Table 3: Full listing/description output from IDL 8.1 IDLffVideoWrite::GetCodecs (Video)
    Video Codec Strings Video Codec Descriptions
    asv1 ASUS V1
    asv2 ASUS V2
    bmp BMP image
    dnxhd VC3/DNxHD
    dvvideo DV (Digital Video)
    ffv1 FFmpeg video codec #1
    ffvhuff Huffyuv FFmpeg variant
    flashsv Flash Screen Video
    flv Flash Video (FLV) / Sorenson Spark / Sorenson H.263
    gif GIF (Graphics Interchange Format)
    h261 H.261
    h263 H.263 / H.263-1996
    h263p H.263+ / H.263-1998 / H.263 version 2
    huffyuv Huffyuv / HuffYUV
    jpegls JPEG-LS
    ljpeg Lossless JPEG
    mjpeg MJPEG (Motion JPEG)
    mpeg1video MPEG-1 video
    mpeg4 MPEG-4 part 2
    msmpeg4v1 MPEG-4 part 2 Microsoft variant version 1
    msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
    msmpeg4 MPEG-4 part 2 Microsoft variant version 3
    pam PAM (Portable AnyMap) image
    pbm PBM (Portable BitMap) image
    pcx PC Paintbrush PCX image
    pgm PGM (Portable GrayMap) image
    pgmyuv PGMYUV (Portable GrayMap YUV) image
    png PNG image
    ppm PPM (Portable PixelMap) image
    qtrle QuickTime Animation (RLE) video
    rawvideo raw video
    roqvideo id RoQ video
    rv10 RealVideo 1.0
    rv20 RealVideo 2.0
    sgi SGI image
    snow Snow
    svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
    targa Truevision Targa image
    tiff TIFF image
    v210 Uncompressed 4:2:2 10-bit
    wmv1 Windows Media Video 7
    wmv2 Windows Media Video 8
    zlib LCL (LossLess Codec Library) ZLIB
    zmbv Zip Motion Blocks Video
    dvbsub DVB subtitles
    dvdsub DVD subtitles
    xsub DivX subtitles (XSUB)


    [ back to top ^ ]

    Table 4: Full listing/description output from IDL 8.1 IDLffVideoWrite::GetCodecs (Audio)
    Audio Codec Strings Audio Codec Descriptions
    aac Advanced Audio Coding
    ac3 ATSC A/52A (AC-3)
    alac ALAC (Apple Lossless Audio Codec)
    flac FLAC (Free Lossless Audio Codec)
    mp2 MP2 (MPEG audio layer 2)
    nellymoser Nellymoser Asao
    sonic Sonic
    sonicls Sonic lossless
    wmav1 Windows Media Audio 1
    wmav2 Windows Media Audio 2
    pcm_alaw PCM A-law
    pcm_f32be PCM 32-bit floating point big-endian
    pcm_f32le PCM 32-bit floating point little-endian
    pcm_f64be PCM 64-bit floating point big-endian
    pcm_f64le PCM 64-bit floating point little-endian
    pcm_mulaw PCM mu-law
    pcm_s8 PCM signed 8-bit
    pcm_s16be PCM signed 16-bit big-endian
    pcm_s16le PCM signed 16-bit little-endian
    pcm_s24be PCM signed 24-bit big-endian
    pcm_s24daud PCM D-Cinema audio signed 24-bit
    pcm_s24le PCM signed 24-bit little-endian
    pcm_s32be PCM signed 32-bit big-endian
    pcm_s32le PCM signed 32-bit little-endian
    pcm_u8 PCM unsigned 8-bit
    pcm_u16be PCM unsigned 16-bit big-endian
    pcm_u16le PCM unsigned 16-bit little-endian
    pcm_u24be PCM unsigned 24-bit big-endian
    pcm_u24le PCM unsigned 24-bit little-endian
    pcm_u32be PCM unsigned 32-bit big-endian
    pcm_u32le PCM unsigned 32-bit little-endian
    pcm_zork PCM Zork
    roq_dpcm id RoQ DPCM
    adpcm_adx SEGA CRI ADX ADPCM
    g726 G.726 ADPCM
    adpcm_ima_qt ADPCM IMA QuickTime
    adpcm_ima_wav ADPCM IMA WAV
    adpcm_ms ADPCM Microsoft
    adpcm_swf ADPCM Shockwave Flash
    adpcm_yamaha ADPCM Yamaha
    dvbsub DVB subtitles
    dvdsub DVD subtitles
    xsub DivX subtitles (XSUB)

Other useful references:

[ back to top ^ ]
[