Giter VIP home page Giter VIP logo

bdsup2sub's People

Contributors

auguchanan avatar rakuennow avatar sandrasi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bdsup2sub's Issues

Loading dvd sup file without the ifo file results in error message

The HD-DVD-SUP and the DVD-SUP format share the same header and BDSup2Sub needs a way to decide in which format the sup files should be interpreted. Currently it works as follows:

  • if there is an ifo file with the same name as the sup (foo.ifo, foo.sup) AND the ifo file is loaded then BDSup2SUB will interpret the sup as DVD-SUP format and take some additional info (resolution, color-palette, etc.) from the ifo since it's not part of the sup file
  • if a sup file is loaded then it is interpreted as HD-DVD-SUP

If a DVD-SUP file is opened without the ifo file

  • it should be recognized, and
  • the user should be asked to supply the ifo file OR be able to provide in a window what we need from the ifo file (resolution, etc).

Option -S scale useless in CLI mode

Thank you for your great software. It is very useful for some smart tv that only support idx+sub subtitles.
I found that Option -S scale useless in CLI modeCommand line Interface.
-S,--scale <x, y> Scale captions horizontally and vertically.
Default: 1.0,1.0
I use it like this
java -jar BDSup2Sub.jar -r ntsc -i -S 1.5,1.5 -I 2.333,8 -t bdsup2sub_palette.ini -o filename.idx filename.sup
Only CLI mode has this problem. In GUI mode it works well, scale take effect.

Potential license violation

Perusing through your changes I've noticed you've stripped the LGPL license on the PNGEncoder.java class and put it under Apachev2. Did you have permission from the original author to do so? Because if you didn't that's a license violation.

BDSup2Sub should have an option to use hqx for subtitle scaling

http://forum.doom9.org/showthread.php?p=1634720#post1634720

Suggestion: BDSup2Sub should have an option to use hqx for subtitle scaling. I've done a test run scaling DVD subtitles to HD resolution using hqx and the results are fantastic, much better than any of the current scaling options in BDSup2Sub. This sort of scaling doesn't work well for photos and such, but it seems ideal for scaling DVD subtitles with their limited resolution and color palette. It may also work decently for HD subtitles, but I don't think there would be much benefit and it may cause a posterization effect because of the wider color palette. The big downside is that it is slow.

Basically, I used hqx to scale my DVD subtitle to 3x its normal resolution, then I used a more general-purpose scaling algorithm (Lanczos) to scale/stretch it back down to the exact right dimensions for HD. I then did a contrast boost to get back the sharpness/whiter whites/blacker blacks. I'm not sure how well it might work with other color combinations than black/white, but I think it would probably work quite well. I believe there is a sample implementation in both Java and C.

Can't run CLI without window manager

When I try to run BDSup2Sub over SSH without X11 tunneling I get an error:

java -jar ../Software/BDSup2Sub_v5.1.1.jar --help
Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.awt.X11GraphicsEnvironment.initDisplay(Z)V
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:119)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at java.awt.Toolkit$2.run(Toolkit.java:868)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:860)
        at javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:608)
        at javax.swing.UIManager$1.run(UIManager.java:1230)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.swing.UIManager.loadSwingProperties(UIManager.java:1225)
        at javax.swing.UIManager.initialize(UIManager.java:1453)
        at javax.swing.UIManager.maybeInitialize(UIManager.java:1422)
        at javax.swing.UIManager.getDefaults(UIManager.java:656)
        at javax.swing.UIManager.getColor(UIManager.java:698)
        at bdsup2sub.core.Configuration.<clinit>(Configuration.java:32)
        at bdsup2sub.BDSup2Sub.<clinit>(BDSup2Sub.java:35)

The problem is that BDSup2Sub/src/main/java/bdsup2sub/core/Configuration.java initializes "public static final Color OK_BACKGROUND = UIManager.getColor("TextField.background");" in the class and not the constructor.

One way to fix this would be to add a isCLI as a required parameter to the constructor, and OK_BACKGROUND would only be initialized if isCLI is false.

Resolution conversion broken in 5.1.0

With the latest version of BDSup2sub (510) I am unable to convert a blu-ray subtitle to dvd subtitle. In the conversion options dialog I want to convert to NTSC (720x480). I choose NTSC (720x480) as the resolution but the subtitle does not get converted to NTSC (720x480). The subtitle keeps getting the same resolution as the source (1920x1080) no matter what setting I choose. I had no problem with the previous version of BDSup2sub (5.0.0)

Bug in export of subtitles - always changes frame rate

