ffmpeg avformat_open_input always returns "Protocol not found" rv=(-1330794744)
I was having the same problem. The correct initialization is
av_register_all();
I hope that his can help someone. Since I had the same problem where my code worked on Android and Linux but not on macOS and since av_register_all
is now deprecated (for FFMpeg version > 4.0) the answer from discomurray didn't solve the problem for me.
The reason why it didn't work in my case was that I already had libavformat installed on my system which was under /usr/local/lib/
and unfortunately it was not configured correctly for my case (or mismatched the version compared to one I compiled myself).
What I did is, I added the path to my build to DYLD_LIBRARY_PATH
(macOS) before executing the command:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/xxx/projects/FFmpeg/libavformat
On linux you can do the same with LD_LIBRARY_PATH
try to change file path "/home/user/video.mp4" -> "file:/home/usr/video.mp4"
and may you should escape ':' char unless protocol
check this link ffmpeg-protocols#file