Subler (like Muxo, maybe better?)

Random chit-chat and anything that doesn't belong elsewhere
Post Reply
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Subler (like Muxo, maybe better?)

Post by Ritsuka »

I wrote a small app to mux subtitles into mp4.
It can add subtitles tracks, delete them and that's it.
A few advantages over muxo:
- better srt parsing, handles overlapping subtitles.
- no double line on the appetv if the subtitle is only a line.

Well, try it and let me know :)

http://code.google.com/p/subler/
iJoel
Enlightened
Posts: 124
Joined: Sat Dec 20, 2008 7:25 am

Re: Subler (like Muxo, maybe better?)

Post by iJoel »

Nice work, I like the interface a lot better.
Simple, to the point.

I'll try using it on my next subtitle rip ^__^.
Any plans for a CLI version?
LinBrake
Experienced
Posts: 97
Joined: Tue Oct 07, 2008 7:39 am

Re: Subler (like Muxo, maybe better?)

Post by LinBrake »

Very nice work on this software. Muxo was an excellent start, but it was lacking in several areas. (Not complaining, just stating the fact it was far from feature complete.)

I haven't had a chance to test this just yet as I am out of town so I have a few questions if will indulge me. :)

1) Does the software correctly handle the "length" of subtitles or how does that function?

I have been attempting to hard code subtitles into files for some time how, but I always run into an issue where subtitles will end up being:

|------------------------------------------------------------------------------------------------------------|
wide when the screen is:
|-------------------------------------------------------------|
wide.

It is a real problem and what Googling I have done on your method of putting subtitles into the file hasn't really told me if they will wrap correctly or not.

2) What preparation (if any) is necessary to import the .srt file before it will correctly work with Subler?

3) Can you post the source code to the application and libraries behind it? I would like to help if I can as this is one area where I feel I may actually be able to contribute in a meaningful way.

Thank you in advance for any information.
realityking
Veteran User
Posts: 680
Joined: Tue Apr 24, 2007 12:36 pm

Re: Subler (like Muxo, maybe better?)

Post by realityking »

3) AFAIK mp4v2 is used. I think muxo alsu uses it.
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: Subler (like Muxo, maybe better?)

Post by jzietman »

I've tried removing a subtitle track from and re-adding it it a handbrake-encoded x264-in-m4v file, but I always get an error saying that another app has modified the file since it was opened (if this is true, it certainly hasn't been my doing, I've no other apps doing anything with the file), and then when I try to save, it says that it can't. I've tried Save As as well, but to no avail.

Ideas? What do you need to be able to diagnose the problem? Is there any kind of activity log produced by Subler?
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: Subler (like Muxo, maybe better?)

Post by refulgentis »

jzietman wrote:I've tried removing a subtitle track from and re-adding it it a handbrake-encoded x264-in-m4v file, but I always get an error saying that another app has modified the file since it was opened (if this is true, it certainly hasn't been my doing, I've no other apps doing anything with the file), and then when I try to save, it says that it can't. I've tried Save As as well, but to no avail.

Ideas? What do you need to be able to diagnose the problem? Is there any kind of activity log produced by Subler?
it automatically adds the track when you click ok on the open button for the SRT...so it *has* changed, in the sense that subler just changed it and you're saving it again :P
jzietman
Enlightened
Posts: 146
Joined: Mon Feb 04, 2008 3:29 pm

Re: Subler (like Muxo, maybe better?)

Post by jzietman »

Same goes for when I delete a track?
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Subler (like Muxo, maybe better?)

Post by Ritsuka »

LinBrake wrote: 1) Does the software correctly handle the "length" of subtitles or how does that function?
The length of the subtitle track is the same as the one of the video track.
LinBrake wrote: 2) What preparation (if any) is necessary to import the .srt file before it will correctly work with Subler?
No one, it uses the universal character detector from the mozilla project and the subtitles serialization routine from perian.
It should be quite robust.
LinBrake wrote: 3) Can you post the source code to the application and libraries behind it? I would like to help if I can as this is one area where I feel I may actually be able to contribute in a meaningful way.
I will upload the source code tomorrow.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Subler (like Muxo, maybe better?)

