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 > Capturing and Editing Video > New and alternative a/v containers

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 24th March 2009, 20:15   #801  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Yes. The header editor allows the user to edit the "segment info" and "track" headers. With it you can change existing values, add values for fields that are not currently present, and remove existing fields as long as they're not mandatory according to the specs.

When the header editor saves its changes to the file it will intelligently pick the best place to store the elements, overwrite any other existing element of the same kind (e.g. Haali's muxer can write the track headers at more than one place) in order to avoid ambiguity, and update the index (meta seek elements) to reflect all changes.

The part that takes quite some time is the initial file scanning phase when you open a file in the header editor. The editor will scan all level 1 elements (those are segment info, track headers, meta seek elements, but also all clusters) for their size and position. While this does not require reading the whole file it still takes a lot of time. This cannot be avoided.

At the moment the header editor also re-scans the file after having saved its changes. This is mainly a safety measure and not strictly neccessary. It will be removed in a future release so that saving the file only takes a second or two.

I should also issue a warning here: Even though I've spent many hours (at least ten) making sure my "save to existing file" algorithm doesn't screw up your files there may still be bugs left in it. So it might be wise to make a backup of important files before editing them, or at least try it on a couple of not so important files first.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.

Last edited by Mosu; 24th March 2009 at 20:18.
Mosu is online now  
Old 24th March 2009, 20:58   #802  |  Link
Liisachan
李姗倩 Lǐ Shān Qiàn
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Thanks for 2.6.0! I'm going to play with the header editor.
I'm not sure if this is exactly a great idea: The "simple" chapter extraction mode (OGM style chapter output) outputs strings converted to the system's
current charset by default now instead of always converting to UTF-8.

But if that makes other people happy...
And I can use explicit --output-charset anyway.
Liisachan is offline  
Old 24th March 2009, 21:02   #803  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
You could also just NOT use the simple chapter format Use the XML chapter format, that's always UTF-8 anyway. Aaaand it offers more features.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 24th March 2009, 22:33   #804  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by Mosu View Post
Yes. The header editor allows the user to edit the "segment info" and "track" headers. With it you can change existing values, add values for fields that are not currently present, and remove existing fields as long as they're not mandatory according to the specs.

When the header editor saves its changes to the file it will intelligently pick the best place to store the elements, overwrite any other existing element of the same kind (e.g. Haali's muxer can write the track headers at more than one place) in order to avoid ambiguity, and update the index (meta seek elements) to reflect all changes.

The part that takes quite some time is the initial file scanning phase when you open a file in the header editor. The editor will scan all level 1 elements (those are segment info, track headers, meta seek elements, but also all clusters) for their size and position. While this does not require reading the whole file it still takes a lot of time. This cannot be avoided.

At the moment the header editor also re-scans the file after having saved its changes. This is mainly a safety measure and not strictly neccessary. It will be removed in a future release so that saving the file only takes a second or two.
Thanks, sounds very good! I think this new functionality is really a worthwhile addition.

I'm wondering: Why do you have to read in all the clusters? Is that needed for meta seek updating or what?
madshi is offline  
Old 24th March 2009, 22:48   #805  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
As I said the scan process locates all level 1 elements. This is a pretty easy process: read the EBML ID, read the element size, seek to the end of the element. But most files use rather small clusters of 2 MB. So mmg reads eight bytes, skips 2 MB, reads eight bytes, skips 2 MB etc. This is not that fast, but not catastrophically slow either. Due to its nature it will be pretty slow when accessing files over a network, I guess.

On my PC this takes roughly a minute for a 1.4 GB file.

Quote:
I'm wondering: Why do you have to read in all the clusters? Is that needed for meta seek updating or what?
Yes. Matroska's flexible structure allows most header fields to not be present. So when you add a couple of fields mmg might not be able to fit the new headers into the space the old ones occupied. So it looks for the proper place to store them. This can be anywhere in the file with enough "free space".

Another reason is that there's the possibility that there is more than one occurence of the track headers, e.g. Haali's muxer can write multiple instances. Those have to be overwritten in order to not cause ambiguity between updated and not updated headers. As the level 1 elements are not always indexed by meta seek elements mmg has to scan the whole file.

I have an idea or two of how to make this process a bit faster by making certain assumptions as long as there are proper meta seek elements -- but I wanted to get it right first and fast later.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.

Last edited by Mosu; 24th March 2009 at 22:52.
Mosu is online now  
Old 25th March 2009, 07:43   #806  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
The installer still likes to take its time when adding/removing the path to the system variables on Vista. Appears (but doesn't) to hang while its doing so.
Snowknight26 is offline  
Old 25th March 2009, 11:59   #807  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Ok, cannot do anything about that though.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 25th March 2009, 20:27   #808  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
I noticed a small bug in mkvmergeGUI. When you use the job queue the "current job" progress bar doesn't show any progress. The bar that shows the finished jobs works fine.
nurbs is offline  
Old 25th March 2009, 20:34   #809  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Interesting bug. Which OS? Which language do you run mmg with?
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 25th March 2009, 20:55   #810  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Is sup support a possibility in the not so distant future?
turbojet is offline  
Old 25th March 2009, 21:02   #811  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Maybe, don't know yet. Are there specs available? Or source code for demuxers/decoders that can read those files?
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 25th March 2009, 21:22   #812  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Unfortunately I don't think there's any specs available and the best information I can get about them is that they contain compressed pictures by RLE

DVD sups are used by many authoring applications and can be demuxed by tools like pgcedit and ifoedit. Also just about every text sub/vobsub editor inputs dvd sups. When placed in a vob they can be decoded by many players without the use of an external decoder but I believe DirectVobSub can also decode these.

BD/HDDVD sups are gaining more and more software support. TSMuxer and eac3to demux subtitles to sup only. SupRip, BDSup2Sub, SupRead are sup editors/converters. TSMuxer/TSRemuX/TS4NP use them as input to mux to (m2)ts files. Only players I know of that can decode these are commercial BD players (PowerDVD, Showtime, WinDVD, Arcsoft, etc.) and MPC-HC which I believe uses an updated vsfilter.dll.

The reason I ask for the sup is so original subtitles can be used without relying on OCR.
turbojet is offline  
Old 25th March 2009, 21:30   #813  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
So no specs, no open source apps? Then I won't be spending time on them soon, sorry.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 25th March 2009, 21:55   #814  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Oh source code you were looking for didn't notice that. Here's some:
PGCDemux a dvd sup demuxer
MPC_HC SVN (hd)dvd\bd player\decoder
SubtitleCreator (hd)dvd sup editor\converter
DVDSubEdit dvd sup editor\converter
TSRemux remuxes BD with sup's

Also info on BD\HDDVD sup and some info on dvd sup here and here and here
turbojet is offline  
Old 25th March 2009, 22:00   #815  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Ah thanks a lot for the links. Now all I'd need would be some sample files. Preferably as TS or EVOs
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 25th March 2009, 22:03   #816  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Hmm, aren't those the same as vobsubs except that they haven't been extracted from the program streams?
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 25th March 2009, 22:38   #817  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Quote:
Originally Posted by Mosu View Post
Interesting bug. Which OS? Which language do you run mmg with?
Windows XP SP3, german.
nurbs is offline  
Old 25th March 2009, 22:41   #818  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
I'll take a look. Please try changing mmg's language to English and see if the progress works normally then.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Old 25th March 2009, 22:43   #819  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Your welcome.

BD sup

DVD sup

I don't have any HDDVD sup files here.

If you need the subs inside of a ts container I can upload it in about an hour when blankclip x264 encode finishes.

They may be like vobsub but sup supports things vobsub doesn't like adding a line to a current line without redrawing, different font/color in the same line, fades. VobSub isn't supported by any authoring programs as far as I know, sup is supported by all that I know of except scenarist which uses it's own proprietary scn format or plain bitmaps.

Last edited by turbojet; 25th March 2009 at 22:48.
turbojet is offline  
Old 25th March 2009, 22:47   #820  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Thanks for the samples.

What I'm wondering is if there's a need for the information that VobSub stores in the .idx files -- like palette information etc. Those are gathered from the IFO files if I'm not mistaken. Or is a sup substream enough for proper display?
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is online now  
Closed Thread

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 00:54.


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