Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMPEG avformat_open_input returned error

Tags:

ffmpeg

Sorry I have to ask this question, but I couldn't find a reference to the return codes of avformat_open_input, and I couldn't find anyone asking/answering about mine.

After this call to the function

err = avformat_open_input(&pFormatCtx, is->filename, NULL, NULL);

I get err = -13. What does it mean, and if anybody answers, please also share how you know which code corresponds to which error.

UPDATE: OK, I finally figured out how to turn the code into a message, and the message is "Permission denied". Does anyone have an idea where the problem with this might be?

like image 618
ProgrammingGivesMeHeadaches Avatar asked Feb 04 '14 10:02

ProgrammingGivesMeHeadaches


1 Answers

  1. See libavutil/error.h for the error code definitions, but they mostly match negative errno values. You can use av_strerror function to get the meaningful message.

  2. "Permission denied" most likely means the file you point to in is->filename could not be opened due to permissions. Run strace on your app if you think this isn't the case.

like image 155
George Y. Avatar answered Oct 24 '22 02:10

George Y.