※ 引述《yshihyu (yshihyu)》之銘言:
: 請問ffmpeg 可以取出mpeg2 影片中 i-frame b-frame p-frame?
: 因為我是要做研究用所以必須取出i-frame b-frame p-frame
: 我google ffmpeg 找好像都沒提到可以取出 i-frame b-frame p-frame 參數方法
: 不知道有誰知道如何取出?
: 還是只能針對source code 下手?
: 謝謝
: → abzxcx:好難寫 = =不知道 openCV有沒有現成的 03/03 16:44
: → tocute:opencv 應該是沒有編碼的東西吧 03/03 17:31
: ※ 編輯: yshihyu 來自: 163.13.128.240 (03/04 16:18)
這個問題感覺滿有趣的,這兩天我試著用google搜尋找到libmpeg2
在mpeg2_internal.h找到
/* picture coding type */
#define I_TYPE 1
#define P_TYPE 2
#define B_TYPE 3
#define D_TYPE 4
struct mpeg2_decoder_s {
...
/* what type of picture this is (I, P, B, D) */
int coding_type; 儲存哪種格式
...
/* pointer to the zigzag scan we're supposed to be using */
const uint8_t * scan; 圖可能是儲存在這裡
}
再用coding_type去搜尋,在slice.c找到
int get_macroblock_modes (mpeg2_decoder_t * const decoder)
{
switch (decoder->coding_type) { 目前frame的格式
case I_TYPE:
case P_TYPE:
case B_TYPE:
case D_TYPE:
}
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.36.131.56