Hi,
I can't seem to extract the streams from a file programatically. I'm using
windows and have compiled FFMpeg from source. This is my configure line:
./configure --enable-cross-compile
--cross-prefix=i586-mingw32msvc- --target-os=mingw32msvc
--enable-memalign-hack --enable-debug --disable-stripping
--extra-cflags=-I/usr/local/mingw32/include/
--extra-ldflags=-L/usr/local/mingw32/lib --prefix=/usr/local/mingw32
--disable-static --enable-shared && make && make install
Everything compiles successfully and gets installed to /usr/local/mingw32/
This is my C code:
int main(char argc, char** argv)
{
AVFormatContext* context;
int ret;
avcodec_init();
avcodec_register_all();
av_register_all();
context = av_alloc_format_context();
ret = av_open_input_file(context, argv[1], NULL, 0, NULL);
if(ret < 0)
printf("couldn't open file\n");
printf("%d streams\n", context->nb_streams);
}
I've tried this with various files (audio & video), but it always displays
that there are 0 streams. What could be the problem?
Karthik
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user