Output all file names after demuxing

User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Output all file names after demuxing

Post by hubblec4 »

Hi

I have started to implement the support of DGDemux in chapterEditor(cE).

It seems there is no way to specify file names for the streams.
A global file name is used and DGDemux append some things to the file names.

It would be nice to get a list of all the file names which are created by DGDemux at the end of the Output.

Especially with the audio tracks, the file name can be very different because the DELAY is not known beforehand.

This is needed to automate all the processes in cE.

Best regards
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Output all file names after demuxing

Post by SomeHumanPerson »

Could you use a directory listing and RegEx search to compile that list?

I do this with Python when automating various file and folder handling, not from DGDemux specifically, but the idea should be the same. As long as you know the base name and the basic format of each possible output file (audio, video, and subs start with "[base name] PID [####]" while chapter and keyframe files are always "[base name].chapters.txt" and "[base name].qp.txt", with predictable modifications when using episode demuxing mode), you can gather and identify the list fairly easily.

This is especially simple if you use a temp/working directory where you have reasonable control over what extraneous files might exist in it at any given time.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

@hubblec4

One thing I could do easily is print lines like this:

Created for demux: filename.ext

You could see them on stdout if the -l option is not given, or see them in the output file if one is specified with the -l option.

Please let me know if that is useful for you. If so I will make a slipstream.

Still cogitating on raw M2TS list demux...
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Output all file names after demuxing

Post by hubblec4 »

Rocky wrote:
Fri May 19, 2023 11:34 am
@hubblec4

One thing I could do easily is print lines like this:

Created for demux: filename.ext

You could see them on stdout if the -l option is not given, or see them in the output file if one is specified with the -l option.
Yes that would be wonderful. The full filename (filename.ext) is fine.
The path to the temp folder is already known.

Rocky wrote:
Fri May 19, 2023 11:34 am
Still cogitating on raw M2TS list demux...
Yes I can imagine this is not so easy, please take all the time you need.



SomeHumanPerson wrote:
Wed May 17, 2023 8:24 am
Could you use a directory listing and RegEx search to compile that list?
...

This is especially simple if you use a temp/working directory where you have reasonable control over what extraneous files might exist in it at any given time.
Yes of course such a workaround is easy to create and works mostly.
But I know not for cE, because sometimes I rename extracted files by adding a "_org" string and with a second demux process it is not possible to know which file was already demuxed.
And other users maybe do other things which breaks this workaround.
The best will always be, that the program sends such info via stdout.

eac3to and TsMuxeR allows to specify the filenames but I like the simpleness of DGDemux file creation.
Only missing are the created filenames.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

It's a deal! :salute:

Might be easier to give the full path. Would that be an issue?
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Output all file names after demuxing

Post by hubblec4 »

Rocky wrote:
Fri May 19, 2023 8:42 pm

Might be easier to give the full path. Would that be an issue?
I think no. The full path is also fine, I can cut the path to get the filename only.

Only the file name would be the best, the rest is known and the output stays clean(I use often loooong folder names with many sub folders).

In my mind I would do something like this:
before you send the "Done!" string

created files:
file 1.avc
file 2.dts
etc.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

hubblec4 wrote:
Sat May 20, 2023 7:12 am
Only the file name would be the best
OK, it shouldn't be too hard.
In my mind I would do something like this:
before you send the "Done!" string

created files:
file 1.avc
file 2.dts
etc.
Much easier to output at the time the file is created, otherwise I have to store a list somewhere.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

Output all file names after demuxing

Post by Curly »

yeah butt what does Sherman think about it
User avatar
Mr. Peabody
Posts: 45
Joined: Tue Dec 24, 2019 9:20 am

Output all file names after demuxing

Post by Mr. Peabody »

Sherman is busy doing homework. Great job Rocky.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Output all file names after demuxing

Post by hubblec4 »

Rocky wrote:
Sat May 20, 2023 10:17 am
Please test this:

https://rationalqm.us/misc/DGDemux_hubblec4.rar
Thanks for your work. The output of the file names works but there is one issue for the "forced" sup streams.
DGDemux prints a line "Created for demux: outfile PID 1201 eng (forced).sup" but there is no such file, because there are no forced sups for that stream.


And there is another issue with DGDemux.
I have attached a chunk of the Sully Blu-ray. Mpls 00100 is the main movie.

When I use the GUI for demux, all works but when I use the CLI directly, DGDemux crashes without any info.
With the "-l" option a log file is created but it is empty.

