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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th July 2020, 19:53   #821  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
How to properly mux 29.97 fps interlaced avc content with mkvmerge?

My source is interlaced AVC (duration: 00:00:41.542) and using:
Code:
mkvmerge --ui-language en -o "E:\Output\avc - interlaced_new_new.mkv" --global-tags "E:\Output\avc - interlaced_new_new_2020-07-05@20_21_37_3510__03.xml" -d 0 --default-track 0:yes XXXXXXX--fourcc 0:MP4V --no-chapters --compression -1:none --forced-track 0:yes --no-audio --no-subtitles "E:\Output\avc - interlaced_new_new_2020-07-05@20_21_37_3510_02.264" --default-track 0:yes --sync 0:-67 --forced-track 0:no -a 0 --compression -1:none --no-video --no-subtitles --no-chapters "E:\Output\iId_1_aid_4352_DELAY_-67ms_2020-07-05@20_21_37_3510_01.ac3"
as a base (and replacing the XXXXXXX):

I get:
when using:
Code:
--default-duration 0:30000/1001i --fix-bitstream-timing-information 0
Quote:
Frame rate mode : VFR
Frame rate mode : Variable
Frame rate : 29.970
Frame rate : 29.970 (30000/1001) FPS
FrameRate_Num : 30000
FrameRate_Den : 1001
Original frame rate : 14.985
Original frame rate : 14.985 (15000/1001) FPS
FrameRate_Original_Num : 15000
FrameRate_Original_Den : 1001
Duration : 00:01:23.083
when using:
Code:
--default-duration 0:60000/1001i --fix-bitstream-timing-information 0
Quote:
Frame rate mode : VFR
Frame rate mode : Variable
Frame rate : 59.940
Frame rate : 59.940 (59940/1000) FPS
FrameRate_Num : 59940
FrameRate_Den : 1000
Original frame rate : 29.970
Original frame rate : 29.970 (30000/1001) FPS
FrameRate_Original_Num : 30000
FrameRate_Original_Den : 1001
Duration : 00:00:41.542
when using:
Code:
--default-duration 0:30000/1001fps --fix-bitstream-timing-information 0
Quote:
Frame rate mode : VFR
Frame rate mode : Variable
Frame rate : 59.940
Frame rate : 59.940 (59940/1000) FPS
FrameRate_Num : 59940
FrameRate_Den : 1000
Original frame rate : 29.970
Original frame rate : 29.970 (30000/1001) FPS
FrameRate_Original_Num : 30000
FrameRate_Original_Den : 1001
Duration : 00:00:41.542
when using:
Code:
--default-duration 0:60000/1001fps --fix-bitstream-timing-information 0
Quote:
Frame rate mode : VFR
Frame rate mode : Variable
Frame rate : 119.884
Frame rate : 119.884 FPS
Original frame rate : 60.000
Original frame rate : 60.000 FPS
Duration : 00:00:20.770
when using:
Code:
--default-duration 0:30000/1001fps
Quote:
Frame rate mode : Variable
Frame rate : 59.940
Frame rate : 59.940 (59940/1000) FPS
FrameRate_Num : 59940
FrameRate_Den : 1000
Original frame rate : 29.970
Original frame rate : 29.970 (30000/1001) FPS
FrameRate_Original_Num : 30000
FrameRate_Original_Den : 1001
Duration : 00:00:41.542
when using:
Code:
--default-duration 0:30000/1001i
Quote:
Frame rate mode : Constant
Frame rate : 29.970
Frame rate : 29.970 (30000/1001) FPS
FrameRate_Num : 30000
FrameRate_Den : 1001
Duration : 00:01:23.083
when using:
Code:
--default-duration 0:60000/1001fps
Quote:
Frame rate mode : Variable
Frame rate : 119.884
Frame rate : 119.884 FPS
Original frame rate : 29.970
Original frame rate : 29.970 (30000/1001) FPS
FrameRate_Original_Num : 30000
FrameRate_Original_Den : 1001
Duration : 41 s 501 ms
when using:
Code:
--default-duration 0:60000/1001i
Quote:
Frame rate mode : Variable
Frame rate : 59.940
Frame rate : 59.940 (59940/1000) FPS
FrameRate_Num : 59940
FrameRate_Den : 1000
Original frame rate : 29.970
Original frame rate : 29.970 (30000/1001) FPS
FrameRate_Original_Num : 30000
FrameRate_Original_Den : 1001
Duration : 00:00:41.542
So none of the above seem to totally correct, what I was aiming for was:
Quote:
Frame rate mode : Constant
Frame rate : 29.970
Frame rate : 29.970 (30000/1001) FPS
FrameRate_Num : 30000
FrameRate_Den : 1001
Duration : 00:00:41.542
What am I missing? How to do it correctly?

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 6th July 2020, 11:23   #822  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,281
"--default-duration 0:30000/1001i" should be the correct one. Yes, for interlaced content the track's "default duration" must be half the duration compared to progressive content (meaning other tools might show that as double the frame rate). Remember, Matroska doesn't have a header field for a progressive frame rate; it only has a field that tells the default duration of a single Matroska frame — whatever that "Matroska frame" might contain. For interlaced video content it's a single field, and a single field is shown half as long as a full progressive frame, obviously.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is offline   Reply With Quote
Old 6th July 2020, 16:10   #823  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Confused,...when using "--default-duration 0:30000/1001i" I get:
Code:
Frame rate mode : Constant
Frame rate : 29.970
Frame rate : 29.970 (30000/1001) FPS
FrameRate_Num : 30000
FrameRate_Den : 1001
Duration : 00:01:23.083
which doubles the playback time and any play I used plays the video at half the speed.
Shouldn't it be "--default-duration 0:60000/1001i" then?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 6th July 2020, 19:02   #824  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Also got another issue, using 'mkvmerge v48.0.0.16 ('Fortress Around Your Heart') 64-bit' (same happens with 48.0.0.0)
and
Code:
mkvmerge --ui-language en -o "C:\Users\Selur\Desktop\In The Dark.track.mkv" -d 0 --default-track 0:yes --default-duration 0:50/1i --aspect-ratio-factor 0:1/1 --fourcc 0:MP4V --no-chapters --compression -1:none --forced-track 0:yes --no-audio --no-subtitles "C:\Users\Selur\Desktop\In The Dark.track.264"
the output seems to be only the header without any content. :/
console output doesn't show any errors.
Code:
mkvmerge v48.0.0.16 ('Fortress Around Your Heart') 64-bit
'C:\Users\Selur\Desktop\In The Dark.track.264': Using the demultiplexer for the format 'AVC/H.264'.
'C:\Users\Selur\Desktop\In The Dark.track.264' track 0: Using the output module for the format 'AVC/H.264 (unframed)'.
The file 'C:\Users\Selur\Desktop\In The Dark.track.mkv' has been opened for writing.
Progress: 100%
Uploaded the source .264 file to my GoogleDrive (176MB)
(using --default-duration 0:25fps instead of --default-duration 0:50/1i doesn't change the output,...)

Cu Selur

Ps.: I suspect the source file is somehow broken, the raw stream plays fine in mpc-hc, but neither mkvmerge nor ffmpeg can remux it into a container,... :/
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 6th July 2020 at 19:44.
Selur is offline   Reply With Quote
Old 6th July 2020, 23:29   #825  |  Link
arrgh
Registered User
 
Join Date: Dec 2007
Posts: 128
demuxing and remuxing mvc-mkv (3D)

if I demux with mkvextract.exe an 3D-MKV, created with MakeMKV, I get an "AVC" file of about the correct size (you might be aware of DGDemux which can demux from the BluRay the h264 and the mvc streams into separate files; the combined file sizes are in the fitting size range of the avc);

but it doesn't seem to be possible to remux this "avc" file with mkvmerge back to a working mvc-mkv (even with a manually set Stereoscopy-Tag);

on the other hand MediaInfo recognizes this avc file as “multiview”…
and a remux with the video taken directly out of the "original" mkv (without prior demuxig) does work...

what additional setting do I need to do? Or is there a bug in mkvextract, so that certain details of the video stream are lost?
Thanks
arrgh is offline   Reply With Quote
Old 7th July 2020, 13:33   #826  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,281
mkvmerge doesn't support reading MVC from anything but other Matroska files yet. See this issue for general support for 3D Blu-rays and this other issue for MVC data in raw h.264 elementary streams for details.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is offline   Reply With Quote
Old 7th July 2020, 21:27   #827  |  Link
arrgh
Registered User
 
Join Date: Dec 2007
Posts: 128
"yet" has a good sound to it...
I don't know whether the problem is on the "extract" or the "merge" side, but is it difficult to solve it? will it be solved?
I have seen in the second thread that you mention some changing standards... is there a risk that what did work up to now (reading MVC from MKV) might stop working in future?
arrgh is offline   Reply With Quote
Old 7th July 2020, 22:34   #828  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,281
I'm not particularly interested in spending time on 3D stuff, haven't been for years. So that "yet" is definitely not a sign of things becoming supported soon, if ever.

The problem is on the merge side, not the extraction.

To the best of my knowledge the changes to the standard won't affect playback of existing files.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is offline   Reply With Quote
Old 7th July 2020, 22:45   #829  |  Link
arrgh
Registered User
 
Join Date: Dec 2007
Posts: 128
Quote:
Originally Posted by Mosu View Post
...
The problem is on the merge side, not the extraction.
...
so, it seems to be very difficult to "emulate" the mkv-container environment on a primary stream containing all relevant data of the mkv in a way that that the remux would work?

the background of this is: even if the interlacing of the h264 and the mvc into a unified video steam would be done by a third party, mkvmerge would not support the muxing into a mkv file?
arrgh is offline   Reply With Quote
Old 8th July 2020, 08:57   #830  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,281
"Problem" was the wrong word. "Difficult" isn't the right word either. I simply haven't implemented the functionality yet. It would most likely not be "difficult", just time consuming. That mkvmerge doesn't "support" it is simply due to that the time to implement it hasn't been spent yet.

Please don't try to read anything more into my statement than "I'm not motivated to spend time on this feature".
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is offline   Reply With Quote
Old 8th July 2020, 11:50   #831  |  Link
mkver
Registered User
 
Join Date: May 2016
Posts: 197
Quote:
Originally Posted by Selur View Post
Also got another issue, using 'mkvmerge v48.0.0.16 ('Fortress Around Your Heart') 64-bit' (same happens with 48.0.0.0)
and
Code:
mkvmerge --ui-language en -o "C:\Users\Selur\Desktop\In The Dark.track.mkv" -d 0 --default-track 0:yes --default-duration 0:50/1i --aspect-ratio-factor 0:1/1 --fourcc 0:MP4V --no-chapters --compression -1:none --forced-track 0:yes --no-audio --no-subtitles "C:\Users\Selur\Desktop\In The Dark.track.264"
the output seems to be only the header without any content. :/
console output doesn't show any errors.
Code:
mkvmerge v48.0.0.16 ('Fortress Around Your Heart') 64-bit
'C:\Users\Selur\Desktop\In The Dark.track.264': Using the demultiplexer for the format 'AVC/H.264'.
'C:\Users\Selur\Desktop\In The Dark.track.264' track 0: Using the output module for the format 'AVC/H.264 (unframed)'.
The file 'C:\Users\Selur\Desktop\In The Dark.track.mkv' has been opened for writing.
Progress: 100%
Uploaded the source .264 file to my GoogleDrive (176MB)
(using --default-duration 0:25fps instead of --default-duration 0:50/1i doesn't change the output,...)

Cu Selur

Ps.: I suspect the source file is somehow broken, the raw stream plays fine in mpc-hc, but neither mkvmerge nor ffmpeg can remux it into a container,... :/
This file doesn't contain anything marked as key frame. Use --engage all_i_slices_are_key_frames.
mkver is offline   Reply With Quote
Old 9th July 2020, 17:53   #832  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Thanks a lot didn't even know that opiton existed.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 9th July 2020, 21:09   #833  |  Link
arrgh
Registered User
 
Join Date: Dec 2007
Posts: 128
mvc

Quote:
Originally Posted by Mosu View Post
...
To the best of my knowledge the changes to the standard won't affect playback of existing files.
I was not refering only to playback but also to remuxing of mkv from existing mvc-mkv
arrgh is offline   Reply With Quote
Old 9th July 2020, 21:23   #834  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,281
Quote:
Originally Posted by arrgh View Post
I was not refering only to playback but also to remuxing of mkv from existing mvc-mkv
If I ever decide to implement support for MVC in mkvmerge, it will include being able to read files written before the aforementioned change to the specs.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is offline   Reply With Quote
Old 10th July 2020, 18:06   #835  |  Link
arrgh
Registered User
 
Join Date: Dec 2007
Posts: 128
mvc

Quote:
Originally Posted by Mosu View Post
If I ever decide to implement support for MVC in mkvmerge, it will include being able to read files written before the aforementioned change to the specs.
good!

meanwhile there is a tool available, which is part of the DGDemux package, which can interlace the primary h264 stream and the mvc stream into a unified h264 multiview stream;
I was able to mux with tsmuxer a working ISO with such a file.

I would therefore like to ask you to implement the muxing of such interlaced streams into a mkv. I could provide samples...

Thanks
arrgh is offline   Reply With Quote
Old 20th July 2020, 05:03   #836  |  Link
ssjkakaroto
Registered User
 
ssjkakaroto's Avatar
 
Join Date: Oct 2001
Location: River of Flame
Posts: 204
Hi mosu, I'm having a small issue with mkvtoolnixgui v48, which didn't happen with v47.

In a dual-monitor setup, if mkvtoolnixgui is on the secondary monitor and you click on the arrow of "Add job to queue", the menu will appear on the primary monitor.
You can see it here:
v48: https://imgur.com/a/EClTVGV
v47: https://imgur.com/a/TzZXeJL

OS is Windows 7 x64.

Thanks
ssjkakaroto is offline   Reply With Quote
Old 20th July 2020, 13:12   #837  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,281
I don't support Windows 7 anymore.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is offline   Reply With Quote
Old 21st July 2020, 02:49   #838  |  Link
ssjkakaroto
Registered User
 
ssjkakaroto's Avatar
 
Join Date: Oct 2001
Location: River of Flame
Posts: 204
Sure, except it also happens on Windows 10 (Pro x64 version 1909): https://imgur.com/a/ZIjTgTy
ssjkakaroto is offline   Reply With Quote
Old 21st July 2020, 15:25   #839  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,281
I see. That's a bug in Qt, then. Nothing I can do about it.
__________________
Latest MKVToolNix is v83.0

If I ever ask you to upload something, please use my file server.
Mosu is offline   Reply With Quote
Old 27th July 2020, 23:20   #840  |  Link
Perenista
Registered User
 
Join Date: Oct 2013
Posts: 207
I've been putting AVI files into MKV using MKVtoolnix and nothing wrong happened... until now. Audio is out of sync.

I checked the original AVI and there is no issue with it. So putting in MKV changed that. What is wrong here?

This is the MEDIAINFO from the AVI:

https://pastebin.com/gDiDdWEG

And from the MKV with this error:

https://pastebin.com/TbRDzeKb

EDIT: I checked the log for errors and found this:

'C:\Users\XXXXX\Desktop\FILE.avi' track 1: This audio track contains 3344 bytes of invalid data which were skipped before timestamp 00:16:34.664000000. The audio/video synchronization may have been lost.
'C:\Users\XXXXX\Desktop\FILE.avi' track 1: This audio track contains 1214 bytes of invalid data which were skipped before timestamp 00:16:38.296000000. The audio/video synchronization may have been lost.
'C:\Users\XXXXX\Desktop\FILE.avi' track 1: This audio track contains 63 bytes of invalid data which were skipped before timestamp 00:16:38.322000000. The audio/video synchronization may have been lost.
'C:\Users\XXXXX\Desktop\FILE.avi' track 1: This audio track contains 405 bytes of invalid data which were skipped before timestamp 00:16:38.348000000. The audio/video synchronization may have been lost.
'C:\Users\XXXXX\Desktop\FILE.avi' track 1: This audio track contains 122 bytes of invalid data which were skipped before timestamp 00:16:38.426000000. The audio/video synchronization may have been lost.
'C:\Users\XXXXX\Desktop\FILE.avi' track 1: This audio track contains 1358 bytes of invalid data which were skipped before timestamp 00:16:38.452000000. The audio/video synchronization may have been lost.
'C:\Users\XXXXX\Desktop\FILE.avi' track 1: This audio track contains 1254 bytes of invalid data which were skipped before timestamp 00:16:38.557000000. The audio/video synchronization may have been lost.

Invalid data? I can play the original AVI without any issues. At 16:34 and 16:38 the image freezes for less than a second, so there must be some flaw in the file itself, I mean a failure like a broadcast transmission breaking and the image gets fuzzy *. Even so the whole thing continues and I confirmed it's only MKVToolnix that is rejecting this error when I put the content in MKV.

* https://i.imgur.com/hU9C3pe.jpg

I'll try extracting the MP3 with VirtualDubMOD and then adding to see if things change.

>>>>>
Update: it didn't work. I tried creating a MKV with the video stream (and the new subtitle I added) only. OK, no errors in the log. But when I added the MP3 extracted from the AVI they were there again.

That means the problem is not with the video, it's with the audio.

Even so, the question remains:

- Why MKVToolnix can't create a MKV with this error, and without losing sync?
- If it can, how do I enable that option?

Any suggestions to fix this? Despite the fact the original AVI file doesn't need fixing since it can be watched synchronized.

*******************

Update: just checked another file and when this problem happens the MKV created by MKVToolnix simply skips the defective part, making the audio jump. That's what makes the audio becoming out of sync. If I let the content in the original AVI this doesn't happen.

Unfortunately this is how MKVToolnix works, when it should leave the file as it is. So I am forced to watch the file in AVI, otherwise I will break it even more.

Correction: I checked two more files that had the same issue and they didn't lose sync, but in one of them the audio jumped (it cuts abruptly to the next second corrected) as I said before. They probably didn't lose sync because for them the flaw was seen quicker than the other ones that were way more corrupted.

>>>>>>>>>>>>

This situation is pretty much what happens when we play a vinyl (LP) and there's skipping.

LPs sound great when in good condition. Records can suffer from all sorts of deterioration, much of it causing unwanted skipping or audio distortion. Some of these problems can be remedied, while others, are permanent. One of the main problems of older records are that they skip, or have lots of crackling and popping when playing. This is a common problem when attempting to convert records to CD or MP3 files.

What MKVToolnix does is to make us notice the problem even further.

What I wanted: that MKVtoolnix displayed the AVI just like it is displayed before putting the same AVI into a MKV container.

In other words, that MKVToolnix ignored the error completely and didn't change anything.

I can only assume this is impossible in the AVI --------- > MKV conversion.

Last edited by Perenista; 1st August 2020 at 20:41.
Perenista is offline   Reply With Quote
Reply

Tags
matroska


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 01:32.


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