[SOLVED] Demux Support & CLI

Support forum for DGDecNV
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

[SOLVED] Demux Support & CLI

Post by Zathor »

Hi Don,

Thank you very much for all the work in the demuxing area. :hat:

Hopefully you do not mind that I share some test results and feature requests with the GUI and the CLI:

0) All points below have been done / noticed with the recent DGDecNV from today (2053.0.0.136).

1) As you have changed the file name syntax MeGUI has to search for it based on different patterns. Surely MeGUI can be adjusted to use those, but ideally as with other tools when using the command line these files names are mentioned there. Alternatively (or both?) they could also be added to the .log file. It would be easy to parse those and there would be no need to start wildcard searches in the file system - also pattern changes would not be an issue anymore. If you are going to do this I would vote to have one line per file and the line to pe started with the track / PID number - so something like:

Code: Select all

1: d:\megui\test.m2v
2: d:\megui\test_track2_ger_DELAY 0ms.wav
2) When all these changes are done I also would love to have the same added to DGDecIM.

3) During the tests above I noticed that the CLI and GUI behaves differently when extracting audio.
When using the GUI to extract an audio track the audio gets demuxed but with the command line no audio track is extracted.

CLI: "D:\MeGUI\MeGUI_dgindexnv\bin\x86\Debug\tools\dgindexnv\dgindexnv.exe" -i "D:\MeGUI\test.mkv" -o "D:\MeGUI\test.dgi" -h -a
Only the dgi is created.

GUI: also the file test_track2_ger_DELAY 0ms.wav is created

Test file:

Code: Select all

General
Unique ID                                : 210867806632309056825003109443944725084 (0x9EA3A98D26A2CC22B7B4A6F88F0A3A5C)
Complete name                            : D:\MeGUI\test.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 350 MiB
Duration                                 : 1 min 38 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 29.8 Mb/s
Encoded date                             : UTC 2017-12-05 19:47:40
Writing application                      : mkvmerge v18.0.0 ('Apricity') 64-bit
Writing library                          : libebml v1.3.5 + libmatroska v1.4.8

Video
ID                                       : 1
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@High
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=12
Codec ID                                 : V_MPEG2
Codec ID/Info                            : MPEG 1 or 2 Video
Duration                                 : 1 min 38 s
Bit rate mode                            : Variable
Bit rate                                 : 25.2 Mb/s
Maximum bit rate                         : 33.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.507
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Open
GOP, Open/Closed of first frame          : Closed
Stream size                              : 296 MiB (85%)
Default                                  : No
Forced                                   : No

Audio
ID                                       : 2
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : A_PCM/INT/LIT
Duration                                 : 1 min 38 s
Bit rate mode                            : Constant
Bit rate                                 : 4 608 kb/s
Channel(s)                               : 6 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 32.000 FPS (1500 SPF)
Bit depth                                : 16 bits
Stream size                              : 54.2 MiB (15%)
Language                                 : German
Default                                  : Yes
Forced                                   : No

Menu
00:00:00.000                             : en:Chapter 1
4) If I use the GUI the demuxed wav file is locked till I close the GUI.

If you need further information to any of the points above I would be glad to provide these.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

Thanks very much, Zathor!

Replies with your numbering:

1. Great idea. I will add it to the log file.

2. OK.

3. Fixed locally.

4. Fixed locally.

Please keep an eye on the Binaries Notification thread to see when I have things for you.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: Demux Support & CLI

Post by Zathor »

That was lightning fast, thanks :bow:

1) I just noticed that the log is not written when the CLI is used. I would not mind when the log is also written when using the CLI mode.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

Zathor, can you live with lines like this:

D:\tmp\Zathor\Airshow PID 014 2_0ch 48KHz 384Kbps DELAY -356ms.ac3
D:\tmp\Zathor\VTS_01_1_track2_und_DELAY 0ms.wav

These are simply the names of the audio files that were written. I have this working so if you can accept it I can slipstream straightaway.

Ah, OK. We can't use the log file because it requires the Info dialog to have been opened, which won't happen with CLI. I can write the lines to a different file, something like demuxed.log.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: Demux Support & CLI

Post by Zathor »

Yes, I can live with these lines. Ideally the track/pid number would be in front but this is also something which I can use.

Could the log file name of the GUI not also be used for the "CLI log"? I like the "project name".log style more as it will be grouped together with the other files.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

