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

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th May 2020, 22:43   #781  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 293
According to this page, "Since Windows 8 and Windows Server 2012 newly formatted volumes will have 8.3 name generation disabled by default." So GetShortPathName() is not a reliable workaround.
lvqcl is offline   Reply With Quote
Old 30th May 2020, 23:53   #782  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by lvqcl View Post
According to this page, "Since Windows 8 and Windows Server 2012 newly formatted volumes will have 8.3 name generation disabled by default." So GetShortPathName() is not a reliable workaround.
Here in the terminal short paths work, apparently using UTF8 as code page is better anyway because only then Emoji show in the terminal.

stax76 is offline   Reply With Quote
Old 31st May 2020, 11:17   #783  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
I'm aware of GetShortPathName(), and I do have experimental code that re-tries with the short path name if opening with the regular one fails. The problem is: it doesn't actual solve the problem. It's not even a good workaround. It's a workaround that works _sometimes_ under _specific circumstances_. For example: It doesn't work if the file system doesn't store short path names. It doesn't work on network drives.

Sooooo… no.
__________________
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 1st June 2020, 09:49   #784  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Quote:
Originally Posted by Liisachan View Post
It's unfortunate that FLAC support is limited; one doesn't have this problem if WavPack is used instead?
Nope. Neither do the other supported, lossless formats: ALAC & TrueAudio. Neither of the three formats has the same type of unfortunate design decisions that FLAC does.

Note that support for files created by WavPack5 is currently slightly broken. Just within the last couple of hours a PR was opened to fix those issues, though, and the next MKVToolNix release will handle them correctly.
__________________
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 1st June 2020, 21:25   #785  |  Link
Liisachan
李姗倩 Lǐ Shān Qiān
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Quote:
Originally Posted by Mosu View Post
Neither of the three formats has the same type of unfortunate design decisions that FLAC does.
Is the design of FLAC somehow strange? Hypothetically, what if one uses flac --ogg to write it as .oga? The current version of MKVToolNix doesn't support it, but it's an Ogg so MKVToolNix could read it alright in theory and handle it right? If so, maybe you could store FLAC as ogg, or would that simply confuse splitters/players and the resulted MKV wouldn't play even if one could create it?

As for GetShortPathName(), like you know very well, the resulted string is char* encoded in a Window-specific "ANSI" code page, after WideCharToMultiByte(CP_ACP); so even if short paths are enabled, they do not play nicely with a pure ASCII library not written specifically for Windows. For one thing, if the code page is Asian, the char string may contain the same byte as a backslash as the 2nd byte of a multi-byte character.

But unlike others say, using the short path name for a Unicode file name is often a usable workaround *IF* you're using a legacy non-Unicode program written for Windows; e.g. AVISource() in .avs can open Unicode.avi this way [though of course FFVideoSource(utf8=true) may be more elegant].
Liisachan is offline   Reply With Quote
Old 1st June 2020, 21:32   #786  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by Liisachan View Post
If so, maybe you could store FLAC as ogg
Since when does mkvmerge output anything other than mkv?


