avformat_open_input path on android
01:34 10 Nov 2025

I'm trying to open a video in my SDL2 application using FFmpeg. But when I use the function avformat_open_input(...); it returns -2

// The video I want to play is in the following folder: assets/Videos/video.mp4, Therefore, the route is:
const char Ruta = "Videos/video.mp4"

int ret = avformat_open_input(&pFormatCtx,Ruta,NULL,NULL);
char errbuf[AV_ERROR_MAX_STRING_SIZE];

if(av_strerror(ret, errbuf, sizeof(errbuf)) < 0) {
  SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,"*** ERROR ***","Error converting FFmpeg error code",nullptr);
}
else{
  SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,"*** ERROR ***",(const char *)errbuf,nullptr);
}

My question is, what path should I use so that it can read my video file?

android sdl-2