DOBON.NETプログラミング道掲示板

No35060 の記事


■35060 / )  Re[1]: ビデオ圧縮のコーデック
□投稿者/ 魔界の仮面弁士 大御所(1426回)-(2022/06/04(Sat) 19:31:36)
  • アイコン
    No35058に返信(ガルモンクさんの記事)
    > 「ビデオ圧縮」のプロパティが「{34363248-0000-0010-8000-00AA00389B71}」のような文字列でした。
    GUID 先頭の 0x34363248 が、そのまま 'H264' の FourCC に一致していますね。
     'H' = 0x48
     '2' = 0x32
     '6' = 0x36
     '4' = 0x34
    https://ja.wikipedia.org/wiki/FourCC
    
    
    > たぶん、これがH.264とかのコーデックを示すコードだと思うのですが、
    定数としては MFVideoFormat_H264 となっていますね。
    https://docs.microsoft.com/ja-jp/windows/win32/medfound/video-subtype-guids
    
    以下、 Windows SDK の mfapi.h ファイルから引用:
    
    
    // needed for the GUID definition macros below
    #ifndef FCC
    #define FCC(ch4) ((((DWORD)(ch4) & 0xFF) << 24) |     \
                      (((DWORD)(ch4) & 0xFF00) << 8) |    \
                      (((DWORD)(ch4) & 0xFF0000) >> 8) |  \
                      (((DWORD)(ch4) & 0xFF000000) >> 24))
    #endif
    
    //
    // this macro creates a media type GUID from a FourCC, D3DFMT, or WAVE_FORMAT
    //
    #ifndef DEFINE_MEDIATYPE_GUID
    #define DEFINE_MEDIATYPE_GUID(name, format) \
        DEFINE_GUID(name,                       \
        format, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
    #endif
    
    
    DEFINE_MEDIATYPE_GUID( MFVideoFormat_H264,      FCC('H264') );  // assume MFVideoFormat_H264 is frame aligned. that is, each input sample has one complete compressed frame (one frame picture, two field pictures or a single unpaired field picture)
    
    
    > このコード列がどんなコーデックなのを知る手段はないでしょうか。
    https://gix.github.io/media-types/

違反を報告
返信 削除キー/


Mode/  Pass/


- Child Tree -