mjuhasz / bdsup2sub Goto Github PK
View Code? Open in Web Editor NEWBlu-Ray/DVD subtitle editor
License: Apache License 2.0
Blu-Ray/DVD subtitle editor
License: Apache License 2.0
after the time input fields got once yellow they won't turn back white when switching frames. even not if the other frames got correct time indexes.
EDIT: now it happened with red too
The help menu contains embedded documentation that can only be changed by rebuilding the program.
We should have a single online storage for documentation and a "Get Help Online..." menu item.
This effects all dialogs. We have mnemonic collisions (same character used for multiple components on the same form) and no default button. OK should be fine to be the default since the operations are mostly idempotent except the export dialog.
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 a DVD-SUP file is opened without the ifo file
Evaluate open source installer generators for Java.
Link to SUP file: https://www.dropbox.com/s/n66wvxzwuoofuto/sub3.sup
See bug https://bugs.launchpad.net/ubuntu/+source/light-themes/+bug/932274
It's a JVM bug on Linux but Ubuntu 12.04 (Precise) is a Long-Term-Support release so this should be fixed.
When opening a dvdsub file the palette and language info is read from the ifo file. If the ifo contains multiple subtitle streams always the first one is picked up leading to potentially incorrect palette and language.
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.
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.
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.
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.
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)
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)
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).
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.
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.
java -jar BDSup2Sub.jar /tmp/20.ifo /tmp/output.idx
ERROR: Illegal argument: /home/mjuhasz/Downloads
See link for details: http://forum.doom9.org/showthread.php?p=1589231#post1589231
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.
Subtitles have incorrect length and they are not opaque after processing them with bdsup2sub. I have 2 dvds with 2 subtitles on each, and they all exhibit this behaviour.
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.
full report is here http://forum.doom9.org/showthread.php?p=1572392#post1572392
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.
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.
Options are:
Exluded Subtitles are still present when exporting to XML which results in errors while stepping through the frames, due the images have not been exported!
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
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.)
if u have to edit a lot of subtitles and need to check or uncheck a lot of settings/flags i would like to have the possibility to navigate with hotkeys.
I noticed a render/redraw bug after closing the "edit frame" window. the blue gradient background disappears until i resize the window.
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.
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.
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.
i think it was empty by default before?!
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.
In some rare cases the resolution read from the dvd is incorrect (lower than the actual resolution). This results in misaligned subtitles. The issue so far has been indicated by a "Subpicture too large" warning.
well it is sometimes a little bit anoying i have to rename the files first. maybe u should check the file's mime type to determine if it is compatible.
It is already possible to shift all subpictures.
This story is about selecting subpictures in a time interval and shift them. Conflicts (overlaps, etc.) should be resolved as well.
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.
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).
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.
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.
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.