Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd July 2012, 12:41   #1041  |  Link
SassBot
Guest
 
Posts: n/a
Quote:
Originally Posted by r0lZ View Post
But it's a problem if the INI is loaded. It is not possible to turn off a setting that has been set in the INI. Since the INI is loaded anyway when the GUI is opened even without specifying --load-settings, it is impossible to turn off a boolean flag in that case (and if --load-settings is provided). IMO, it's confusing, and limited. So, yes, I think that args to turn off the boolean options is important. (The GCC syntax is OK for me.)
But if you are using the GUI why would you be specifying the settings via the CLI? That seems like a weird use case to me.

Also, I just realized that I somehow lost the code I added for switching between languages in multiple language IDX/SUB files. I'll be adding that back in before the 1.0.0 final.
  Reply With Quote
Old 2nd July 2012, 12:51   #1042  |  Link
SassBot
Guest
 
Posts: n/a
So to add, I'm adding explicit flags to disable those options, so that if you want to read in the INI file as well you can disable select options.
  Reply With Quote
Old 2nd July 2012, 13:09   #1043  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
Quote:
Originally Posted by SassBot View Post
But if you are using the GUI why would you be specifying the settings via the CLI? That seems like a weird use case to me.
Well, that can be useful. For example, when converting a DVD SUP, the defaults for --alpha-thr and --minimum-time (especially --minimum-time) are not very good, as many DVDs have hidden (fully transparent) subs, usually with a very short duration. Forcing a minimum duration of 500 ms (the default) may have an impact on the following subtitles. Also, --fix-invisible must be turned off, as otherwise garbage appears.

It would be nice to be able to create a shortcut to BDSup2Sub++ with the option --load-settings --no-fix-invisible --minimum-time 0 --alpha-thr 40, to open the GUI in "DVD mode", without changing the other user settings. It's currently not possible, due to the missing --no-fix-invisible.

