Page 3 of 8

DG Tools on Linux

Posted: Sun May 09, 2021 1:02 pm
by DJATOM
Looks like it's working.
djatom@atomch-server:~$ ./dgdemux -i /home/storage2/\[BDMV\]\[アニメ\]\[180124\]\ いぬやしき\ \[BD\ BOX\ 1\]/INUYASHIKI_1/BDMV/PLAYLIST/00001.mpls -o ./testdemux/inu
DGDemux 1.0.0.50 by Donald A. Graft
Copyright (C) 2019-2021 Donald A. Graft, All Rights Reserved [Made in USA]
00001.m2ts
00002.m2ts
00003.m2ts
Done!
Will try on Arch soon.

One small thing: "./dgdemux -i" leads to "Segmentation fault" error. Probably it's good to add extra check if option is not empty or so.

DG Tools on Linux

Posted: Sun May 09, 2021 1:15 pm
by DJATOM
djatom@DJATOM-PC ~]$ ./dgdemux -i '/run/media/djatom/T8TB1/Seeding/[BDMV][201202][Adachi to Shimamura][Vol.1]/ADACHI_AND_SHIMAMURA_1/BDMV/PLAYLIST/00003.mpls' DGDemux 1.0.0.50 by Donald A. Graft
Copyright (C) 2019-2021 Donald A. Graft, All Rights Reserved [Made in USA]

Files:
00005.m2ts

Streams:
1011: Video [AVC 23.976 1080p 16:9]
1100: PCM 48K 16bit 2/0 [jpn]
Chapters [8]
[djatom@DJATOM-PC ~]$ ./dgdemux -i '/run/media/djatom/T8TB1/Seeding/[BDMV][201202][Adachi to Shimamura][Vol.1]/ADACHI_AND_SHIMAMURA_1/BDMV/PLAYLIST/00003.mpls' -o testdemux/ada1
DGDemux 1.0.0.50 by Donald A. Graft
Copyright (C) 2019-2021 Donald A. Graft, All Rights Reserved [Made in USA]
00005.m2ts
Done!
So it work on Arch as well.

DG Tools on Linux

Posted: Sun May 09, 2021 1:25 pm
by thechaoscoder
Works also in WSL (ubuntu) over SMB here.
You can mount network drives with

Code: Select all

sudo mount -t drvfs '\\NAS\my_bd\' /mnt/bb

Code: Select all

./dgdemux -i /mnt/bb/BDMV/PLAYLIST/00001.mpls
DGDemux 1.0.0.50 by Donald A. Graft
Copyright (C) 2019-2021 Donald A. Graft, All Rights Reserved [Made in USA]

Files:
00001.m2ts

Streams:
1011: Video [AVC 23.976 1080p 16:9]
1100: PCM 48K 16bit 2/0 [und]
Chapters [1]

EDIT:
No progress indicator?
Is it possible to add a --help parameter that shows the available parameters?

DG Tools on Linux

Posted: Sun May 09, 2021 1:47 pm
by Rocky
Thank you DJATOM for your test results.
One small thing: "./dgdemux -i" leads to "Segmentation fault" error. Probably it's good to add extra check if option is not empty or so.
Yeah, I'll tighten up the error checking.

DG Tools on Linux

Posted: Sun May 09, 2021 1:49 pm
by Rocky
Thank you thechaoscoder for your testing.
thechaoscoder wrote:
Sun May 09, 2021 1:25 pm
No progress indicator?
Is it possible to add a --help parameter that shows the available parameters?
How do you want the progress to be indicated?
--help would be useful.

DG Tools on Linux

Posted: Sun May 09, 2021 2:01 pm
by DJATOM
For example, it might be done like that

Code: Select all

while(percents != 100) {
    fprintf(stderr, "%d% done\r", percents);
    // also you can sleep this loop for 250-500 ms to don't eat up resources too much
}

DG Tools on Linux

Posted: Sun May 09, 2021 2:46 pm
by Rocky
Sounds good, thank you.

DG Tools on Linux

Posted: Mon May 10, 2021 9:01 am
by Rocky
Removed dgdemux.gz as I want to replace it with the completed version. Still need:

* Preallocation
* Episode demuxing [COMPLETED]
* Better command line syntax checking [COMPLETED]
* --help [COMPLETED]
* Progress indication
* Appropriate version number [COMPLETED]

DG Tools on Linux

Posted: Tue May 11, 2021 12:58 pm
by Rocky
@DJATOM

DJ, do you think preallocation is a big deal? Should I try to find a portable way to do it for linux?

DG Tools on Linux

Posted: Tue May 11, 2021 2:14 pm
by DJATOM
Rocky wrote:
Tue May 11, 2021 12:58 pm
@DJATOM

DJ, do you think preallocation is a big deal? Should I try to find a portable way to do it for linux?
I think it's not a big deal. And using falloc on FAT32 or ext3 might block application entirely for a long time, not sure if it's really beneficial at all. Fragmentation is not really an issue nowadays, modern OSes are smart enough to handle that when PC idling.

