Programming & Tools/Linux
[Linux] FFMPEG "Codec not found"
다크쌍피
2017. 5. 2. 14:44
encode_video.c
/* find the mpeg1video encoder */
codec = avcodec_find_encoder_by_name(codec_name);
if (!codec) {
fprintf(stderr, "Codec not found\n");
exit(1);
}
FFMPEG에서 avcodec_find_encoder_by_name("libx264) 호출 시 Codec을 못 찾을 경우
pkgconfig일 저장 위치인 PKG_CONFIG_PATH 가 환경 변수에 지정 되어 있는지 확인한다.
ex.> .bashrc 내에 ffmpeg이 빌드된 위치 추가
export PKG_CONFIG_PATH=/home/dark2pee/ffmpeg/build/lib/pkgconfig