Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request (ability to mux video) #99

Open
Darkmaster006 opened this issue Jul 18, 2023 · 7 comments
Open

Feature request (ability to mux video) #99

Darkmaster006 opened this issue Jul 18, 2023 · 7 comments

Comments

@Darkmaster006
Copy link

Darkmaster006 commented Jul 18, 2023

Let's say there are two videos and what I wish to do is place one of the videos into the other which has all the other stuff that I need (multi-audio, multi-subs, etc.), is there any way a "video" tab could be made so that we could mux the new video and discard the first videos only? Thank you.

@Darkmaster006
Copy link
Author

huh? you want 2 videos inside 1 mkv? or you want to join 2 videos? to 1 mkv...so like 1 video is 1 min and the other is 1 min....so mkv will be 2 mins?

No, no, you misunderstood. Basically, it's like this:
You have two mkv files. One contains only a 1080p video and an English audio. The other one contains a 480p video but also a Spanish audio, an Italian audio, a French audio, Spanish subs, Italian subs, French subs. Obviously, repeat this for 200 videos. As it is now, I'd have to extract all parts of the second mkv file (audio1, audio2, audio3, subs1, subs2, subs3) and then mux each one with the program into the first mkv container (which contains the 1080p video and the audio0 (EN)). Instead, what would be nice to have is the possibility of, instead, choosing the 480p video as the main, and then muxing into it ONLY the 1080p, and having an option to discard the first video (hence, discarding, in this case, the 480p, but staying with all the other parts of the mkv files, that is, all the audios, all the subs, etc). Does this make sense?

@Darkmaster006
Copy link
Author

basically you want to replace the video track with another video track in a mkv that seems doable...however you'd still have to extract all video tracks....and the GUI would have a new video tab where you could add video tracks like it is on the audio/sub tab the GUI would also have to make sure it removes the old video track since 2 video tracks in a mkv isn't really aloud (tho it does technically work)

also keep in mind thats a VERY niche thing to do....I very much doubt anyone is really doing that

Yes, exactly! It's true that I'd have to extract all video tracks, but I think it'd be useful in those cases where it'd be extracting one video track vs extracting 8 other tracks plus merging each one. It is something you won't usually need to do, true, but sometimes it could be very helpful, especially when you have a better video but with less tracks (for example, this could be useful for multiaudio stuff, or multisubs).

@tee-jay-a
Copy link

tee-jay-a commented Oct 9, 2023

It's not really that niche!

You can have two copies of the same episodes, one with HQ video (and crap audio & say no subs) and another with HQ audio (and say crap video & great subs).

Assuming they have the same FPS & length, it would be great if you could pick the best tracks from each. Even allow for an offset between the sources?

A major mission, I know.

PS Love this application!!

@Pierrounator
Copy link

Definitely not a niche. I'm looking for that feature for years now.
I mux 2 mkv together like everyday. Imagine doing that for series…

@enchained
Copy link

I also think this is not niche, especially for anime where there are a lot of releases with different subs/dubs/codecs. I think I did exactly that in mkvtoolnix gui by adding 2+ videos and cherrypicking tracks, since it was so much faster than extracting the required tracks first, and also comes with track name and language pre-filled.

What if, to not complicate the GUI, it could be done not in the Videos tab, but as adding support to the mkv format for audio, subs, attachments and chapters?

For example, if in the Audios tab you select a video-containing folder, if the mkvs are different from the ones loaded in the Audios tab (if Videos tab is not already filled in, prompt to pick primary video files in the videos tab first), their audio track will be loaded to the audio list to be extracted and muxed back in, just as if it was a separate audio file. And audio lang and title will be filled from the metadata (with option to override them via the usual fields on the top). Same with subtitles, chapters and attachments - allow to import those from mkvs directly.

The only issue would be the case where there are multiple audio/subtitle tracks to import per video file. Example of the solution would be adding a second column "Audio track" to the audio list (next to the Audio name column), pre-filling it with first track data: number, language code, name, codec, channels and bitrate, and making this cell a select dropdown field where all the audio tracks listed per file.

The column name itself could be used for batch-select, but since the track metadata and order can differ across files, it would be logical to offer multiple lists there (by track number - list of all track numbers existing in those videos), by track name (list of all the track names), by track language (list of all the languages), etc. If in some video there is no track by requested name, or if there are multiple tracks with requested lang/name/etc, the cell highlights red, offering to make a manual track selection. And if track number was used for batch selection, it will be easy to see at a glance if some tracks differ from the rest in the column data.

Created a quick example of what I mean for the Audios tab:

image

@yaser01
Copy link
Owner

yaser01 commented Jan 7, 2024

@Darkmaster006
You can do this in the 2.4.1 version :
Firstly to make everything clear:
First Video that contains video with other stuffs .. and you want to discard its video and maybe other stuff too.
Second Video that contains video that will replace the discarded video with maybe other stuffs..but they will all be added to the video...
You can firstly add the First Video to the video tab
Then use Modify Old Tracks to not copy the video track
Then to add the Second Video to the subtitle tab as an subtitle file by rename it to some subtitle extension like ass,srt..
And i prefer to activate mux it at top option.
This is not a solution ofc.. but a way to currently do it with the current available options, until maybe add it officially to the gui...
Who knows :D

@nalllen
Copy link

nalllen commented Feb 13, 2024

Here is another request for this feature :)

I had 50 .mkv files with one language and another 50 .mkv in another language
being able to just drop a mkv in the audio tab as a way to add its audio track and have it work like enchained example would be absolutely perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@enchained @Pierrounator @nalllen @Darkmaster006 @yaser01 @tee-jay-a and others