See:
https://gitlab.com/mbunkus/mkvtoolni...cal-background
sneaker_ger is offline   Reply With Quote
Old 1st June 2020, 21:47   #787  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
Quote:
Originally Posted by Liisachan View Post
Is the design of FLAC somehow strange?
The FLAC file headers (which are stored in Matroska's CodecPrivate) contain a checksum _of the decoded data_. In order to add or remove _encoded_ data to/from the track, the checksum would have to be re-calculated & updated. That would require actually decoding the whole encoded audio stream. No other format I know of uses a checksum of the decoded data because even validating the checksum would require a costly decoding process.

Sure, lots of formats have checksums, but those are checksums of the encoded data and the header data, and most of those checksums only cover single frames instead of _the whole stream_. Those single-frame checksums over encoded data are _fine_.

Here we run into the next problem: the API of libFLAC which is completely incompatible to how mkvmerge works (and other similar programs such as ffmpeg which has its own FLAC encoder & decoder). Meaning there's no easy way to decode FLAC blocks safe for linking to & requiring ffmpeg (which I'm not willing to do) or writing my own FLAC decoder (which I'm even less willing to do).

All of this is independent of where FLAC is stored (raw, in Ogg, in Matroska…).
__________________
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 1st June 2020, 22:57   #788  |  Link
Liisachan
李姗倩 Lǐ Shān Qiān
 
Liisachan's Avatar
 
Join Date: Nov 2002
Posts: 1,340
Thanks for clear explanation. While it's understandable that audiophiles may want to store the checksum of the decoded (i.e. original) data, the situation seems surely inconvenient for Matroska.

@sneaker_ger
I trust you know that, by "store FLAC as ogg" I vaguely meant "store FLAC in the same way Vorbis.ogg is stored in Matroska". But you're right: .ogg is just a container, and FLAC in flac and FLAC in ogg are the same thing for Matroska. It was a stupid question

Technically, you have to scan the whole file(s) to re-calculate checksums and checkSumAdjustment when you edit a TTF file or split a TTC into TTF files too. But in this case, of course you don't have to decode any compressed data.
Liisachan is offline   Reply With Quote
Old 7th June 2020, 21:01   #789  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Quote:
Originally Posted by Mosu View Post
The FLAC file headers (which are stored in Matroska's CodecPrivate) contain a checksum _of the decoded data_. In order to add or remove _encoded_ data to/from the track, the checksum would have to be re-calculated & updated. That would require actually decoding the whole encoded audio stream. No other format I know of uses a checksum of the decoded data because even validating the checksum would require a costly decoding process.

Sure, lots of formats have checksums, but those are checksums of the encoded data and the header data, and most of those checksums only cover single frames instead of _the whole stream_. Those single-frame checksums over encoded data are _fine_.

Here we run into the next problem: the API of libFLAC which is completely incompatible to how mkvmerge works (and other similar programs such as ffmpeg which has its own FLAC encoder & decoder). Meaning there's no easy way to decode FLAC blocks safe for linking to & requiring ffmpeg (which I'm not willing to do) or writing my own FLAC decoder (which I'm even less willing to do).

All of this is independent of where FLAC is stored (raw, in Ogg, in Matroska…).
Does anything actually care? FFMpeg generates it, but it also just skips over that value completely while decoding. Never even tries to store it, let alone validate it. flac has this:
Code:
FLAC__bool do_md5_checking; /* initially gets protected_->md5_checking but is turned off after a seek or if the metadata has a zero MD5 */
and the decoder does compare against a block of all-zeros to see if it's set. Seems like that would be a perfectly valid thing to set. Of course it's not in the spec, but that's good ol' FLAC.
foxyshadis is offline   Reply With Quote
Old 8th June 2020, 22:07   #790  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 293
Flac encoder creates a file with zero checksum if it writes to stdout:

> flac test.wav -o - > test.flac

...or if MD5 calculation is disabled during encoding (undocumented option --no-md5-sum):

> flac --no-md5-sum test.wav

In both cases metaflac shows:

> metaflac --show-md5sum test.flac
00000000000000000000000000000000

It's also possible to change MD5 checksum of an existing flac file with the (another undocumented) option --set-md5sum:

> metaflac --set-md5sum 00000000000000000000000000000000 test.flac

In any case, there's no problems with decoding etc. of such files.

Last edited by lvqcl; 8th June 2020 at 22:25.
lvqcl is offline   Reply With Quote
Old 10th June 2020, 09:57   #791  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Would it be possible to introduce batch muxing?

Let's say I have some streams thus named:
  • 01 My movie.mkv (or whatever video format)
  • 01 My movie [ita].ac3 (or whatever audio format)
  • 01 My movie [ita] Forced.srt (or whatever sub format)
  • 01 My movie [eng].ac3 (or whatever audio format)
  • 01 My movie [eng].srt (or whatever sub format)
  • 01 My movie [ita].srt (or whatever sub format)
  • 01 My movie.txt (or whatever chapter format)

Picture that I set the "template" thru that streams and I want to repeat the same thing for "My movie 02" thru "My movie 10".

I have tried to use a "for" command but the string starts to get out of control soon, setting languages, order, forced etc.

Would it be possible to create a batch system for that, changing the number only of the streams?

That would be terrific for muxing entire episode seasons.
__________________
@turment on Telegram

Last edited by tormento; 10th June 2020 at 10:00.
tormento is offline   Reply With Quote
Old 10th June 2020, 11:05   #792  |  Link
Mosu
MKVToolNix author
 
Mosu's Avatar
 
Join Date: Sep 2002
Location: Braunschweig, Germany
Posts: 4,278
My stance on batch muxing hasn't changed.

Note that there are third-party applications that implement some type of batch muxing.
__________________
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 June 2020, 13:28   #793  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Mosu View Post
Note that there are third-party applications that implement some type of batch muxing.
Will try them or fight with command line.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 10th June 2020, 13:47   #794  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
For batch muxing in staxrip you would:

-Disable indexing by installing LAV Filter and set source filter to DSS2.
-Select Copy/Mux video encoding profile.
-Select Copy/Mux audio profile.
stax76 is offline   Reply With Quote
Old 11th June 2020, 10:38   #795  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by stax76 View Post
For batch muxing in staxrip you would
Thank, will try.

My yesterday attempt (and success) was the following command line:
Code:
for %%a in (*.mkv) do "D:\Eseguibili\Media\MKV Toolnix\mkvmerge.exe" --output ^"F:\Out\%%~na.mkv^" --audio-tracks 3 --language 0:jpn --track-name 0: --default-track 0:yes --compression 0:none --language 3:jpn --track-name 3: --compression 3:none --language 4:ita --track-name 4:F --default-track 4:yes --compression 4:none --language 5:ita --track-name 5: --compression 5:none ^"^(^" ^"%%a^" ^"^)^" --language 0:ita --compression 0:none ^"^(^" ^"%%~na.mp4^" ^"^)^" --track-order 0:0,1:0,0:4,0:3,0:5
Funny, uh?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 11th June 2020, 11:06   #796  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
My method for batch muxing of entire seasons is to 1) name all the files so that they can be easily muxed as episodes, 2) create a project in MKVToolNix GUI out of the files for the first episode, 3) copy the actual commandline, 4) edit it in Notepad++ by replacing "episodefilename" with %~nf and run the whole mess in a command prompt window with for %f in (*.hevc) do "..."
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 11th June 2020, 11:22   #797  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
@Mosu