When I load a BD .sup file with no options checked in the conversion options dialog the frame rate is correctly detected as 23.976. I then immediately export the file (no options checked). If I then reload the file I just exported the frame rate is now 25 (or whatever the Target FPS setting was in the conversion options dialog on loading the original file). This happens even though Change Frame Rate checkbox is left blank/unchecked. The FPS is not being mis-detected as tsmuxer and other tools show the same change in frame rate for the exported sup file. The only work around is to explicitly make sure the Target FPS is set to the same as the Souce FPS even though the box is not checked. Seems the unchecked state of that option is being ignored in the current version 5.1.2. OS is Windows 8.1 Update 1 (64-bit)

Case-sensitive look-up of IFO files

When BDSup2Sub is about the read the subpicture stream from a SUP/IFO pair of files, it displays an error message claiming that the IFO file is not found. It only happens if the "IFO" file extension is capitalized (as it is on any DVD).

Normal and forced start at the same time on DVD

When converting Blu-Ray subtitles to DVD, I get two start commands when it is a forced subtitle. A DVD subtitle should always either have a normal start or a forced start, but not both. While most DVD players seem to have no problem with it, some however do. Such subtitles are not displayed at all on the Playstation 3.

Failed to merge multiple subtitle images contained in one subPictureBD structure

When converting one bluray sup file recently, I noticed that the ouput idx/sub file contains incomplete subtitles for certain lines.

After single-stepping through the source code, I found out that when decoding images, only the first imageObject in a subPictureBD instance was decoded. This led to incomplete subtitle since in my case, there were sometimes two imageObject in one subPictureBD. I believe these two imageObject should be combined to form one complete subtitle image.

I'm not a Java programmer, so I suppose I will just post this issue here instead of trying to fix this bug myself. I can provide the sup file in question if further inspection is needed.

OSX bundle v.5.1.2 : export menu is disabled

I launch the app, load a subtitle file (pgs stream extracted from a mkv using mkvextract tracks),
I can see the first sentence displayed in the upper window,
the log shows :
"#> 1178 (02:22:25.954)
Detected 19 forced captions.
Decoding frame 1/1178 at offset 0x000005a9"

But nothing runs after that, and all items from the File menu are disabled.

Is this a bug ? Or is there something I should do and that I don't get ?
thanks.
l.

Add support for an additional blu-ray subtitle format

I ripped a SUP file from a Blu-ray yesterday (using eac3to 3.24) and BDSup2Sub (4.0.1) is having some problems handling it.

The SUP in question:
http://dl.dropbox.com/u/132558/suptitle/chatroom.sup

This is the log file that BDSup2Sub generates when opening the stream:
http://pastebin.com/GNr5gUiW

The problem is that BDSup2Sub gives incorrect timing information for some subtitles.
For example, the very first subtitle is reported to last almost 2 minutes, while it should only be a couple of seconds.

Apparently, it's some weird SUP format as the SupTitle, the AviSynth plugin also had some problems handling the file.

I reported the issue to the author yesterday and he was able to fix it. See the topic here:
http://zachsaw.com/forum/viewtopic.php?f=14&t=327

The filter now correctly handles the file and gets the timings right.

Bug in commandline parser exposed under Windows

The code in the main method of BDSup2Sub.java which parses whether a single argument passed is a filename or is a command string has a bug at least when tested under Windows.

To reproduce here are the combinations I used to expose the bug:

java -jar BDSup2Sub.jar "E:\Authoring\Esca 1-4.idx"

loads the file just fine. But when I do:

java -jar BDSup2Sub.jar "E:/Authoring/Esca 1-4.idx"

I get the error:

ERROR: File 'E:/Authoring/Esca' does not exist.There was 1 error

Now if you take a file that has no spaces at all and you do both ways the file loads successfully. This also happens if the path itself has spaces even if the filename doesn't. A simple fix is just to check if the single argument is the path to an existing file and short circuiting that whole for loop to parse the command string.

Global forced flag "Set all" broken

In 5.x and even the latest beta, the "Set all" option doesn't work.

In 5.x if you open a .sup file and set "Force all" to "Set all" then press OK, set your output format and the save the new .sup, no forced flags are set.

Also, before you save, if you go back into Conversion Settings, the "Force all" option has reverted to "keep". Changing back to "Set all" -> OK then going back into Conversion Settings, you'll see it has reset once again.

Works fine in 4.0.1.

Avatar blank forced frames

Possibly related to issue #34
Some forced subtitles in Avatar BD show up blank and throw a warning.
You can see a working forced subtitle in the first screenshot and a broken forced subtitle in the second screenshot. Version 5.0.0 does not have this issue. It appears to have been introduced in 5.1.0 and persists in 5.1.1 as well as ++ versions.
Here is a copy of the sup file:
http://www.mediafire.com/download/mhc6h5h8rshqbpd/AvatarSup.zip

screenshot013
screenshot014

Command line option --language is broken

I have a idx/sub with several languages, idx 0 being Danish and idx 6 being Dutch.