DG Tools on Linux

Posted: Tue May 11, 2021 2:16 pm
by Rocky
OK, thank you, I will nuke it.

DG Tools on Linux

Posted: Tue May 11, 2021 4:20 pm
by Guest
If I may,
with SSD prices dropping and capacity increasing (normally) fragmentation really isn't much of an issue

DG Tools on Linux

Posted: Tue May 11, 2021 7:35 pm
by Rocky
That settles it then. gonca has spoken!

DG Tools on Linux

Posted: Wed May 12, 2021 10:00 am
by Rocky
Here is a release candidate for DGDemux linux version. Your testing will be appreciated.

* Implemented episode demuxing -ep.
* Changed -nopre option to -pre, i.e, inverted its sense. -pre will
return a 'currently not implemented' error for now.
* Implemented -h (help) option.
* Implemented -v (version) option.
* Better error checking on the command line.

Progress indication is not yet implemented.

http://rationalqm.us/misc/dgdemux.gz

DG Tools on Linux

Posted: Wed May 12, 2021 10:09 am
by DJATOM
Tested -ep on my end, it works.

DG Tools on Linux

Posted: Wed May 12, 2021 10:32 am
by Rocky
Thank you, DJ!

I'm going to try bringing up VS Code today.

Got the stupid taxes done. Robber barons! :x

DG Tools on Linux

Posted: Wed May 12, 2021 11:22 am
by thechaoscoder
From help text (-h)
-l path_to_file: ... "You can also use it to discard the output when using DGDemux.exe directly:"
I think you missed one ".exe" :scratch:

DG Tools on Linux

Posted: Wed May 12, 2021 11:46 am
by Rocky
:lol: :facepalm: :salute:

DG Tools on Linux

Posted: Wed May 12, 2021 12:56 pm
by DJATOM
I just made a simple build script that makes .deb package. I think it's not bad to provide it, people with less Linux knowledge can install it in one click (or command). So that's a convenience for them.

Code: Select all

#!/bin/sh

rm -rf debian

mkdir -p debian
mkdir -p debian/DEBIAN
mkdir -p debian/usr/local/bin

version=$(./bin/dgdemux -v | grep -Eo 'DGDemux ([0-9\.]+)' | grep -Eo '([0-9\.]+)')

echo """Package: dgdemux
Version: ${version}
Section: utils 
Priority: optional
Architecture: amd64
Essential: no
Depends: 
Pre-Depends: 
Recommends: 
Suggests: 
Installed-Size: $(($(wc -c < bin/dgdemux)/1024))
Homepage: http://rationalqm.us/dgdemux/dgdemux.html
Maintainer: Donald A. Graft [donald.graft@cantab.net]
Conflicts: 
Replaces: 
Provides: dgdemux
Description: DGDemux is a standalone demuxer for BluRay/UHD disks, including 3D BluRays. It takes a playlist and demuxes all the elementary streams (audio and video), the subtitle streams, and the chapters. The demuxed files are all in sync with the demuxed video, even for seamless branching titles.""" > debian/DEBIAN/control

cp bin/dgdemux debian/usr/local/bin
chmod +x debian/usr/local/bin/dgdemux

dpkg -b debian dgdemux_${version}.deb
If you willing to provide packages, put that script into certain folder (for example, folder name "dgdemux-package", script name "mkdeb.sh") and set execution rights (chmod +x mkdeb.sh). Put dgdemux binary into "dgdemux-package/bin" and run script. It should produce dgdemux_1.0.0.50.deb (current version) which you can host as alternative to .gz archive.

DG Tools on Linux

Posted: Wed May 12, 2021 1:15 pm
by Rocky
Great, thanks!

DG Tools on Linux

Posted: Wed May 12, 2021 9:33 pm
by Rocky
We're allowed to be stupid, right? Do we have to make a RPM distribution as well as a DEB one?

DG Tools on Linux

Posted: Thu May 13, 2021 12:36 am
by DJATOM
I don't have any experience with rpm to say for sure :)

DG Tools on Linux

Posted: Fri May 14, 2021 9:43 am
by Rocky
OK, I'll just distribute raw binaries for now.

VS Code appears adequate for debugging. Better than printf debugging at least. :lol: I have it working fine. Still lots to learn about it but good for now. Thank you for the heads up, DJ.

What shocked me was how fast all the vi commands came back to me after 35 years. They were squirrelled away somewhere in my brain.

DG Tools on Linux

Posted: Fri May 14, 2021 7:46 pm
by Rocky
Gonna fire up GTK and make a linux GUI for DGDemux. Then gonna seize the bull by the horns and port DGSource.

Sure would like to get audio and the 2080 Ti working. Without those it's hard to take the linux machine seriously.

DG Tools on Linux

Posted: Fri May 14, 2021 8:16 pm
by Guest
Sure would like to get audio and the 2080 Ti working
Can you select NVidia drivers instead of nouveau at install time?
Edited

This might? help
https://www.nvidia.com/en-us/drivers/unix/