Opening a media file from the local file system.
AVFormatContext *formatContext; // Open the file if(avformat_open_file(&formatContext, "path/to/file.ogg", NULL, NULL) < 0){ // Error opening file } // Do something with the file // Free resources avformat_close_input(&formatContext);