DGDemux (linux)

DG tools for linux
User avatar
DJATOM
DG Approved/Moose Approved
Posts: 167
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post 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.
User avatar
DJATOM
DG Approved/Moose Approved
Posts: 167
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post 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.
User avatar
thechaoscoder
Moose Approved
Posts: 33
Joined: Tue Jul 14, 2020 8:34 am

DG Tools on Linux

Post 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?
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post 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.
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post 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.
User avatar
DJATOM
DG Approved/Moose Approved
Posts: 167
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post 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
}
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Sounds good, thank you.
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post 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]
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post 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?
User avatar
DJATOM
DG Approved/Moose Approved
Posts: 167
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post 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.
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

OK, thank you, I will nuke it.
DAE avatar
Guest

DG Tools on Linux

Post by Guest »

If I may,
with SSD prices dropping and capacity increasing (normally) fragmentation really isn't much of an issue
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

That settles it then. Guest has spoken!
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post 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
User avatar
DJATOM
DG Approved/Moose Approved
Posts: 167
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post by DJATOM »

Tested -ep on my end, it works.
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Thank you, DJ!

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

Got the stupid taxes done. Robber barons! :x
User avatar
thechaoscoder
Moose Approved
Posts: 33
Joined: Tue Jul 14, 2020 8:34 am

DG Tools on Linux

Post 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:
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

:lol: :facepalm: :salute:
User avatar
DJATOM
DG Approved/Moose Approved
Posts: 167
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post 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.
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

Great, thanks!
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post by Rocky »

We're allowed to be stupid, right? Do we have to make a RPM distribution as well as a DEB one?
User avatar
DJATOM
DG Approved/Moose Approved
Posts: 167
Joined: Fri Oct 16, 2015 6:14 pm

DG Tools on Linux

Post by DJATOM »

I don't have any experience with rpm to say for sure :)
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post 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.
User avatar
Rocky
Moose Approved
Posts: 2211
Joined: Fri Sep 06, 2019 12:57 pm

DG Tools on Linux

Post 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.
DAE avatar
Guest

DG Tools on Linux

Post 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/
Post Reply