Post by Ritsuka »

jzietman wrote:Same goes for when I delete a track?
Yes, but it will change in the next version.
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: Subler (like Muxo, maybe better?)

Post by refulgentis »

Ritsuka wrote: The length of the subtitle track is the same as the one of the video track.
I had 3-4 SRTs I was adding to a seasons worth of TV episodes that actually went over the length of the video/audio, because the SRT itself had an additional scene in it that wasn't in my encode. This is easily fixable of course, but I thought I should point out that it does go past the length of the other tracks if you tell it to.
No one, it uses the universal character detector from the mozilla project and the subtitles serialization routine from perian.
It should be quite robust.
Wow, so I don't have to worry about making sure all my SRTs are UTF-8 now? (Quicktime/iTunes crashes on non-UTF8 encoding)
hh83917
Posts: 5
Joined: Sun Oct 14, 2007 3:08 pm

Re: Subler (like Muxo, maybe better?)

Post by hh83917 »

Is there anyway to get rid of the shaded background behind the subtitles? In Muxo or Subler? :?
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Subler (like Muxo, maybe better?)

Post by Ritsuka »

No, there is no way.
There is the old tx3g renderer, but it slows down everything and it has not been updated for core video.
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: Subler (like Muxo, maybe better?)

Post by rhester »

Out of curiousity, does Subler distinguish between subtitles and closed captions (by Apple's QuickTime definitions)?

Rodney
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Fat Nano w/ Subtitles

Post by cvk_b »

Here's some images of subtitles on my FATNANO made with Subler. Thanks!
Image
Image
Image
Image


…and the same file on the Apple TV Take 2.3
Image
Image


Code: Select all

mp4track --list Igor.m4v 
track[0] id=1
  type           = video
  enabled        = true
  inMovie        = false
  inPreview      = false
  layer          = 0
  alternateGroup = 0
  volume         = 0.0000
  width          = 823.00000000
  height         = 448.00000000
  language       = Undetermined
  handlerName    = 
  userDataName   = <absent>
track[1] id=2
  type           = audio
  enabled        = true
  inMovie        = true
  inPreview      = false
  layer          = 0
  alternateGroup = 1
  volume         = 1.0000
  width          = 0.00000000
  height         = 0.00000000
  language       = English
  handlerName    = 
  userDataName   = film
track[2] id=3
  type           = audio
  enabled        = false
  inMovie        = true
  inPreview      = false
  layer          = 0
  alternateGroup = 1
  volume         = 1.0000
  width          = 0.00000000
  height         = 0.00000000
  language       = English
  handlerName    = 
  userDataName   = comments
track[3] id=5
  type           = text
  enabled        = false
  inMovie        = true
  inPreview      = true
  layer          = 0
  alternateGroup = 0
  volume         = 0.0000
  width          = 0.00000000
  height         = 0.00000000
  language       = UNDEFINED(0)
  handlerName    = 
  userDataName   = <absent>
track[4] id=6
  type           = (sbtl)
  enabled        = true
  inMovie        = true
  inPreview      = false
  layer          = 0
  alternateGroup = 2
  volume         = 0.0000
  width          = 823.00000000
  height         = 60.00000000
  language       = English
  handlerName    = 
  userDataName   = <absent>
[/size]
LinBrake
Experienced
Posts: 97
Joined: Tue Oct 07, 2008 7:39 am

Re: Fat Nano w/ Subtitles

Post by LinBrake »

cvk_b wrote:Here's some images of subtitles on my FATNANO made with Subler. Thanks!
Image
Image
Image
Image


…and the same file on the Apple TV Take 2.3
Image
Image
Those are some fine looking images. :mrgreen:
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Re: Fat Nano w/ Subtitles

Post by cvk_b »

I know. Not good quality.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Subler (like Muxo, maybe better?)

Post by Ritsuka »

rhester wrote:Out of curiousity, does Subler distinguish between subtitles and closed captions (by Apple's QuickTime definitions)?

Rodney
Closed captions are a totally different beast. If i understand correctly QuickTime closed captions tracks are just a wrapper for Line 21 format, so it shouldn't be too hard to implement it if you got a file with the right data. But I live in a pal world and I never seen a dvd or tv channel with closed caption.
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: Fat Nano w/ Subtitles

Post by refulgentis »

cvk_b wrote:I know. Not good quality.
we can't see them, period :P
EDIT: that was odd...as soon as i posted i could, must have needed to reload
LinBrake
Experienced
Posts: 97
Joined: Tue Oct 07, 2008 7:39 am

Re: Subler (like Muxo, maybe better?)

Post by LinBrake »

It looks like you have already handled several modifications I was going to look into making. Very nice for the initial release. :D

Are you planning on looking into any of the following for the software or is this what you consider beyond the scope of the project?

1) Internal .ssa to .srt conversions.

Allow import of .ssa, software converts to .srt internally before handing off to other functions to add to the video.

2) Extracting subtitle tracks from mkv, ogm, or similar formats.