And a Hint: I have preserved this Blu-ray as a chunk because the embedded audio stream in the TrueHD stream is an "AC3 EX" stream not a simple AC3 stream. This reports eac3to.

Code: Select all

M2TS, 1 video track, 3 audio tracks, 5 subtitle tracks, 0:00:29, 24p /1.001    
1: Chapters, 10 chapters                                                       
2: h264/AVC, 1080p24 /1.001 (16:9)                                             
3: E-AC3 EX, English, 7.1 channels, 1512kbps, 48kHz, dialnorm: -27dB           
   (core: AC3 EX, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB)               
4: TrueHD/AC3 (Atmos), German, 7.1 channels, 48kHz                             
   (embedded: AC3 EX, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB)           
5: AC3, Hungarian, 5.1 channels, 448kbps, 48kHz, dialnorm: -27dB               
6: Subtitle (PGS), English                                                     
7: Subtitle (PGS), German                                                      
8: Subtitle (PGS), Hungarian                                                   
9: Subtitle (PGS), German                                                      
10: Subtitle (PGS), Hungarian   
Attachments
Sully - E-AC3 EX, TrueHD+AC3-CoreEx.7z
(99.58 MiB) Downloaded 145 times
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

Please re-download and re-test. Thank you.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Output all file names after demuxing

Post by hubblec4 »

The forced sup demuxing works nicely.

But the DGDemux.exe still crashes, only with the GUI works the demux process.
I use a simple command line:

Code: Select all

"D:\Windows\Programme\Videobearbeitung\Muxer-Demuxer\DGDemux\bin\DGDemux.exe" -i "G:\_Neues\Spectre\BDMV\PLAYLIST\00800.mpls" -o "F:\Neuer Ordner\00800\out" -demux
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Output all file names after demuxing

Post by SomeHumanPerson »

If I may poke my nose in here again:

If you plan to add code to check for a bare "-demux", would it possibly be about the same work but slightly more intuitive for users to have an "all" case (i.e. "-demux all")?
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

Please re-download once more and re-test. Be aware that bare -demux is illegal. You have to follow it with a list of streams to demux. If you want all the streams, omit the -demux option completely.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

Error check was added for -demux without a stream list. Re-download.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Output all file names after demuxing

Post by hubblec4 »

Rocky wrote:
Sat May 20, 2023 6:36 pm
Please re-download once more and re-test. Be aware that bare -demux is illegal. You have to follow it with a list of streams to demux. If you want all the streams, omit the -demux option completely.
OK. my fault and I'm not sure but I have tested it also with a PID.

However, everything works.
Many many thanks.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

I fixed a crash case with a stream list so you probably hit that. Good to hear it's working. Thank you for your testing.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

SomeHumanPerson wrote:
Sat May 20, 2023 6:22 pm
If I may poke my nose in here again
You and Sherman...birds of a feather. ;) Thank you for your suggestion.
If you plan to add code to check for a bare "-demux", would it possibly be about the same work but slightly more intuitive for users to have an "all" case (i.e. "-demux all")?
To me, omitting the option entirely is more intuitive, which is why it was done that way. ;) I think it's just a matter of people thinking because eac3to does it with a bare '-demux' then so should DGDemux.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

Hmm, on second thought, why don't we just silently ignore a bare -demux and treat it as if it wasn't given. Then the eac3to syntax would work too.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

OK, I slipstreamed that change into build 69. Now you can say "-demux" only and get all streams. Thank you SomeHumanPerson for (in effect) suggesting this.
User avatar
hubblec4
Posts: 219
Joined: Tue May 02, 2023 6:03 pm

Output all file names after demuxing

Post by hubblec4 »

It's definitely a good extension.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Output all file names after demuxing

Post by Rocky »

:salute: Pretty obvious, right?
User avatar
SomeHumanPerson
Posts: 96
Joined: Fri Mar 24, 2023 10:41 am

Output all file names after demuxing

Post by SomeHumanPerson »

Rocky wrote:
Thu May 25, 2023 8:57 am
Hmm, on second thought, why don't we just silently ignore a bare -demux and treat it as if it wasn't given. Then the eac3to syntax would work too.
That's a great (and dead simple!) solution. Well played. :salute:
User avatar
Boris
Posts: 92
Joined: Sun Nov 10, 2019 2:55 pm

Output all file names after demuxing

Post by Boris »

!! Breaking News !!

Blind squirrel finds nut.
Post Reply