Multimedia/FFmpeg (2) 썸네일형 리스트형 FFMPEG : get duration ffmpeg에서 미디어의 재생 시간을 읽는 방법을 소개한다. 거두절미하고 기본 코드는 아래와 같다. AVFormatContext* pFC; int ret; pFC = avformat_alloc_context(); ret = avformat_open_input(&pFC, filename, NULL, NULL); if (ret duration); 자 중요한 건.. 이제부터다. 실제로 open 함수 이후에 정보를 읽을 수 있을 것으로 생각되지만. 몇몇 contents에서는 duration 값을 읽었을 때 0으로 나오는 경우가 있다. 이럴 때는 avformat_find_stream_info() 함수를 호출해야한다. 다시 말하면 .. FFMPEG 이용한 H.264 Decoding FFMPEG 이용해 decoding 하기. FFMPEG 이용해 사용자가 임의로 만든 read 함수를 통해 h.264 file을 decoding하는 방법을 정리합니다. 1. 우선 초기화가 필요하겠지요. 코드는 아래와 같음. // Init av_register_all(); // Init to play streaming contents, if you want to play or decode media from internet, must be called this function. // avformat_network_init(); // Create internal Buffer for FFmpeg: const int iBufSize = 32 * 1024; unsigned char* pBuffer = new uns.. 이전 1 다음