Zathor wrote:
Sat Mar 24, 2018 11:06 am
Yes, I can live with these lines. Ideally the track/pid number would be in front but this is also something which I can use.
OK, I'll stick with this as I don't have access to this "track number" at the file open point and it would be a bit of a hassle to carry it around.
Could the log file name of the GUI not also be used for the "CLI log"? I like the "project name".log style more as it will be grouped together with the other files.
I like your thinking, consider it done.

I can make a slipstream later today. Right now I am off to do my coaching. BTW, if I can be permitted to brag a little, one of my swimmers won 4 first places at Illinois age group championships last weekend (11-12 age group). I'm taking partial credit. :D
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: Demux Support & CLI

Post by Zathor »

admin wrote:
Sat Mar 24, 2018 11:15 am
BTW, if I can be permitted to brag a little, one of my swimmers won 4 first places at Illinois age group championships last weekend (11-12 age group). I'm taking partial credit. :D
Congratulations! :bravo:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

Thank you, sir! I have everything implemented. Just going to have a late lunch and then I'll hand it over.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: Demux Support & CLI

Post by Zathor »

Thank you very much again :-)

I played around a bit with and can say that:
- it does extract again wav files :hat:
- wav files are not locked while the GUI is open :hat:
- log file does not seem to be written when using the CLI :oops:
- log file is written when I close the GUI (should it not be written when the project save step is done? :scratch: ) - it does include as last line the demux file info :hat:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

Zathor wrote:
Sun Mar 25, 2018 9:09 am
- log file does not seem to be written when using the CLI
:?: I'll check it again now.
- log file is written when I close the GUI (should it not be written when the project save step is done?
Yeah, I was thinking about that. For GUI, it is written only when the Info dialog gets destroyed. So you could X the Info dialog or X DGIndexNV to destroy it. I may change that.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

Please test the attached version (x86). Thanks. It's working for me.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: Demux Support & CLI

Post by Zathor »

It does now work, thanks! :D

Have you changed anything? And it even seems to be a full log :bow:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

Well, sure I changed things. :P I didn't change the GUI destroy behavior, I just do the full log now for CLI. To be honest, I don't know why it wasn't working for you before. I would never even suggest PEBCAK.

I'll slipstream the 137 slipstream now. :lol:

Deleting the attached version above.

Haven't forgotten about DGDecIM. Let's wait and see if your MEGUI changes need any further tweaks before doing it.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Demux Support & CLI

Post by admin »

I suggest using :salute: now and reserving :bow: for really deserving occasions.

So for Zathor and MEGUI we have :bow:

;)
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: Demux Support & CLI

Post by Guest 2 »

admin wrote:
Sat Mar 24, 2018 11:15 am
BTW, if I can be permitted to brag a little, one of my swimmers won 4 first places at Illinois age group championships last weekend (11-12 age group). I'm taking partial credit. :D
Great.

I restarted to swim at 45. Better: I started to learn modern swimming. It's a great sport.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: Demux Support & CLI

Post by Zathor »

admin wrote:
Sun Mar 25, 2018 11:28 am
I suggest using :salute: now and reserving :bow: for really deserving occasions.
As long as those smilies are available they should used ;)
admin wrote:
Sun Mar 25, 2018 11:28 am
So for Zathor and MEGUI we have :bow:
;)
:oops:

Back to topic 8-)
I do not have much time this week and therefore the adjustements are not finished yet. This is only a "FYI" that I am still not ready :?

EDIT: Forgot to ask - is the writing of the log tied to some ini switches? E.g. Enable_Info_Log or Full_Info?
EDIT2: Just saw: viewtopic.php?f=8&t=637
Maybe it makes sense to only write the log when Enable_Info_Log=1 is set?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [SOLVED] Demux Support & CLI

Post by admin »

No hurry on your changes and sorry for :oops: you.

MEGUI requires the log for full operation (or it will when you are done). I don't see a downside to assuming the log is enabled for CLI. I do the same thing for the -a option; it ignores the enable demux processing option.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: [SOLVED] Demux Support & CLI

Post by Zathor »

While further working on it :
Would it be possible to name the track type beside the file name, too? Something like a prefix (video: audio: subtitle: chapter:)
In the current logic I have only to deal with audio files - now also with the other types. As these are in most scenarious not needed I would delete them but to be sure the track type would be needed (yes, I can do it based on file extension but that would be a static list which can fail).

