VideoCodec SDK samples [ERROR][08:24:26] No AVFormatContext provided

Hi all,

I am trying to run the samples of Video SDK(9.0.20). Here is the example I am trying.

Basically I did: make in the folder and then I commanded this on the terminal:

./AppDec -i input.mp4 -o output.mp4

But it gives me error:

GPU in use: GeForce RTX 2060
Decode with demuxing.
[ERROR][08:24:26] General error -1094995529 at line 174 in file …/…/NvCodec/…/Utils/FFmpegDemuxer.h
[ERROR][08:24:26] No AVFormatContext provided.
Segmentation fault (core dumped)

My system environment:

  • Operating system: Ubuntu 18.04

  • CUDA 10.2 installed

  • FFMPEG also installed. output of ffmpeg --version is:

ffmpeg version N-98364-g3223f6b Copyright © 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/home/yongatek02/ffmpeg_build --pkg-config-flags=–static --extra-cflags=-I/home/yongatek02/ffmpeg_build/include --extra-ldflags=-L/home/yongatek02/ffmpeg_build/lib --extra-libs=’-lpthread -lm’ --bindir=/home/yongatek02/bin --enable-gpl --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 93.102 / 58. 93.102
libavformat 58. 47.100 / 58. 47.100
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Unrecognized option ‘-version’.
Error splitting the argument list: Option not found

I modified Utils/FFmpegDemuxer.h, added av_register_all() before line 174, and then I solved it
Hope it helps you