Also, currently, my GUI converts normally the subs automatically (without loading the settings file), but it has an option to load the SUP in the GUI, and let the user modify what he wants before saving the converted sub manually. In that case, I would like to load the INI for some defaults, but force the "DVD mode". (Of course, the user can change the forced options, but it's his responsibility.)

BTW, it's certainly why the java version has that possibility.

[EDIT]
Quote:
Originally Posted by SassBot View Post
So to add, I'm adding explicit flags to disable those options, so that if you want to read in the INI file as well you can disable select options.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 13:15   #1044  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
I've found another bug. When trying to load a palette with the --palette-file arg, the program outputs always the same error message: ERROR: Not a valid palette file

The palette I was trying to load has been generated by my GUI, and the java version loads it without problem.
I've tried to export a palette with the ++ version, and noticed that the file format is different. Now, it has a "[General]" category, not present in the java versions.
So, I did the test again, this time with a file of the correct format, but the same error happens. Not sure why.

BTW, I agree that the new format is better, as it's a real INI, but the new format will not be compatible with many other programs (including PgcEdit). That might be a problem.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 13:19   #1045  |  Link
SassBot
Guest
 
Posts: n/a
Can you upload the file? It should read the INI file just fine as I tested loading palette ini's exported from the Java program to verify it worked via the GUI. There's a bug in the CLI code probably.

The reason the output looks different is that I'm using Qt's INI writing class which uses the Win32 APIs whereas the Java used custom code to write it and that's why it looks different.
  Reply With Quote
Old 2nd July 2012, 13:25   #1046  |  Link
SassBot
Guest
 
Posts: n/a
Ok, it's just a flaw in checking that it was a valid palette INI file via the CLI. Fixing now.
  Reply With Quote
Old 2nd July 2012, 13:27   #1047  |  Link
SassBot
Guest
 
Posts: n/a
Quote:
Originally Posted by r0lZ View Post
BTW, I agree that the new format is better, as it's a real INI, but the new format will not be compatible with many other programs (including PgcEdit). That might be a problem.
If it's due to the color ordering I can swap them around and get rid of the general heading. I didn't think about that.
  Reply With Quote
Old 2nd July 2012, 13:32   #1048  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
Indeed, the palettes can be loaded in ++ with the GUI. It's certainly a CLI bug.
Code:
bdsup2sub++.exe  --language fr --palette-file "E:\TEMP\PGC2MKV TEMP\Subtitles_palette.ini" --alpha-thr 40 --minimum-time 0 -o "E:\TEMP\PGC2MKV TEMP\Subpictures_22.sub" "E:\TEMP\PGC2MKV TEMP\Subpictures_22.idx"
Note the space in the path. Could it be the reason?

Given the tests I've made with the java version, it requires a comment as the first line, beginning with "#COL".
Without that line, I have never been able to load a palette (from CLI or GUI).
But this palette can be loaded in both versions (GUI only for ++):
Code:
#COL - VTST 2, 1  TTN 1 (2:51) Title 3
# Exported by PgcEdit's PGC2MKV plugin
[General]
        Color_0=0, 0, 0
        Color_1=0, 0, 0
        Color_2=0, 0, 0
        Color_3=0, 0, 0
        Color_4=0, 0, 0
        Color_5=0, 0, 0
        Color_6=0, 0, 0
        Color_7=0, 0, 0
        Color_8=0, 0, 0
        Color_9=0, 0, 0
        Color_10=0, 0, 0
        Color_11=0, 0, 0
        Color_12=0, 0, 0
        Color_13=204, 204, 204
        Color_14=0, 0, 0
        Color_15=0, 0, 0
(The lines begin with two TABs, for historical reasons, but they are not necessary.)
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 2nd July 2012 at 13:35.
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 13:38   #1049  |  Link
SassBot
Guest
 
Posts: n/a
Yeah, I'm rewriting the code to output the palette so it's like the Java one. The program INI file will still use the Qt class so there will probably be incompatibilities there, but I don't really want to have to use a bunch of custom code for that.
  Reply With Quote
Old 2nd July 2012, 13:41   #1050  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
Oh, I think the CLI palette bug could be caused by the single \ characters. Is it necessary to convert them to / or \\ ?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 2nd July 2012 at 13:46.
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 13:42   #1051  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
Quote:
Originally Posted by SassBot View Post
Yeah, I'm rewriting the code to output the palette so it's like the Java one. The program INI file will still use the Qt class so there will probably be incompatibilities there, but I don't really want to have to use a bunch of custom code for that.
As long as the "#COL" comment is present in the first line, it's perfect!
Pity: it is probably not easy to add a comment in the INI with the Qt class.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 2nd July 2012 at 13:44.
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 13:46   #1052  |  Link
SassBot
Guest
 
Posts: n/a
Quote:
Originally Posted by r0lZ View Post
Oh, I think the CLI palette bug could be caused by the single \ characters. Is it necessary to convert them to / or \\ ?
What single slash? The bug was the way I was testing whether the file had the Color lines in it to make sure it was a palette file.
  Reply With Quote
Old 2nd July 2012, 13:54   #1053  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
OK. But why dit it fail from the CLI but not in the GUI? Is it not the same code?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 14:13   #1054  |  Link
SassBot
Guest
 
Posts: n/a
No, it's a different code path.
  Reply With Quote
Old 2nd July 2012, 14:37   #1055  |  Link
SassBot
Guest
 
Posts: n/a
Ok, well I have to go to work now. Palette writing code matches what Java version does when you export the DVD Palette and the detection code for specifying an input palette INI is fixed. I got the complementary "--no" CLI options in for the boolean options that can be read from the INI file (export palette, fix invisible frames, and verbatim logging) so they can be overridden if you want to also read in your settings INI. Also, in the GUI I've added default settings to the buttons in popup the dialogs so you can use the enter key to hit the okay button in the conversion dialog, to activate the move all in the move dialog, etc.

Changes that are set to be made are so that if you pass a non-wildcard input file but specify no output that it will load the GUI and set the options you passed in. Also there were two suggestions about switching between subtitles from the GUI by either using spacebar or pgup/pgdown. The keyboard shortcut will be implemented as well. Since this will take more time than I can do right now it'll have to wait until either tonight or tomorrow.

New version to download is here.
  Reply With Quote
Old 2nd July 2012, 15:04   #1056  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
Thanks! I'll test it tonight...
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 15:25   #1057  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,209
Just did a test. There are still some problems:
Code:
bdsup2sub++.exe  --language fr --palette-file Subtitles_palette.ini --alpha-thr 40 --minimum-time 0 -o Subpictures_22.sub Subpictures_22.IFO
OPTION: Set alpha threshold to 40
OPTION: Set language to French (fr)
OPTION: Loaded palette from Subtitles_palette.ini
OPTION: Set delay to 0
QxtCommandOptions: option "no-verbatim" not found 
QxtCommandOptions: option "no-fix-invisible" not found 

Converting SUB/IDX

There was 1 warning

Conversion of 1 file(s) finished
What warning?
The original java version issues this warning:
Code:
# 1
WARNING: Invisible caption due to zero alpha (not fixed due to user setting).
And a lot of other messages. (Most of them are not necessary, but the ++ version displays almost nothing.)

The QxtCommandOptions messages are printed to stderr, so my GUI assumes that an error occurred, although it's not really the case.
Anyway, these messages are abnormal.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 2nd July 2012 at 15:28.
r0lZ is offline   Reply With Quote
Old 2nd July 2012, 16:17   #1058  |  Link
SassBot
Guest
 
Posts: n/a
Hmm, I don't know why you get those messages since those options were added to the QxtCommandOptions class. Also, passing options to a program that it doesn't recognize seems to be an error to me so I don't see the problem with it writing that to stderr. Although it should have quit had it gotten unrecognized options so I'll see why it didn't.

And I don't know why the messages don't print out. I'll double check to make sure the signals/slots are all connected properly and being emitted as they should.

Edit to add: I figured out the problem with the new options. I had accidently left out a , when I added to "no-verbatim" switch to the method that takes the option name and description. This caused it to be unrecognized. Though when I tested it it immediately showed the error, displayed the options list and then exited. Why it didn't exit for you I don't get.

Also the console logging issue is fixed too. The way I was checking to see whether we were logging for the GUI or console had an issue. I'll be able to push out a version here in a few minutes.

Last edited by SassBot; 2nd July 2012 at 16:35.
  Reply With Quote
Old 2nd July 2012, 16:51   #1059  |  Link
SassBot
Guest
 
Posts: n/a
New version here with the aforementioned fixes.

So I was just testing the keyboard shortcut to rapidly change between subtitle numbers in the GUI and pgup/pgdown will be problematic due to the image windows that also accept those key presses. Spacebar would be a good key since it won't be used by those. Unless someone has a better key suggestion.

Last edited by SassBot; 2nd July 2012 at 16:56.
  Reply With Quote
Old 2nd July 2012, 17:55   #1060  |  Link
SassBot
Guest
 
Posts: n/a
Ok, so space doesn't really work since it doesn't cover going backwards in the list of items. Maybe ctrl-pageup and ctrl-pagedown?

Last edited by SassBot; 2nd July 2012 at 18:04.
  Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.