Would be possible to have an abort job in the Multiplexer window too, without having to switch to Job output one?

That plus a switch in preferences to remove or not the muxed file if a job is aborted.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 11th June 2020, 11:24   #798  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Boulder View Post
My method for batch muxing of entire seasons is
Sometimes I have replace audio and subs from external sources. There is where real fun starts.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 11th June 2020, 17:31   #799  |  Link
Perenista
Registered User
 
Join Date: Oct 2013
Posts: 205
Hey, what happened with appending this kind of MKV?

2-3.mkv' cannot be appended to the track number 1 from the file '1-3.mkv'. Appending tracks of this type is not supported.

It's funny, I remember having splitted these with MKVToolnix before... Now I can't merge them?

MEDIAINFO from file1.mkv:

https://pastebin.com/3bwkggYY

Should I get an older MKVToolnix version for that? If so, which one?

Note: The whole thing was splitted into 3 files. I tried appending file 1.mkv to file2.mkv and file3.mkv.

P.S. This was indeed splitted with help from MKVToolnix, in May 26, 2018 (v23.0.0). I can confirm that, because file 1 continues in file 2 and I did the splitting because I store them in Google Drive, and part1 has almost 15 GB, which is the max Google Drive space allowed. I need to use append for all 3 to further proceed with another splitting. File1 has 6 hours and file 2 another 6 hours I believe, and I need to do a splitting after 8 hours.

(((((((((((()))))))))

Wait a minute! I got the 23.0.0 version * and this appending is working!!!!!!!!!!!!

* From here:
https://mkvtoolnix.download/windows/releases/23.0.0/

What is going on?

Proof it's working:

https://i.imgur.com/FAImk8s.png

https://i.imgur.com/eIAuGNp.png

*******
RESULTED FILE:

Appending worked in 23.0.0!

https://pastebin.com/YX3KAWCh

So why was this feature removed? I had to install this older version in another folder, just to merge the 3 parts again.

And there are no anomalies in this 35 GB file with all 3 combined.

>>>>>>>>>
Another problem: Splitting is also being denied in this newer version. Again I had to resort to 23.0.0 to do this.

https://i.imgur.com/HtIV7wO.png

https://i.imgur.com/R9Pt34V.png

Last edited by Perenista; 11th June 2020 at 18:19.
Perenista is offline   Reply With Quote
Old 11th June 2020, 22:30   #800  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Read:
https://gitlab.com/mbunkus/mkvtoolni...-not-supported
sneaker_ger is offline   Reply With Quote
Reply

Tags
matroska

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


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