1.通过ffplay 设置loglevel
./ffplay -loglevel 48 /home/XXX/Videos/1.ts
/**
* Standard information.
*/
#define AV_LOG_INFO 32
/**
* Detailed information.
*/
#define AV_LOG_VERBOSE 40
/**
* Stuff which is only useful for libav* developers.
*/
#define AV_LOG_DEBUG 48
3. error string 的打印
char errbuf[50];
ret = avio_open2(&input, input_url, AVIO_FLAG_READ, NULL, NULL);
if (ret) {
av_strerror(ret, errbuf, sizeof(errbuf));
fprintf(stderr, "Unable to open %s: %s\n", input_url, errbuf);
return 1;
}
4. 源码编译
make V=1
显示详细的编译信息如
make V=1
gcc -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DZLIB_CONST -std=c99 -fomit-frame-pointer -pthread -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -MMD -MF ffplay.d -MT ffplay.o -c -o ffplay.o ffplay.c
gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -Wl,-z,noexecstack -Wl,--warn-common -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -o ffplay_g cmdutils.o ffplay.o -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -lXv -lX11 -lXext -L/usr/local/lib -lxcb -L/usr/local/lib -lxcb-shm -lxcb -L/usr/local/lib -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -L/usr/local/lib -lxcb-shape -lxcb -lX11 -ljack -lasound -lSDL -lm -lz -pthread -lrt -lSDL
cp -p ffplay_g ffplay
strip ffplay