DGDecNV (linux)

DG tools for linux

Moderator: Sherman

Post Reply
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

As I mentioned, to create the pure indexer CLI executable suitable for porting to linux, we use the same plan as for DGDemux. I have been a very busy squirrel (hear me Britney?) and have got a lot done today. Here is the progress:

1. Strip down to bare minimum (lots of Win32 GUI and other stuff inherited from the full DGIndexNV). COMPLETED
2. Get rid of windows message loop and do everything in WinMain. COMPLETED
3. Ditch final win32 stuff (MessageBox etc.).
4. Convert to pure console exe: WinMain() -> main().
5. Now it can be built with g++ on linux, converting system calls etc. as needed.

I tested the Windows version on an M2TS file and everything is fine.

But before continuing, I'll start a backup and pop a brewski.
User avatar
Natasha
Posts: 150
Joined: Wed Nov 20, 2019 11:11 am

DGDecNV (linux)

Post by Natasha »

Just goes to show that anyone can code.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Let's see some of your code, Nattie.

New status:

1. Strip down to bare minimum (lots of Win32 GUI and other stuff inherited from the full DGIndexNV). COMPLETED
2. Get rid of windows message loop and do everything in WinMain. COMPLETED
3. Ditch final win32 stuff (MessageBox etc.). COMPLETED
4. Convert to pure console exe: WinMain() -> main(). COMPLETED
5. Now it can be built with g++ on linux, converting system calls etc. as needed.

Ready to move to linux. And I'm not even feeling good today. Off to the nest for the night.
User avatar
Natasha
Posts: 150
Joined: Wed Nov 20, 2019 11:11 am

DGDecNV (linux)

Post by Natasha »

Rocky wrote:
Fri Jun 04, 2021 8:56 pm
Let's see some of your code, Nattie.
I don't do Windows.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

The pure windows exe indexer actually works fine under wine. Nevertheless I prefer to have a native linux version so I have started to do that.
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

DGDecNV (linux)

Post by DJATOM »

Having nice weekend in my gf's parents home, so I was out of internet recently. Going to return home tomorrow, will be here for any testing and feedback :)
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Thanks, DJ. We were at a swim meet all day today so nothing got done. Definitely will take up your testing offer when ready.

Ooh, meeting the gf's parents. Sounds serious. :scratch:
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Just successfully created my first AVC DGI index file using the native linux indexer. Still a lot of testing to go but things are looking good.
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

DGDecNV (linux)

Post by DJATOM »

That's nice :)
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Yeah!

MPG indexing now working too. HEVC in progress.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

All video formats now working. All containers now working. Gonna run it on a big UHD rip just to make sure all the seeks and tells and long long handling are working. Then gonna release an alpha.

In general things went much smoother than expected.
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

DGDecNV (linux)

Post by DJATOM »

My body is ready.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Ran into first snafu. I'm getting a memory overwrite in DGSource() when serving a 56GB stream. The DGI is fine. It's a bit unpredictable so I'll have to figure out how to set a data change breakpoint in VS Code. Somehow a file pointer is getting clobbered along with data around it.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

OK, got that one sorted out. I'd like to add the disk open CLI option and then things will be ready for your tasting.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Added -disk option to show the MPLS data, and -mpls to open an MPLS.

Next step, prepare a taste release.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

All right, boys and girls! See if you can make any sense out of this first linux release:

http://rationalqm.us/dgdecnv/binaries/dgdecnv_linux.zip

The nVidia proprietary driver should be installed.

Your feedback will be appreciated.
User avatar
DG
Posts: 88
Joined: Thu Dec 31, 2020 9:55 am

DGDecNV (linux)

Post by DG »

Outstanding work, Rocky! Thank you.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Thank you, DG, much appreciated. Now I have to run off and catch up on some pending Windows tools work. Sciuridae never rest. ;)
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

DGDecNV (linux)

Post by DJATOM »

Great! Unfortunately (testing-wise, of course) I'm at my gf's parents place again, so will check it when I return to PC. That expected to happen at coming Monday.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

I hear ya. Looking forward to your always germane and acute feedback.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

I got relative paths working (Full_Path_In_Files = 0). Holding for next release.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Put the cuda and nvcuvid libraries in /usr/lib or anywhere else in your search path. I am looking at -rpath.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Darn, I need to give you the MP4 library too.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

DGDecNV (linux)

Post by Rocky »

Added libmp4v2.so. Please re-download and put it somewhere in your search path.

You also need a zlib library but you should have that already.
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

DGDecNV (linux)

Post by DJATOM »

Just tested. Few things to report for now:
1) dgindexnv tries to load ../mp4v2/libmp4v2.so (I did copy it into such relative path and it worked)
2) libdgdecodenv.so tries to load /home/don/Projects/mp4v2/libmp4v2.so. I made such path in my system and placed that file. Now core.dgdecodenv.DGSource is reachable by vapoursynth and I have tested it.

Video looks fine so far, it just not cropped (I tried with m2ts file, got 1920x1088).
Speed-wise, I've got near 460 fps in benchmark, which is on par with Windows.
Will try to encode later, I've got some job to do.
Post Reply