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

External audio autoload #967

Closed
ghost opened this issue Jul 30, 2014 · 23 comments
Closed

External audio autoload #967

ghost opened this issue Jul 30, 2014 · 23 comments

Comments

@ghost
Copy link

ghost commented Jul 30, 2014

(haven't found anything related in issue tracker)

It would be nice to have external audio tracks loaded automatically, like subs.

@ghost
Copy link

ghost commented Jul 30, 2014

What's the use case for this over just using --audio-file? Seems pretty obscure. I think there was a time where movie piracy liked to distribute audio tracks separately (so you could use a localized audio track with english video) to save bandwidth, but I think these times are over.

@ghost ghost added the enhancement label Jul 30, 2014
@pigoz
Copy link
Member

pigoz commented Jul 30, 2014

Some still distribute unimportant audio tracks as separate files to save bandwidth (like commentary tracks and similar). But yeah, I agree it's pretty rare.

@ghost
Copy link
Author

ghost commented Jul 30, 2014

I think it would be more consistent.

I think these times are over

I wish they were. Even now, releasers on russian trackers often put original audio track as external for movies (and localized audio for anime). Not to mention old releases and commentary tracks.
Maybe it's not a good example, though.

Also, I heard that Windows splitters do this (ffdshow, LAV?)

@eternal-sorrow
Copy link

Here you are patch for mpv 5.1, that implements this funtctionality: https://gist.github.com/eternal-sorrow/47749ac998d769446b09 .

It's rough and made by copy-paste from the same code of subtitle loading, so it may be optimised by making some parts of code common for subtitle and audio. Also this patch doesn't contain documentation (--list-options entry, man page edits).

@ghost
Copy link

ghost commented Sep 8, 2014

made by copy-paste

Thanks, but no.

@eternal-sorrow
Copy link

Could you even say, what I can do better? It's important functionality and I want it to be in the best video player for linux, so I tried to implement it by myself to show that it's not very difficult. If you don't like my implementation, write yours, or just give me advice what I should do another way.

@ghost
Copy link

ghost commented Sep 9, 2014

  1. Don't just copy-paste large amounts of code, just because you need minor changes in behavior. I don't expect that you somehow unify that can't be unified, but there's absolutely no reason why so much code should be duplicated.
  2. The patch you posted is pretty broken. First of all, it looks like an inverse patch (that removes the functionality you added). It's also against mpv 0.5.1, which compared to mpv git master is outdated. Second, if you're already using github, do it properly: fork the mpv repo, make your changes, and post a link to the branch containing the changes.

@swamp-fish
Copy link

Its a very useful option and is present in MPC-HC. Most of the TV series/Anime/Movies aren't local made and while subtitles are great sometimes you just want to relax from reading especially if you're watching it with someone else.
Currently autloading is working for subtitles.

Linux users unlike Windows ones can't switch to MPC-HC for TV series watch.

There can be 2 options:

  1. Automaticly load external audio file in the same directory
  2. -- in the next 2 directories(at max) as well(video.mp4 sound_folder
    a few real cases:
    sound_folder contains sound1_folder sound2_folder, each contains sound files
    sound_folder contains sound files
    )

Also 2nd option can be added to subtitles as well. At this point we have a need either to copy them or make links to the same folder as video.

Its a very needed feature please make it be.

@ebvjr
Copy link

ebvjr commented Jan 31, 2015

Please mux it if that's the case using mkv/webm or any media container.

@swamp-fish
Copy link

Sure, muxing it is much faster and won't require additional disk space, much easier than tapping a play button or even manually loading audio track.

@eternal-sorrow
Copy link

Sure, if I'd make a release, I'd mux it into mkv, but if I just downloaded from tracker new season of my favourite anime with external audio, i just want to press Enter and enjoy. But I got it working for me, so it's nothing to complain about :)

@ghost
Copy link
Author

ghost commented Feb 2, 2015

We're all glad it's working for you.

@swamp-fish
Copy link

For those who are interested in this feature, bomi have it now
bylee20/bomi#189

@eternal-sorrow
Copy link

@oneoneleven, my patch was not accepted, as you can see.

@ghost
Copy link

ghost commented Feb 2, 2015

@oneoneleven, my patch was not accepted, as you can see.

You don't need to be so sour about it. Anyone would reject it, because it duplicated large amounts of code.

@eternal-sorrow
Copy link

It's just proof-of-concept patch. I'm not Linus Torvalds nor Dennis Ritchie. I made it in 20 minutes with the cup of coffee. And it works! Even though some major releases of mpv passed, it still works. If you can understand what this patch does, you can do the same things right way.

@ghost ghost closed this as completed in c07e046 Feb 2, 2015
@ghost
Copy link
Author

ghost commented Feb 2, 2015

Great!

Also it would be great to honor alang option after loading external audio files.

@ghost
Copy link

ghost commented Feb 2, 2015

It should be doing that, though the external tracks always preferred over internal.

olifre pushed a commit to olifre/mpv that referenced this issue Feb 28, 2015
Apparently some people want this. Not enabled by default.

Fixes mpv-player#967.
@hrzhu
Copy link

hrzhu commented Apr 21, 2015

@wm4 Is it possible to set mpv to prefer internal audio tracks. I need this feature because I want mpv to auto-load audio commentary but I don't want mpv to use audio commentary by default.

@ghost
Copy link

ghost commented Apr 21, 2015

Just use aid=1 in your config. This forces always the first audio track (so language selection etc. is disabled), but on the other hand you probably don't need it if you use external audio tracks often.

@hrzhu
Copy link

hrzhu commented Apr 21, 2015

I don't use external audio tracks often. It's just some of my anime collections have external audio commentaries. I want them to be auto-loaded so that I can toggle audio when I need them. aid overrides alang which is not what I want. I might end up muxing them into the containers.

@POMATu
Copy link

POMATu commented Mar 12, 2019

Hi guys,
I had the same issue and got really annoyed cause I usually get subs from other place and that's named differently

So I wrote the tool for mpv that autofinds and loads differently named subs and external audio by the episode number
https://github.com/POMATu/anime-tool
Hope that helps

@Lothakim
Copy link

The official manual has given this option.
Just add –audio-file-auto=exact in the config file mpv.conf.
This will auto load the audio file which has the same name with the video file in the same directory.

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

No branches or pull requests

7 participants