To export the Dutch subtitles, I run:
java -jar BDSup2Sub512.jar --language nl -o output.idx input.idx

The result has the Danish subs, but according to the idx, they are english:
id: en, index: 0

I also tried this using the GUI:
This also results in Danish subs, but now at least the idx says the subs are Dutch.

(So the only way i can use it: first textedit .idx and set langidx to the desired subtitle, and then use the GUI to export. Thus not usable if needing to process lots of subs.)

BDSup2Sub should point the maintainer's blog besides the author's forum thread

The forum thread on Doom9 was started by the original author of BDSup2Sub, 0xdeadbeef: http://forum.doom9.org/showthread.php?t=145277

Since Miklos Juhasz took over the maintenance he posts updates in his blog: http://sw-planet.blogspot.com/

He does not have the right to change the first post in the forum and include a link to the blog.

When BDSup2Sup is launched it prints the forum URL into the blog window. It should print the blog url as well.
The help text should also be updated.

Faulty DVD sub pictures when size is odd

DVD requires to have each sub picture at an even size. Some DVD players (such as the picky SEG New Orleans) will behave strange when sub pictures have an odd size. Those should be padded with one additional dummy byte to get them even (which any other sub picture tool I'm aware of does). The sub picture size indicator at the beginning has to be increased by one as well in this case.

Strange PNG on export

Maybe this is not a bug but a feature request:
If i do export as PNG and open it with Photoshop/Gimp i got no alpha channel but only an alpha color within the color table. If i save it back i totally loose the alpha channel - it looks like a GIF in the movie.
Maybe it is a very rarely PNG format or something went badly wrong here.

Index 0 out of bounds

Hello. When trying to open an IDX/SUB file, BDSup2Sub gives me the following error: "Index 0 out of bounds". Can you take a look at the file and see if you can support it later on? I tried many other software solutions and all of them fail. Thank you in advance.

http://www.mediafire.com/?69vuxcuw3hduuar

Request for inverse of forced only

I feel it would be very handy to have a way to inverse the -D command. Something like a --non-forced option that would export everything but the forced subtitles. That way if forced subtitles are burned into a movie file and subtitles are turned on you don't get two copies of the subtitles over the top of each other for any parts with forced subs.

green background in player after saving subtitle

Hi,
I have a problem with a specific subtitle, which gets a green background in players using FFDShow or VobSub (e.g. ZoomPlayer, MPC-HC), as you can see on the right side of the screenshot below. On the left side is XBMC (which apparently uses its own subtitle code). I made some tests with the subtitle and for that subtitle the green background color appears as soon as I save the subtitle in SUB(BD) format (SUB/IDX works fine). Maybe you can make out what causes this by taking a closer look at the testfile I made (https://www.dropbox.com/s/8aa3qd45td3n46o/Escape%20Plan%20%28Test%29.mkv?dl=0) and/or shed some light on the differences of the subtitle tracks in that file, so I can hand over that information in the ZoomPlayer forums (where I'am already in contact with a very helpful person).

subtitle_problem

Revisit default resize filter choice

At the moment bilinear is used by default for resizing subpictures. Lanczos3 could be another candidate if it has better quality without intrioducing any regression or slowdown.

Subtitles At Top, Can't Move to Bottom

For some reason, when I load the .sup the subtitles are all positioned on the top of the frame.

If I try to use 'move all' it won't let me put in the offset I need (850) to put them at the bottom.

Really frustrating.

VobSub compatibility problem with Oppo BDP-105

If I rip one of my commercial DVDs to an MKV file the embedded VobSub subtitles will play without any problem when streamed via DLNA to my Oppo BDP-105 media player.

However, the Oppo does not handle the standard SUP subtitles within a MKV rip of a commercial Blu-ray disk. I have therefore used BDSup2Sub to convert the SUP subtitles to the VobSub format (.idx file) and then used MKVMerge to remux the movie using this newly created IDX file.

The Oppo is able to display the VobSub subtitles in the modified MKV file when streamed via DLNA but the colours are wrong. The main text colour is a mid green instead of white. Even worse, the text edges are also in this same green colour, which makes adjacent characters bleed into one another. These subtitles can be very difficult to read.

I have reported the problem to Oppo but have not yet received an answer. However, the fact that standard DVD subtitles work fine while VobSub titles created by BDSup2Sub do not, suggests that maybe the problem lies with BDSup2Sub.

Your advice and comments would be appreciated.

Regards,
David

Some DVD subtitles are flashing after sup->idx/sup conversion

I have processed hundreds of subtitles in sup format and exported them in idx/sub. While checking them on software and hardware players in a few cases I noticed that certain subtitles are flashing: the don't show up when they are supposed to, only seconds later and only for a fraction of a second, immediately followed by the next subtitle. It is virtually impossible to read them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.