And is it safe to assume that the files are listed in their track order? So will a file for audio track 2 always written after a file for audio track 1?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [SOLVED] Demux Support & CLI

Post by admin »

Understood. Currently, only the audio files are listed. If you need all the others with their type like that I might as well move the track number up front too, as you asked for earlier. And then I could sort by track number also. I'll look into all this today and reply later.

Do you really need all the types listed rather than just the audio?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [SOLVED] Demux Support & CLI

Post by admin »

Bump for edit above. I currently only list audio. Do you really need all the others?
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: [SOLVED] Demux Support & CLI

Post by Zathor »

Ah, I only have tested yet with files containing only audio and only with -a. :oops:
For MeGUI it is sufficient if only audio files are added. Then of course the track type would not be needed.
But maybe others would want to have all extracted files and their types added there? No clue.

I still have to match the log list with the tracks I would like to have. For that either I would need to have the track numbers in a format which will not change (unlike maybe the file names) or if the order of the tracks in the log is always sorted (first track first, second track second, ...) this would also be sufficient.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [SOLVED] Demux Support & CLI

Post by admin »

Zathor wrote:
Wed Mar 28, 2018 8:10 am
Ah, I only have tested yet with files containing only audio and only with -a. :oops:
For MeGUI it is sufficient if only audio files are added. Then of course the track type would not be needed.
But maybe others would want to have all extracted files and their types added there? No clue.
OK, I'll leave it as just audio for now.
I still have to match the log list with the tracks I would like to have.
How do you know the tracks you would like to have? The better I understand your needs the better I can meet them.

In my simplistic brain, I would just add the listed files to a listbox and let the user select. That way there is no need to know or care about "track numbers".
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: [SOLVED] Demux Support & CLI

Post by Zathor »

admin wrote:
Wed Mar 28, 2018 9:10 am
How do you know the tracks you would like to have? The better I understand your needs the better I can meet them.

In my simplistic brain, I would just add the listed files to a listbox and let the user select. That way there is no need to know or care about "track numbers".
Correct, based on the mediainfo of a file a list box gets filled with the audio tracks. Those can be selected by the user.
This selection has to be matched later-on with the demuxed files DGDecNV/IM provides.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [SOLVED] Demux Support & CLI

Post by admin »

Ah, now I get why you need this "track number". I keep putting it in quotes because it is not a formal thing, e.g., transport streams have PIDs and no formal track numbers. Yes, we can arbitrarily treat them as track numbers but I'd have to be sure MediaInfo uses those same numbers. I'll experiment to see how they relate.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [SOLVED] Demux Support & CLI

Post by admin »

I have a test version for you:

http://rationalqm.us/misc/Zathor.rar

The "track number" is now given at the beginning of the line. The numbers are decimal and the entries are sorted numerically by "track number". E.g., for MKV:

2: D:\tmp\Subtitle Test\PGS\Rambo.First.Blood_34tracks_track2_ger_DELAY 2ms.dts
3: D:\tmp\Subtitle Test\PGS\Rambo.First.Blood_34tracks_track3_eng_DELAY 2ms.dts
4: D:\tmp\Subtitle Test\PGS\Rambo.First.Blood_34tracks_track4_fre_DELAY 2ms.dts
5: D:\tmp\Subtitle Test\PGS\Rambo.First.Blood_34tracks_track5_spa_DELAY 2ms.dts
6: D:\tmp\Subtitle Test\PGS\Rambo.First.Blood_34tracks_track6_ita_DELAY 2ms.dts
7: D:\tmp\Subtitle Test\PGS\Rambo.First.Blood_34tracks_track7_rus_DELAY 2ms.dts

E.g., for MPLS:

4352: H:\GRAVE OF THE FIREFLIES\BDMV\STREAM\00004 PID 1100 L+R 48 1536 eng DELAY 0ms.dts
4353: H:\GRAVE OF THE FIREFLIES\BDMV\STREAM\00004 PID 1101 L+R 48 1536 jpn DELAY 0ms.dts
4354: H:\GRAVE OF THE FIREFLIES\BDMV\STREAM\00004 PID 1102 L+R 48 1536 eng DELAY 0ms.dts

Please let me know if this will do the trick for you and I will slipstream it.
Post Reply