Here are new builds for Windows that force the drop action to be a copy action. Windows Explorer no longer deletes the files with it, whether or not you hold shift while dropping.
No. MKVtoolnix is a remuxing tool. So it is perfect for everything you mention, except the encoding part.
Handbrake is a better program for what you want to do here. Just pick one of the x265 HQ presets and use the Audio tab to select the audio track you want to keep. You can modify the preset settings as you please before you start the encoding job.
mkvmerge
's JSON identification mode includes those flags in a track's properties
hash, but only if they're actually present in the file (in order to be able to distinguish between "not present" = "nothing is known about the flag", "present and set to 0" = "not fit for that purpose" and "present and set" = "fit for that purpose"). The names of the properties are flag_hearing_impaired
, flag_visual_impaired
and flag_text_descriptions
(which is probably what you mean with "commentary").
Unfortunately mkvmerge
doesn't allow you to take the content from one file/track & combine that with the metadata from another file/track. This means that you need to query the current metadata & apply it when you remux with the modified content.
You can use mkvmerge
's JSON identification mode for that. Not only does that allow you to determine which tracks are actually text subtitle tracks and what their track IDs are, it also provides a lot of the existing metadata for them in a format (JSON) that's easy to parse in all programming/scripting languages out there (and if you solely want to use the shell, look into learning the <code>jq</code> utility).
As you can see, the order of the tracks is different: in one file the first track is the audio track while in the second file the first one's the video track.
mkvmerge
assumes that you want to append the first track from the second file to the first track from the first file, the second track from the second file to the second track from the first file etc. — unless you tell mkvmerge
differently. You'll have to do that with your files as mkvmerge
will otherwise think you want it to append an audio track to a video track and vice versa.
See the documentation for the <code>--append-to</code> option.
In this particular case the option --append-to 1:1:0:0,1:0:0:1
should do what you need. It says:
1:
) take track ID 1:
(the Opus track) and append it to the first file (0:
), track ID 0
(again the Opus track), and1:
) take track ID 0:
(the VP9 track) and append it to the first file (0:
), track ID 1
(again the VP9 track)Note, though, that you must not rely on the order of tracks always being this way. Instead, your program should
mkvmerge -J file.webm
on each input file--append-to
argument from the algorithm in 2Note further that even with adding that command line option mkvmerge
will still refuse to append those two files as the two audio tracks have differing sample rates (48.000 vs 44.100) and number of channels (1 vs 2).
The Debian project itself never updates whatever version they provide safe for security patches. Therefore you won't get a newer version of MKVToolNix off the official Debian repositories. Luckily I provide binaries of current MKVToolNix versions on the MKVToolNix home page. You just have to add my Debian apt repository and update from there.
Primera vez en la vida que veo un post en español en este sub XD
Tenes que usar un conversor de audio, como el de Pazera que es gratis y muy completo y convierte a ac3 (no todos los conversores soportan este codec).
PD: Seguramente después de la conversión, vas a tener que muxear el resultado (archivo ac3) con el video, ya que la mayoría de conversores de audio no lo empaquetan de vuelta con este... y si, es codec (codificador/decodificador).
You have the track numbers turned off in the track pane, but the highlighted one appears to be track 2 (they start at zero). The command line tool mkvextract is easy to call in the terminal window.
mkvextract tracks movie.mkv 2:movie.srt
You may need to add a path to the program if it's not accessible without.
I'm a windows user but assume mkvextract is also included with the Mac version of MKVToolNix.
You need Microsoft .NET core 5.x to run handbrake
https://handbrake.fr/docs/en/latest/help/troubleshooting-common-issues.html
And you're going to have to re-encode the video which will likely take hours per video.
It's easier to just get a better video player.
On Windows I use PotPlayer, on Android I use Nova Video Player, and on Android TV I use Nova video player or Kodi, all support soft subs. If you're using a Mac or Apple TV you're on your own.
Even TV's like the LG models built in video player supports soft subs as long as they are in text format like SRT.
Why would you want to hardcode the subtitles into the video... That kind of defeats the purpose of using an MKV container. In MKV the subs are normally just stored as a track and you turn them on or off in your video player.
If you want to hardcode the subs that requires that you re-encode the video to include the sub title as part of the video, so you would need a video encoder like Handbrake.
HandBrake can by setting Borders on the Dimensions tab. However I don't see a method to automatically calculate, so you'd need to do it manually for each season of a show (e.g. if the video is 1080p and 1416 pixels wide, add 252 of left and right to get 1920x1080 - adjust accordingly for 720p or whatever your source is). Once you have everything set you can save a preset and batch process an entire directory. There may be better ways to do this, I suggest doing some searching around.
You can't fix a bad cut, the beginning is just difference data with no reference frame. A proper video starts with a keyframe which is why mkvtoolnix can only split on a keyframe.
An encoder can create a new keyframe at the cut point because it's decoding the video into raw frame-by-frame video and then encoding it again.
I don't do much encoding but HandBrake allows you to pick a chapter range on the summary tab. Once you get everything else set, you should be able to insert all the chapter jobs into the queue pretty quick (1-to-1, 2-to-2, 3-to-3, etc).
Alternately you could just back off your chapters a few seconds and let mkvtoolnix use the earlier keyframe to start. You'd see a few seconds of credits maybe at the start but no encoding would be done.
>deb [arch=amd64 signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/ubuntu/ impish main
# deb-src [arch=amd64 signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/ubuntu/ impish main
I did. That solved it. Many thanks.
With the recommended lines of
deb [arch=amd64 signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/ubuntu/ impish main # deb-src [arch=amd64 signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/ubuntu/ impish main
there is no error for me. Did you skip the arch=amd64
part?
Have you ever heard of Plex media server? That's what I'm using with a Roku device on my dumb TV and it works flawlessly. If your TV doesn't have support either of those, you can pick up a Roku device relatively cheap off Amazon. I've never used the stick models, myself--just the set top ones. I would suggest one that has a RF remote (not IR) if you decide to pick one up. As far as Plex goes, they offer a subscription, but you can use it absolutely free without really being disadvantaged.
You will have to recompress the video, which is something MKVToolNix cannot do. I recommend HandBrake, a Free/Open Source video & audio encoder that can read & write Matroska files.
Step 1: Download MKVToolNix from HERE.
Step 2: Open .dmg and move app to Applications Folder.
Step 3: Run app and click on OK in “MKVToolNix-56.1.0” can’t be opened because Apple cannot check it for malicious software. dialog box
Step 4: Go to System Preferences > Security & Privacy > General, A pop-up for mkvtoolnix is not from identified developer is present Click Open Anyway then Click Open in next dialog-box.
Step 5: Run MKVToolNix normally next time like any other app.
Subtitles in MKV files are usually stored as a text stream; the position of the subtitles is dependent on the way the subtitle file is written and the player being used.
If you are trying to burn subtitles onto a video so that they cannot be disabled, use a different tool such as Handbrake, which allows you to burn in subtitles, but unfortunately doesn't allow you to position them. A quick search suggests that TEncoder may have repositioning functionality, but I can't vouch for it.
There may be ways to create a separate video stream with just the subtitles so that they can be toggled and the positioning/styling can be enforced, but I don't think mkvtoolnix can do this.
A relative easy way is to use gMKVExtract, drop all videos in and right click select check all subtitles
, so it checks all the subs, and you can see what files have subs (are checked) and what doesn't.
Those aren't empty, it's just that they're packed in .MKS (Matroska extension for subs containers)
So, they're no correctly extracted as ass/ssa, srt, etc (the real subs formats).
Use gMKVExtract to (truly) extract those subs/fonts you want, it can batch too, you won't be disappointed ;3.
Extract the merged subtitles using gMKVExtractGUI and see if anything is missing. This will verify if some data got dropped during the merge process. It's possible special or invalid characters are hidden in the file and MKVToolNix is handling them differently than Plex.
Just a wild guess, I've merged plenty of subtitles and never encountered anything like you're describing.
Does another player like VLC show something different?
Version 2.3? Running 2.5.2 on windows 10..
2.3 came out in 2018
I'm running this version https://sourceforge.net/projects/gmkvextractgui/
ah looks like your running a different version, but that version 2.3 came out in 2016 even..
I assumed that you already had a second video with these frames. In this case, as there are only frames, if you convert them to BMP, VirtualDub can create this second video or set of frames before reinserting them in the original.
In the meantime my Buildbot has built the latest continuous builds that contain the --engage all_i_slices_are_key_frame
options again. You can get those continuous build here: for Windows, for Linux
Sorry, I never pay attention to these lower level values. Looking at the documentation there seems to be a couple options in the "2.4. General output control" section that may do what you want (--no-date & --disable-track-statistics-tags).
I cannot help you with problems with the store itself.
However, MKVToolNix is always available for Windows completely for free from the home page. Use that for the time being on the affected machine.
After a long investigation, it turned out to be caused by an updated compiler version. I'll revert back to the older version for the next releases. In the meantime you can either use the 32-bit versions of release v58 or get the latest 64-bit continuous build which was done with the older compiler again.
If you're unsure if your version is affected, look at "Help" → "System information". You can find the compiler version in the last section. The last version that's known to work is 10.2.0. The bad versions are 10.3.0 and anything 11 and higher.
Note that this only happens on Windows. Linux builds done with 10.3.0 or newer seem to be fine, as are macOS builds so far (those are done with clang, not gcc).
Even though I cannot reproduce the issue, I do have an idea why it happens. I've implemented a potential fix. Please download the latest debug build, give that one a try & let me know if that one still crashes. Thanks!
Two things, one make sure you have the word "pause" at the end of your script, other wise it will keep looping like it is in your log.
example:
::remux.bat
set mkvmerge="C:\Program Files\MKVToolNix\mkvmerge.exe" set output_folder=
set copy_1=
set copy_2=
for /r %%a in (*.mkv) do call %mkvmerge% -o "%output_folder%\%%~na.mkv" %copy_1% "%%a" %copy_2%
pause
Secondly, you need to update your mkvmerge, you are using mkvmerge v56.1.0 on HEVC encodes, thats a possibility why you are getting these weird size issues. The new update fixes a lot of those issues with HEVC.
If those files contain HEVC, then you're likely running into a bug I've hopefully fixed yesterday. Please give the latest continuous build (revision-011
or later) a try.
I've just fixed an issue for a similar report on Windows. The same fix should fix the issue on macOS as well. You can give this pre-build DMG a try.
The GUI hands the file name to mkvmerge
in the same order you see in the GUI. mkvmerge
in turn processes the files in the order they're listed on the command line. There's no re-ordering of files behind your back.
That being said, the order in which track content is appended depends on the order the tracks are listed in the track view. That's what the --append-to
parameter does. Your screenshot does not show which file each track belongs to, but the command line shown above does. (If you want to understand how --append-to
works, see the documentation.) For example, the 7:0:5:0
part in its argument means that the 0th track from source file 7 (numbering starts at 0, so that's CS06_9.00x_3840x2160_gcg-1.0.1.mp4
) should be appended to the 0th track of source file 5 (B15_9.00x_3840x2160_gcg-1.0.1.mp4
) — and here's where the track order doesn't match the file order anymore.
What you have to do is to sort the tracks in the order you need them to be sorted. For that re-order the columns so that the "source file" column can be seen. If you cannot find the column, it might be hidden; right-click on the column headers to see all available columns.
All this will probably seem overly complicated, but it is in fact a very flexible mechanism that allows complex schemes for appending stuff. Your case isn't complex and would not require the full flexibility, but you have to live with it as your use case is only one of many.
That's interesting. I often mux from a Synology NAS myself; sure, identification over the network is a bit slower, but it shouldn't take thaaaaat long.
Can you pinpoint the exact version for which the process starts to be slow? You can find all older versions to download here. That would help me out. Thanks.
You cannot remove tracks with mkvpropedit, only change properties of the file or the tracks.
If you need to remove a track, you'll need to remux with mkvmerge or the GUI. mkvmerge's default is to copy everything from the source files unless you tell it not to.
In general you tell mkvmerge which tracks NOT to copy with track IDs. Those IDs are assigned by mkvmerge itself, and you have to query mkvmerge what those track IDs are by running mkvmerge -J sourcefile.ext
The result is a JSON-encoded view of what's in the file. There's atracks
array in it, and each entry contains an id
entry. That's the track's ID you'll have to use with mkvmerge.
Each source file listed on the command line has its own set of track IDs, meaning each file can have a track with the ID of 1. As those IDs may be the same, the order of options is important: each option taking a track ID only applies to the following file name.
Here's one example: let's assume you have one source file with three audio tracks, and those audio tracks have IDs 1, 2 and 5. Let's further assume you want to get rid of the first one but keep the others. You can use one of the following two syntaxes:
mkvmerge -o out.mkv --atracks 2,5 source.mkv
mkvmerge -o out.mkv --atracks !1 source.mkv
The first method says "copy audio tracks with IDs 2 or 5". The second says "copy all audio tracks safe for the one with the ID 1".
Read more about mkvmerge's syntax & options here and see more examples how to automate stuff here.
You just download and install it again over the top of the old version. Your settings are not lost.
https://mkvtoolnix.download/downloads.html#windows
Click on the fosshub.com link under Windows. Then download and run the top link "MKVToolNix Windows installer (64-bit)".
mkvmerge
's default is to keep everything as-is. Therefore the simplest command line for remuxing a file into Matroska is:
mkvmerge -o out.mkv in.mp4
You can find a couple more easy examples in the official documentation.
default-track is used for all types of tracks (video, audio, sub), one specified for each. You just need to know the actual track numbers inside the file. mkvinfo can show you these but I still recommend using the GUI and showing the command line. Once you do a few you'll get the hang of how the command line system works. Note that parameter order is pretty important. Also you make changes to the existing track numbers regardless of what track-order changes.
I figured out my stupidity with mkvtoolnix.download.list
I put ...Debian... instead of ....Raspbian... duh
when doing >>> sudo apt update
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://mkvtoolnix.download/raspbian buster InRelease' doesn't support architecture 'arm64'
So the installed version 49 is 32bit?
Welcome to MKVToolNix.
parts:
prefix the documentation talks about, only enter the timestamp ranges).Note that the GUI also offers a split mode called "before chapters". This one will cause all chapters to be written to the output files created, unlike the "by parts" feature which allows you to only copy certain ranges from the source file. For example, if your source file has ten chapters, you split "before chapters" and enter "4, 6", then you'll end up with three output files: one for chapters 1–3, the second file for chapters 4 & 5 and the third file with the remaining chapters, 6–10. There is no way to combine these two modes at the time.
Please also note that mkvmerge
(the command line tool which the GUI calls on to actually do all the work) can only split right before key frames.
Like Amey8a said, the -s 2
must be placed before the file it should apply to as it is a file-specific option. Read more about option order in the documentation.
The Matroska file format allows for two different types of custom data to be associated with a file: via tags (key/value pairs) or via attachments (whole files embedded into the Matroska file).
Tags are meant for multiple short pieces of information such as who was the composer, who acted on a movie, in which year was it released etc. See here for more information.
What you're trying to store ("processing actions that were performed") sounds more like a lengthy description of which programs were used, the settings used in each program etc. For this tags aren't suited well. I'd rather put that information in a file & attach that file to the Matroska file. If you use the same attachment file name (e.g. "processing_information.txt") for each of your Matroska files, you could find that information easily later.
mkvpropedit can add & remove both tags and attachments. See its documentation for examples.
If you already have mkvmerge installed with the old source path then either edit the /etc/apt/sources.list.d/bunkus.org.list file or delete it first then do:
sudo sh -c 'echo "deb https://mkvtoolnix.download/raspbian/ $(lsb_release -sc) main" >> /etc/apt/sources.list.d/bunkus.org.list'
Track IDs are input-file specific. Each input file has its own set of IDs.
Please see the corresponding section in the documentation for more details.
You can use the following options:
-A, --no-audio Don't copy any audio track from this file.
-D, --no-video Don't copy any video track from this file.
-S, --no-subtitles Don't copy any subtitle track from this file.
-B, --no-buttons Don't copy any buttons track from this file.
-M, --no-attachments Don't copy attachments from a source file.
-T, --no-track-tags Don't copy tags for tracks from the source file.
--no-global-tags Don't keep global tags from the source file.
--no-chapters Don't keep chapters from the source file.
All of those are listed both in mkvmerge
's help output (mkvmerge --help
) and its manual page.
The option --track-name
is a file-specific option, which means that it only applies to the next source file on the command line. In your first example you target three different tracks from input_1.mkv
as that is the next file name after each of the --track-name
options.
The next thing to know is that track IDs (the numbers you use in --track-name …:MyName
) are file-specific. This means that there can be the same track ID in each of the source files. For example, if each of your source file contains one video track, one audio track & one subtitle track in that order, each file will have track IDs 0 through 2. However, don't rely on that fact; instead, query the IDs mkvmerge assigns by running mkvmerge -J yourfile.mkv
If your goal is to set the name of the first track of each input file, the correct invocation would be
mkvmerge -o output.mkv --track-name 0:"name 1" input_1.mkv --track-name 0:"name 2" input_2.mkv --track-name 0:"name 3" input_3.mkv
See the documentation for more info.
See section 2.7 at https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.description
Example to remove audio tracks tagged as english: mkvmerge -o output -a '!eng' input
The batch file needed depends on your operating system. What are you running?
Try using mkvmerge, that will give mbunkus an idea if it works, but gui doesn't. Mkvmerge is in your mkvtoolnix install dir.
mkvmerge -o new.mkv old.mp4 --language 0:eng old.srt
Can you use mkvextract to a mka?
mkvextract tracks original.mkv 1:newaudio.mka
look in mediainfo for the track #
https://mkvtoolnix.download/doc/mkvextract.html#mkvextract.output_file_formats
Can you show us the command lines you've tried so far? Have you read the documentation about the --track-order
parameter and the section about track IDs?
You can use the splitting functionality with mode parts:
(called "by parts based on timestamps" in the GUI). The syntax would be 02:00-
which means "discard everything before the 2 minute mark, then copy everything after that".
See the documentation for more details.
I've just implemented a different dark mode, not based on the "change the whole world QtDarkStyleSheet", but based on the built-in "Fusion" style coupled with a dark QPalette. It obviously looks different than both 39's dark mode ("QtDarkStyleSheet") and the original light mode, but most importantly it should not have the problem with widget sizes as the QtDarkStyleSheet-based mode has.
Here's a link to the 64-bit portable version.
I'd appreciate some feedback. Thanks!
The current dark mode uses quite a lot of padding & minimum sizes for several controls, something I'm certainly going to tweak over the next couple of releases. The combo boxes are simply a bit wider than before. You can either make the GUI's main window wider or scroll the panes to the right.
Note that you don't have to click on the arrows of a combo box in order to open it; in fact, clicking anywhere on it will open it.
Alternatives are rolling back, sure, but also using the latest continuous build which includes an option in the preferences for disabling the GUI's dark mode.
Yeah, I get it. But as the developer of this particular product I've been on the receiving end of people venting quite a number of times, and believe me, it doesn't motivate me to continue giving away my free time to people who don't seem to appreciate it one bit. It's hurtful.
I do accept your apology, of course; I'm not big on holding grudges either. Just, please consider that software is made by people, and especially Open Source software for which you don't pay anything and which is often created by a small number of dedicated individuals. We're not a huge, faceless, emotionless company, we're human beings. Just try thinking about how the developers might feel about what you write next time you're angry about a software product. Thanks!
BTW, my build bot service automatically creates builds for Windows from all commits. What I'm trying to say is that you should find new builds with that new option for disabling the dark mode within a couple of hours at this address.
Edit: ooops, the link was wrong, pointing to the pre-builds directory instead of the continuous-builds directory.
There's no ready-to-use way, but all the pieces are there so you can easily script them. What the GUI does is fetching a small XML file from the MKVToolNix web site which includes the information about the latest available release. You can easily write a small script that fetches said file, parses it, then executed mkvmerge --version
, parses its output and compares the result. Here's a small Python script that does exactly that:
import re
import requests
import subprocess
import sys
import xml.etree.ElementTree as ET
# 1. Determine latest available version
response = requests.get('https://mkvtoolnix.download/latest-release.xml')
if response.status_code != 200:
print('Error retrieving latest-release.xml')
sys.exit(1)
xml_root = ET.fromstring(response.text)
available_version = xml_root.findall('./latest-source/version')[0].text
# 2. Determine currently installed version
proc = subprocess.run(['mkvmerge', '--version'], capture_output=True, encoding='UTF-8')
installed_version = re.sub(r'mkvmerge +v([0-9.]+).*\n?', r'\1', proc.stdout)
# 3. Compare versions & act on the result
if installed_version != available_version:
print("A newer version {} is available online.".format(available_version))
There are a couple of third-party GUIs focussing on batch processing; see the links page. Then there are GUIs that encompass the whole process of ripping a Blu-ray, re-encoding audio/video, maybe applying effects, creating Matroska file and so on (e.g. StaxRip). Judging from what little information you've provided, I cannot even begin to guess if any of those might be interesting to you.
You're quite welcome :)
Handbrake and MKVToolNix serve different purposes: MKVToolNix is solely about re-packaging content into the Matroska container without modifying the content (and, to a lesser extent, working with Matroska files) while enabling the user to use as many of Matroska's features as they want.
Handbrake's purpose is trancoding audio & video (decoding & re-encoding), mostly in order to use more efficient codecs and save space. One of its sideeffects is that it also outputs to different container formats.
As for donations: there isn't a dedicated page over on https://mkvtoolnix.download , but there are links to BountySource and Paypal right below the menu. You can use those services to make a donation, which is, of course, totally voluntary. Thanks for considering it!
Probably because that's the latest version your distribution provides, and you're not using my repositories?
Or if you're using my repositories: because your distribution is older & I don't support newer packages for it.
What's actually your goal? To remove all attachments?
If you cannot get your shell code correct, I highly suggest you use a proper scripting language such as Ruby or Python. Then use JSON option files when executing mkvmerge
/mkvpropedit
/mkvextract
as that'll circumvent all kinds of issues with escaping or encoding when dealing with the command line (yes, option files can be used with all three programs, not just mkvmerge
).
Here is an example in Ruby that uses said technique.
I believe this is it ? ->
How do you see or know that that bug fix put in this , thats what i want to know
Well, if you run the following, what's the checksum that's output?
wget -q https://mkvtoolnix.download/gpg-pub-moritzbunkus.txt
sha512sum gpg-pub-moritzbunkus.txt
It should be e7e7837c76ded89b490c7afc0fcdf9079139390517f822030fb9cf1e8e212efaf199dc8601919e4c852db992d52ad09edf4fd16034fa1f42154f719c09ae58fc
.
If it is, try running
sudo apt-key add gpg-pub-moritzbunkus.txt
That command works just fine for me here. Maybe you need to use a proxy server in order to access the internet?
You can check what wget
downloads by leaving out the apt-key
part, e.g.
wget -q -O - https://mkvtoolnix.download/gpg-pub-moritzbunkus.txt
I'm going to assume that your 4K movie and 1080p movie are both the same in terms of movie content / edition.
Here's what I do:
1) extract the DTS audio from your 1080p version.
2) load the 4k movie with the 1080p audio on mpv with the command (this is on linux BTW - there are also windows builds of mpv)
mpv "4k-file.mkv" --audio-file="1080p-audio.dts"
file will now (should) play using external audio. As u/activoice said I look for a sound you can see -- a gunshot or a car door slamming. if the sound happens before the video action you need a (+) delay, if the video happens before the audio you need a (-) delay.
Using Ctrl + and Ctrl - to change the audio delay you need - once the audio matches the video (it's in sync) make a note of the (+)delay or (-)delay - jump to another part of the film (try to jump ahead 60 minutes) and find another sound you can see - is it in sync still or does it require a small adjustment in the audio delay - repeat until a few different scenes are in sync in different parts of the film -- once this is done make a final note of your (+/-) delay and that should be the final audio sync adjustment you need when muxing in mkvtoolnix.
good luck.