3) Closed Captions for media.

I assume this code is eventually intended to be merged into Handbrake at some time in the future when the appropriate modifications can be done. Is there any work you can point us to that would help further this effort? :)
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Subler (like Muxo, maybe better?)

Post by Ritsuka »

LinBrake wrote: 1) Internal .ssa to .srt conversions.

Allow import of .ssa, software converts to .srt internally before handing off to other functions to add to the video.
A lot of .ssa files are a mess (karaoke, moving text, multiple text lines that have nothing to do with dialogues), but maybe for simple ssa it maybe useful.
LinBrake wrote: 2) Extracting subtitle tracks from mkv, ogm, or similar formats.
No, it's not a feature I will add.
LinBrake wrote: 3) Closed Captions for media.
I'll look into this, it doesn't seem too difficult to add.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Subler (like Muxo, maybe better?)

Post by Ritsuka »

Btw, a new version if available on http://code.google.com/p/subler/ . The source code is still quite a mess but who cares :lol:

New feature in this release:
Save and Revert to Saved menu items are now working.
Added a way to change the language of tracks and the name (but the name will be saved only if the track already had a custom name).
refulgentis
Bright Spark User
Posts: 342
Joined: Mon Apr 14, 2008 5:08 am

Re: Subler (like Muxo, maybe better?)

Post by refulgentis »

Ritsuka wrote:Btw, a new version if available on http://code.google.com/p/subler/ . The source code is still quite a mess but who cares :lol:

New feature in this release:
Save and Revert to Saved menu items are now working.
Added a way to change the language of tracks and the name (but the name will be saved only if the track already had a custom name).
thanks for releasing the code :)
EDIT: going to Subler shows "Hide NewApplication" instead of Hide Subler. I'd attach a patch but its trivial :P
Also, I attempted opening mdia.minf.stbl.stsd in Dumpster to set fontsize, but Dumpster says there is only one sample and just shows a lot of blank empty space. Is this a bug in Subler or Dumpster?
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: Subler (like Muxo, maybe better?)

Post by nightstrm »

I imported an SRT using Subler to a recent HB encode, and noticed that iTunes/QT doesn't seem to display three-line subtitle blocks. The AppleTV seems to by combining lines 2+3. Does this go along with what others are seeing, and is there a way to make these display properly in iTunes?
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Subler (like Muxo, maybe better?)

Post by Ritsuka »

Yup Quicktime is limited to two line. You can edit the srt and split the long line.

refulgentis: fixed ;)
Dumpter ìs bug, but the fontsize is ignored like everything else.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: Subler (like Muxo, maybe better?)

Post by nightstrm »

Ritsuka wrote:Yup Quicktime is limited to two line. You can edit the srt and split the long line.
Is there a character limit per line for Quicktime? (Sorry, not directly related to Subler, but it's easier to just ask here.)
Post Reply