HandBrake / HandBrake

HandBrake's main development repository
https://handbrake.fr
Other
17.82k stars 1.34k forks source link

Allow muxing of multiple audio tracks into one #4608

Open WereCatf opened 2 years ago

WereCatf commented 2 years ago

Description of the feature or enhancement you'd like to see in HandBrake

Plenty of people use various kinds of software to record their gameplay, like e.g. NVIDIA's ShadowPlay. These people include my husband, who likes to record desktop-audio on one track and microphone on the other, just so that if there's e.g. an issue with the microphone, it won't ruin the primary track. Alas, he's not most technical person around and going through the multiple steps of exporting the audio tracks, dumping them into e.g. Audacity, mixing them together, then importing them back into the recorded clip and ditching the existing tracks with e.g. Mkvtoolnix is....not a very user-friendly process.

I would like to see Handbrake add the option of easily mixing two/multiple/all audio tracks of input clip into one, single track.

What Operating System are you running?

Windows 10, but not relevant

What version of HandBrake are you running?

1.5.1, but not relevant

Where did you download HandBrake from?

handbrake.fr

Activity Log, Crash Log or any other details

No response

sr55 commented 2 years ago

This kind of feature would requires an NLE timeline to be truly useful across the common uses cases folks would use this for. We have no plans to introduce an NLE timeline into HandBrake. It's just not what HandBrake is for and not within our project goals I'm afraid.

As such, I'm afraid it's not something you'll see in HandBrake.

I would be more inclined to use something like Davinci resolve or similar when dealing with multiple content sources. With a few youtube tutorials, it may be a bit easier to work with than Audacity

WereCatf commented 2 years ago

I do not understand why it'd require an NLE. I wasn't talking about using multiple different files of varying lengths; NVIDIA's ShadowPlay, for example, records all the tracks in the same file, so they are all of the same length and in sync, ie. you get a single file with one video-track and two audio-tracks. Many different applications used for recording clips of games or the desktop do the same thing.

If this is a too specific feature-request, fine, but I do not see the requirement for an NLE.

sr55 commented 2 years ago

I'm thinking bigger picture, not just a specific use case. Ultimately HandBrake has many user-types so thought has to be put into how a particular feature will impact the app (existing and potential other upcoming features) and others.

HandBrake deliberately has a very narrow focus. a) narrow focus allows us to make what we have better, rather than trying to be a bad jack of all trades and b) because there are very few volunteers that actually contribute.

Handbrake's focused more towards post-production, post-editing workflows.

Nomis101 commented 2 years ago

Alas, he's not most technical person around and going through the multiple steps of exporting the audio tracks, dumping them into e.g. Audacity, mixing them together, then importing them back into the recorded clip and ditching the existing tracks with e.g. Mkvtoolnix is....not a very user-friendly process.

This could also be done easier e.g. with ffmpeg: ffmpeg -i in.mp4 -filter_complex "[0:a]amerge=inputs=4[a]" -ac 2 -map 0:v -map "[a]" -c:v copy out.mp4 From: https://stackoverflow.com/questions/54060729/ffmpeg-how-to-merge-all-audio-streams-into-stereo

WereCatf commented 2 years ago

@Nomis101 Yes, I know, I use ffmpeg myself. Alas, not everyone -- including my husband -- can or even wants to use a CLI, which is the entire reason why I even looked at Handbrake in the first place.

I'll just close this ticket, since it's obvious nothing useful will come out of it.

duckfromdiscord commented 1 year ago

I don't think this should be closed, in my opinion this is definitely in the scope of handbrake 🙂 I'm open to being told why not though

bradleysepos commented 1 year ago

This is a super common scenario these days, especially for creators and anyone recording on desktop. Program/system audio plus mic audio plus third party chat audio.

It's tough because we've traditionally tried to limit more editor-focused features to keep HandBrake's scope in check. But I can see this being really useful where one has already baked in the video composition they want, and simply need to merge some audio tracks.

Ignoring selection behavior for the moment (which is the real challenge for integration), if we did this, we would probably need a special audio track type (so to speak) with a basic ui for gain reduction prior to mixing and a post normalization option.

Trying to figure out how this fits with selection behavior is tricky to impossible, I'm afraid. We have no way of knowing which track is mic/other, and the presets system relies on selection behavior. So even if we implemented the feature, we would not necessarily be able to save usable presets without a significant overhaul to another system. This is a major hurdle based on the current architecture.

Ideally, one would configure their recording program (e.g. OBS Studio) to record a premixed track as the first audio, followed by the individual tracks, then have HandBrake use the first track. Anything else requires use of DAW right now.

I'm open to this as a feature but since it requires such a major reassessment of the selection behavior logic, it might simply be too much for our small team in the near future. Please remember, we are a handful of unpaid volunteers contributing in our spare time.

WereCatf commented 1 year ago

Ideally, one would configure their recording program (e.g. OBS Studio) to record a premixed track as the first audio

Alas, there are a billion different tools for recording things nowadays and some of them might not allow for that, for example. I seem to recall having seen one whose name escapes me that only offers the option of two separate tracks or one mixed track, but not both. People also have a habit of insisting on using what they're familiar with -- myself included -- so it's hard to get people to switch tools. These days fewer and fewer people can use CLI as well, so pointing them towards ffmpeg is almost certain to only upset them and not feel as helpful advice in their minds.

Anyway, I still would love to see this feature being implemented in Handbrake, but I totally do understand that this is difficult to fit into the current design. I don't personally see mixing a couple of tracks together as editing, per se, but rather more akin to what Handbrake already does, ie. "transcoding" of them into something more suitable for the users' needs, but I have no idea how one would fit that into the workflow of how Handbrake has been designed to work without a more-or-less full revamp.

I don't even use Handbrake myself, I am mostly just musing about this from a more general point-of-view.

duckfromdiscord commented 1 year ago

I'm open to this as a feature but since it requires such a major reassessment of the selection behavior logic, it might simply be too much for our small team in the near future. Please remember, we are a handful of unpaid volunteers contributing in our spare time.

@bradleysepos Don't feel rushed at all! I wanted the issue reopened just so the feature could be back on the table 😄

Ideally, one would configure their recording program (e.g. OBS Studio) to record a premixed track as the first audio, followed by the individual tracks, then have HandBrake use the first track.

That's a really good point but it may be a bit less disk space efficient

These days fewer and fewer people can use CLI as well, so pointing them towards ffmpeg is almost certain to only upset them and not feel as helpful advice in their minds.

@WereCatf Honestly I'm perfectly fine with using the command line in general but ffmpeg stuff is really really complicated so it's easier to have human-readable settings like Handbrake's which is the beauty of handbrake to me :)

Detlas-Legacy commented 7 months ago

FFMPEG is simply too complicated. Using editing software takes far too long. I think adding audio track merging is a great idea for handbrake.

EverydayLolicon commented 3 weeks ago

I was surprised when I didn't see an option to do this in HandBrake, I'd very much like to see this feature get added.