I follow the exact steps in issue #23 when installing this wonderful project, but got the following error when running the sample code:
Decoding on GPU 0
Can't open data/test.mp4: Invalid data found when processing input
Traceback (most recent call last):
File "test_video.py", line 56, in <module>
nvDec = nvc.PyNvDecoder(path + video_name, 0)
ValueError: FFmpegDemuxer: no AVFormatContext provided.`
I searched the previous posed issues talking about this error, followed the steps by ensuring the version of ffmpeg is the same during compliation and the runtime. However this error still occurs....
cmake .. -DFFMPEG_DIR:PATH="$PATH_TO_FFMPEG" -DVIDEO_CODEC_SDK_DIR:PATH="$PATH_TO_SDK"
DGENERATE_PYTHON_BINDINGS:BOOL="1" -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX"
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Check for working CUDA compiler: /usr/local/cuda-10.2/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda-10.2/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
**-- Searching for FFmpeg libs in /opt/FFmpeg/build_x64_release_shared/lib**
**-- Searching for FFmpeg headers in /opt/FFmpeg/build_x64_release_shared/include**
**-- Searching for Video Codec SDK headers in /opt/Video_Codec_SDK_9.1.23/include folder**
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found suitable version "3.6.9", minimum required is "3.5")
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so
-- pybind11 v2.3.dev0
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/luhang/VideoProcessingFramework-master/build
See that 'Searching for FFmpeg libs in /opt/FFmpeg/build_x64_release_shared/lib' is the place of FFmpeg for complilation. The make and make install are both successful. How could I resolve this issue?
$ ffmpeg -version
ffmpeg version 4.3.git Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/home/luhang/FFmpeg-master/build_x64_release_shared --disable-static --disable-stripping --disable-doc --enable-shared
libavutil 56. 58.100 / 56. 58.100
libavcodec 58.105.100 / 58.105.100
libavformat 58. 54.100 / 58. 54.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Running sampledecode.py also shows:
~/VideoProcessingFramework-master/install/bin$ python SampleDecode.py 0 ./test.mp4 out
This sample decodes input video to raw NV12 file on given GPU.
Usage: SampleDecode.py $gpu_id $input_file $output_file.
Decoding on GPU 0
Can't open ./zidane_LR.mp4: Invalid data found when processing input
Traceback (most recent call last):
File "SampleDecode.py", line 55, in <module>
decode(gpuID, encFilePath, decFilePath)
File "SampleDecode.py", line 22, in decode
nvDec = nvc.PyNvDecoder(encFilePath, gpuID)
ValueError: FFmpegDemuxer: no AVFormatContext provided.
I follow the exact steps in issue #23 when installing this wonderful project, but got the following error when running the sample code:
I searched the previous posed issues talking about this error, followed the steps by ensuring the version of ffmpeg is the same during compliation and the runtime. However this error still occurs....
See that 'Searching for FFmpeg libs in /opt/FFmpeg/build_x64_release_shared/lib' is the place of FFmpeg for complilation. The make and make install are both successful. How could I resolve this issue?
Running sampledecode.py also shows: