DG Tools on Linux

Support forum for DGDecNV
DAE avatar
Guest

DG Tools on Linux

Post by Guest »

You're looking a little skinny in that photo
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Thank you! You are very kind.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Life smacked me hard last night. Still reeling. I did watch some GTC speeches. Quite amazing progress. Oh, and I downloaded the Video SDK. Swept up the litter and now off to the nest.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Latest Video SDK and CUDA 11:

don@debian:~/VideoCodecSDK/Samples/build$ cmake -DCMAKE_BUILD_TYPE=Release ..
CUDA_CUDA_LIBRARY: /usr/lib/x86_64-linux-gnu/libcuda.so
CUDA_TOOLKIT_ROOT_DIR: /usr/local/cuda
-- Configuring done
-- Generating done
-- Build files have been written to: /home/don/VideoCodecSDK/Samples/build
don@debian:~/VideoCodecSDK/Samples/build$

don@debian:~/VideoCodecSDK/Samples/build$ make AppDec
Scanning dependencies of target AppDec
[ 33%] Building CXX object AppDecode/AppDec/CMakeFiles/AppDec.dir/AppDec.cpp.o
[ 66%] Linking CXX executable AppDec
[100%] Built target AppDec
don@debian:~/VideoCodecSDK/Samples/build$ cd AppDecode/AppDec

don@debian:~/VideoCodecSDK/Samples/build/AppDecode/AppDec$ ./AppDec -i plush1_720p_10s.m2v
GPU in use: NVIDIA GeForce RTX 2080 Ti
Decode with demuxing.
[INFO ][11:27:15] Media format: raw MPEG video (mpegvideo)
Session Initialization Time: 6 ms
[INFO ][11:27:15] Video Input Information
  Codec : MPEG-2
  Frame rate : 30000/1001 = 29.97 fps
  Sequence : Progressive
  Coded size : [1280, 720]
  Display area : [0, 0, 1280, 720]
  Chroma : YUV 420
  Bit depth : 8
Video Decoding Params:
  Num Surfaces : 4
  Crop : [0, 0, 0, 0]
  Resize : 1280x720
  Deinterlace : Weave

Total frame decoded: 329
Saved in file out.native in NV12 format
Session Deinitialization Time: 10 ms
don@debian:~/VideoCodecSDK/Samples/build/AppDecode/AppDec$

:belly-laugh:

Again, ran into lots of dependencies and non-obvious environment variable settings. Definitely not for your average moose!

Next, I will try to bring up DG's stripped down decoder that served as the basis for all the CUVID work. That will prove that everything is in place to bring up DGSource(). We'll also need to install Avisynth+ and Vapoursynth. But first, it's backup time. 8-)

It's encouraging that things have gone so well. :wow:

[posted using Chrome on the linux machine]
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post by DJATOM »

Nice.
Installing VS is easy thing actually, as well as Avisynth+ on Linux. VS uses generic "./configure && make" solution while Avs+ is a CMake project.
DAE avatar
Guest

DG Tools on Linux

Post by Guest »

Would it be possible to join up all the great hints, like installing AVS+ and VPY, for future reference
Not all of us are advanced squirrels
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

gonca wrote:
Fri May 21, 2021 3:37 pm
Would it be possible to join up all the great hints, like installing AVS+ and VPY, for future reference
Not all of us are advanced squirrels
Assuming that was directed at DJ. If so, I second that motion. :!:

If it was directed at moi, I'll post instructions after I figure it out.
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post by DJATOM »

Vapoursynth

Code: Select all

git clone https://github.com/vapoursynth/vapoursynth.git
cd ./vapoursynth
git clone https://github.com/sekrit-twc/zimg.git --branch v3.0
./autogen.sh
(if you want to build ffms2 plugin, make sure ffmpeg stuff is installed before next step)
pip3 install -r python-requirements.txt
./configure --enable-pic
make -j$(nproc)
sudo make install
Avisynth

Code: Select all

git clone https://github.com/AviSynth/AviSynthPlus.git
cd ./AviSynthPlus
mkdir build && cd build
cmake ..  
make -j$(nproc)
sudo make install
DAE avatar
Guest

DG Tools on Linux

Post by Guest »

Actually meant for Rocky, but thank you DJATOM

Boy, would the Linux sub-forum be handy about now ;)
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Yes, indeed, thank you DJ!

Sherman is missing in action. I'll send a PM to Mr Peabody. He keeps Sherman on a pretty short leash. ;)
DAE avatar
Guest

DG Tools on Linux

Post by Guest »

pretty short leash
cute joke
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

You never miss a trick.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Successfully built and ran the minimal decoder with NALU feeding:

don@debian:~/cuVideoDecode$ g++ -static-libstdc++ -static-libgcc -O3 -o decode cuh264dec.cpp nalu.cpp /usr/lib/x86_64-linux-gnu/libnvcuvid.so /usr/lib/x86_64-linux-gnu/libcuda.so
don@debian:~/cuVideoDecode$ ./decode Alba.264 Alba.yuv
GPU in use: NVIDIA GeForce RTX 2080 Ti
Processed 580 frames
don@debian:~/cuVideoDecode$ ls -l Alba.yuv
-rw-r--r-- 1 don don 1817395200 May 22 12:10 Alba.yuv
don@debian:~/cuVideoDecode$

:belly-laugh:

Next step: Install and test Avisynth+ and Vapoursynth.
Next-next step: Port DGSource().
Next-next-next step: Create linux native CLI indexer (to avoid DGIndexNV under wine).
Next-next-next-next step: Port the other filters in DGDecodeNV.dll.
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

DG Tools on Linux

Post by Sherman »

A Linux subforum is currently being created. Material in this thread will be moved and split by tool. Closing this thread.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Sherman and I have split the original linux thread into two in the new Linux subforum. The split may not be perfect but it should be good enough moving forward. Please use the appropriate thread based on the respective tool.

Sherman is on a probation period for moderator status. He will be supervised during this period and if all is well he will be promoted to moderator.
Locked