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. |
26th April 2019, 08:59 | #361 | Link |
Registered User
Join Date: Oct 2014
Posts: 476
|
I've uploaded a PAL DVD .VOB to your FTP that exhibits some weird behavior. The weirdness I'm seeing when trying to frame serve this is probably due to bugs in LSMASH and FFMS2, but I've just never seen LSMASH behave this way.
Muxing this VOB to mkv with mkvtoolnix ends up with a weird mediainfo that claims variable frame rate and 47.867 FPS. From the mkv, LWLibavVideoSource will frame serve 54099 frames with a seemingly random duplicate frame pattern, while it shows 28255 frames with no dupes when used on the VOB. FFMS2 locks up on both the mkv and VOB, and shows 54099 frames from the mkv and 28254 from the VOB. DGDecode shows 28255 frames on the VOB or demuxed mpeg from the mkv. There's no problem playing either the mkv or VOB in MPC-HC. |
26th April 2019, 11:41 | #362 | Link |
Matroska find' ich toll
Join Date: Apr 2008
Posts: 1,370
|
SegmentInfo
Hi Mosu
It seems the SegmentInfo.dtd is not correct, but mkvmerge handles the structure correctly. SegmentFamily ist marked with a "?" (no or one times) but it can added multiple times, the asterisk sign (SegmentFamily*) should be used. And the ChapterTranslateEditionUID has no extra sign but it should also have the asterisk sign (ChapterTranslateEditionUID*). Some question about the Info elements: Mkvmerge can use all Info elements which are available in the info.XML. Mkvpropedit can edit all this elements too? And additionally I can edit some more elements like the Info Title.? And then there are some elements which can't be edited, this values are written while mkvmerge mux the mkv file. - Duration - DateUTC - MuxingApp - WritingApp The TimestampScale element can be set before I mux an mkv. Is this only possible with a command line switch? Best regards hubble |
26th April 2019, 14:34 | #363 | Link | |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
A question about the value of a track-specific BPS tag
Hi, Mosu.
I have an Ogg Vorbis file, 15188168 bytes, 1448.447 sec (69525456 samples in 48000 Hz), that is 83887 bps (~84 kbps). When I mux it into MKV using mkvmerge v33.1.0, a SimpleTag with TagName BPS is automatically written for the corresponding audio track, and its value is 82787 (~83 kbps), which I can't change even if I use a tags.xml file with: Code:
<Simple><Name>BPS</Name><String>83887</String></Simple> Sorry if this has been already asked and answered. I did some search and read your changelog entry dated on 2014-05-20, which states: Quote:
|
|
26th April 2019, 16:15 | #364 | Link |
Registered User
Join Date: May 2016
Posts: 197
|
@Liisachan: The statistics are for the actual data contained in the track in MKV. They do not consider MKV container overhead; and they also do not consider the overhead of the Ogg container (which is usually higher than Matroska overhead). Your other number (for the ogg vorbis file) probably has the ogg container overhead included in its calculation.
@kuchikirukia: First: mkvmerge's code for MPEG-2 is old, buggy and unsupported. So even if there were a bug in mkvmerge, it wouldn't get fixed. That being said, I don't have a reason to think that there is buggy behaviour by mkvmerge here. Here is some background: A coded picture in MPEG-2 can either be a coded field or a coded frame (and frames needn't be progressive).* Matroska contains blocks and mkvmerge puts each picture in one block. What MediaInfo reports as FPS is in reality the block count per second. So here are the numbers for your sample: Your sample contains 28255 frame-equivalents (i.e. two coded fields are counted as one frame here). 2*28255-54099 = 2411 of these are coded frames, while 28255-2411 = 25844 are encoded as coded fields (so there are 51688 coded fields). So the block-rate is 54099 / (2411 + 25844) * 25 = 47.8667. It seems that your tools output two frames for each pair of two coded fields when the container is Matroska. I remember such bugs from H.264. You can report these bugs, of course (but they are not new), but in the meantime you should simply use another container if you work with the said tools. *: Furthermore, these pictures can contain flags that say that they should be output more than once; the most common application is for coded frames to be output as three fields (i.e. one field output twice). That way one can encode progressive material as 24/1.001p on a DVD and output it as 60/1.001i for compability with legacy CRT (and modern equipment designed for progressive material can get the actual progressive video). This is used on NTSC DVDs, but not for PAL DVDs and therefore you can ignore it. |
26th April 2019, 18:11 | #365 | Link |
李姗倩 Lǐ Shān Qiàn
Join Date: Nov 2002
Posts: 1,340
|
@mkver
Thanks! That makes sense. In the past I could manually write a BPS tag via an xml file, and back then I simply wrote file_size_in_bits / duration_in_sec as BPS value -- which is also the bitrate reported by oggenc (the ogg container overhead being included, like you said). As such, the definition of BPS value is now incompatible with that of my old MKV files, and I was a bit confused when I noticed that I can no longer explicitly write a BPS tag via xml. Still, if this is by design, I'm fine with that. A 1 kbp/s difference is not a big deal, and most players/tools probably don't read BPS tags anyway Edit 2019-09-30 In the specs https://matroska.org/technical/specs...ex.html#BitsPS it is clearly stated that BPS is only the data in the Blocks, and excludes headers and any container overhead. EDIT2 2019-11-25 If needed, however, you can write a BPS tag freely as you like, by using --disable-track-statistics-tags For example, you might want to make its value 85000 or 85272.4 or whatever, instead of 85272. Last edited by Liisachan; 25th November 2019 at 02:29. Reason: added some info |
8th May 2019, 04:19 | #367 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Matroska supports S_VOBSUB subtitles. These are typically named as ".sub" files when demuxed. See here for details and limitations.
https://matroska.org/technical/specs...es/images.html I don't know anything about MicroDVD. |
10th May 2019, 09:47 | #368 | Link |
Registered User
Join Date: Sep 2005
Posts: 178
|
I've been working on transcoding some streams in some of my mkv files, and in doing so, I've discovered that several audio streams have a delay compared to the video. This by itself isn't surprising, but what is shocking is that I can't see anywhere this delay is indicated in mkvinfo. Even adding the original file into mkvmerge's GUI shows no delay on these tracks, when there definitely is one; sync is lost without it, and MediaInfo shows a "Delay relative to video" with a positive value for certain audio tracks.
I messed around with -v and -t to mkvinfo, but if either is used, I am inundated with output, and I'm not sure if any of it even shows the delay. How does MediaInfo get this value, and is there some CLI program that will show it to me? I've got literally hundreds of these files, and using a GUI application to look at each one is impractical. |
10th May 2019, 11:01 | #369 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Read: MKVToolNix FAQ: Delay not shown in the GUI
Code:
mkvmerge -J "file.mkv" You can also see it in the Info tool: (Here it's 123ms-20ms=103ms audio "delay relative to video". Of course there's the question of whether or not your workflow is good. If you always work under the assumption that video starts at 0ms and that video and audio tracks are constant framerate it may fail if those aren't true (Matroska supports variable framerates). I also see people needlessly demux e.g. audio tracks instead of just reading them from the mkv file directly when remuxing. When transcoding tracks I would get rid of delays anyways (fill with silence/blackness or remove). Last edited by sneaker_ger; 10th May 2019 at 11:25. |
10th May 2019, 18:13 | #370 | Link |
Registered User
Join Date: Sep 2005
Posts: 178
|
So, if I understand correctly, in the mkvinfo -v output, the lines I'm looking for are the first instance of:
Code:
Simple block: key, track number X I don't see much point in adding silence though, other than to simplify future transcoding. Since that won't happen, I'm not going to worry about it. Edit: Hrm, I'm not sure what VFR has to do with this though. All the timestamps are in seconds, so why would the audio delay in any way relate to the frame rate? Edit2: Seems subtitle tracks either lack the "Simple block: key..." line in the output, or it's optional. Anyway, I have the script working to parse the offsets correctly and can now adjust the delay in muxing accordingly. Thanks! Last edited by `Orum; 10th May 2019 at 20:01. |
10th May 2019, 22:06 | #371 | Link | |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Quote:
Maybe in your case it's sufficient or even makes sense. I don't know enough about your workflow or sources. Just my 2 cents .. |
|
11th May 2019, 08:55 | #372 | Link | |
Registered User
Join Date: Sep 2005
Posts: 178
|
I'm only transcoding audio, but if I were to do video, I'd check if it's VFR and if so, export & reimport the timecode. All tracks that are not transcoded are taken directly from the original mkv in mkvmerge, which I believe maintains everything in the original (such as timecode) without being explicitly told to do so, though I'd have to check with some VFR footage to verify this.
As for delay, it sounds like it can be done without SimpleBlocks? If so, what do I have to look for? Quote:
Edit: I did notice that one can simply export the timecode for each stream via mkvextract, and look at the first value in the timecode to determine offset as well. Is this more reliable to determine the delay? Last edited by `Orum; 11th May 2019 at 09:01. |
|
11th May 2019, 09:03 | #373 | Link | ||
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Quote:
For audio I would usually use ffmpeg or eac3to (+maybe some external encoder like qaac) which can read directly from mkv and "fix" the delay and any gaps while at it. So I don't see any need to parse mkvinfo at all. (Again: I don't know your reasons/workflow. Maybe you need different software or have other reasons.) Quote:
No, mkvinfo has the same info as other software. |
||
11th May 2019, 19:17 | #374 | Link |
Registered User
Join Date: Oct 2013
Posts: 205
|
Is there a way to do this inside MKVToolnix? If the answer is yes, how?
- Let's say I have an audio track (and we will say this is track #2) that in certain scenes needs the subtitles to be enabled in the Matroska. You know, scenes spoken in another language, that sort of thing. I already created a subtitle for these parts, and added to the Matroska. Obviously the subtitle file has only text for THESE SCENES. The rest of the movie is not covered by it. What I want to find out is if: a) I select the audio track #2; Then b) My player will automatically switch to the subtitle I created, even if it's already using another one. That way when a) is selected b) will follow, meaning the player will automatically refer a) to b) while I am using Media Player Classic. Meaning even if I select a different subtitle the fact I selected a) will switch the current subtitle selected to... b) |
11th May 2019, 19:32 | #375 | Link | |
Registered User
Join Date: Sep 2005
Posts: 178
|
Quote:
In any case, as I've never seen this (and only seen silence added at the beginning/end), I'm not going to worry about it. In those edge cases, transcoding should probably be done with eac3to as you mention, at least initially. I'll have to do more research into mkv to understand what other methods can be used, but at so far all of mine appear to be able to get the relative delay between video and audio by parsing it. So you want to automatically switch subtitle tracks when the audio track is switched? As far as I'm aware, that's not possible, at least within the mkv file itself. It might be possible with some playback software, but you might need some weird way to try and determine which sub track to use for which audio stream. Last edited by `Orum; 11th May 2019 at 19:40. |
|
11th May 2019, 19:47 | #376 | Link | |
Matroska find' ich toll
Join Date: Apr 2008
Posts: 1,370
|
Quote:
Or you can use TRACKSETEX, but you need Haali Splitter. It works perfect with MPC-HC. I work currently on a Github project Matroska-Playback (early state) and here some info about TRACKSETEX and ChapterTrack element. Last edited by hubblec4; 12th May 2019 at 11:30. |
|
12th May 2019, 05:11 | #377 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
Quote:
(possibly /probably generated by lousy screencast software...): https://forum.doom9.org/showthread.p...79#post1513679 Last edited by filler56789; 12th May 2019 at 05:33. Reason: grammar :-/ |
|
12th May 2019, 08:59 | #378 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,341
|
Audio with gaps is generally just considered "broken", since it'll easily result in an audible glitch, or result in running out of sync with the video if the player assumes that audio should not have gaps.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
16th May 2019, 15:07 | #379 | Link |
MKVToolNix author
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
|
At the moment I don't have concrete plans for working on Dolby Vision. I acknowledge that HDR technologies are important, and I will most likely spend time on those topics in the future, just not soon.
__________________
Latest MKVToolNix is v83.0 If I ever ask you to upload something, please use my file server. |
16th May 2019, 15:09 | #380 | Link |
MKVToolNix author
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
|
I don't support MPEG-2 video & VOBs anymore. I would accept patches fixing problems, but I won't spend time on them myself.
__________________
Latest MKVToolNix is v83.0 If I ever ask you to upload something, please use my file server. |
Tags |
matroska |
Thread Tools | Search this Thread |
Display Modes | |
|
|