-
Notifications
You must be signed in to change notification settings - Fork 9
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] Add option to preserve all audio tracks. #18
Comments
Apparently, replacing |
local o = {
include_all_tracks = false,
...
} if o.include_all_tracks then
cmds:arg("-map", "0")
else
cmds:arg("-map", string.format("v:%s?", mp.get_property_number("current-tracks/video/id", 0) - 1))
cmds:arg("-map", string.format("a:%s?", mp.get_property_number("current-tracks/audio/id", 0) - 1))
cmds:arg("-map", string.format("s:%s?", mp.get_property_number("current-tracks/sub/id", 0) - 1))
end Seems to work. Again, not tested with subtitles or multiple video tracks. |
I'll refer to ffmpeg's doc later and implement this feature. |
Can you try #19? |
Testing on a video without subs results in the following error:
Following this suggestion seems to fix the issue: --
if (o.select_all_streams) then
cmds:arg("-map", "v?")
cmds:arg("-map", "a?")
cmds:arg("-map", "s?")
else
-- |
updated |
This would be nice.
The text was updated successfully, but these errors were encountered: