If you know how to extract the audio, I would appreciate any help.
I use this to slice the Audio out of a Video file (without transcoding)...
Code: Select all
"vlc.exe" "file.webm" --no-sout-video :sout=#file{dst=file.out.webm}
...sorry, I don't know how (or if) you can do that in the VLC interface, instead of the command line.
I'm not sure if I have any Video files with dual Audio streams to test it on, but I'll dig around & see what I can find. With this command, you might get a file with BOTH Audio streams (but of course no Video) -- I'll try to find a command for selecting which stream to output.
UPDATE
This has been the
most annoying thing to test/debug...there seems to be NO INFO on the syntax of "stream output chains", specifically VLC's --sout command line option -- WTF goes after the equals sign???...
...sure the docs have SOME examples, but not anything I actually wanna do.
So, after much Googling, reading & testing, I actually got this to work!...sort of...
As my example above shows,
file (or specifically "#file") is actually one of the things you can put after --sout=...I'm not even sure where I found that, but once I did, I saved that in a text file!
Code: Select all
"vlc.exe" "file.in.webm" --no-sout-video :sout=#file{dst=file.out.webm}
...this seems to only extract ES 1 (Elementary Stream 1) -- that's VLC-speak for "Audio Track 1", I don't think there's a
simple way to edit that command to only output ES 2 (audio track 2), you have to re-write it completely, using more syntax that there's no documentation for.
So, here's what I've learned...
- Using the file output module...
- Output ES 1 via file output module (might be same as 1st example, but longer)...
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-all ":sout=#duplicate{dst=file{dst=file-es1.out.mkv},select=es=1}"
Output ES 2 via file output module...
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-all ":sout=#duplicate{dst=file{dst=file-es2.out.mkv},select=es=2}"
...here I technically use the duplicate module, since I think I need to to be able to use select. I duplicate the stream & output (dst) it to the file module, like I did before. In the file module, I only output (dst) it to a filename. After closing the "}" on the file module, I use select on the duplicate module to force the param "es=1" or "es=2"...which selects which "Elementary Stream" I want.
Using this method seems pretty good...
- Pros...
- It keeps the original container (mkv in my tests) (file timing/position info works/displays correctly)
- Cons...
- Loses Audio track meta-info (resulting file says "Track 1" instead of "Track 1 - [English]" {or whatever the original track info said})
During testing, I actually did this...
- Output ES 0-4 via file output module...
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-all ":sout=#duplicate{dst=file{dst=file-es0.out.mkv},select=es=0,dst=file{dst=file-es1.out.mkv},select=es=1,dst=file{dst=file-es2.out.mkv},select=es=2,dst=file{dst=file-es3.out.mkv},select=es=3,dst=file{dst=file-es4.out.mkv},select=es=4}"
...that tries to output ES0 thru ES4 (I don't actually know if Elementary Streams count from 0 or 1, but I tried ES0 anyway). In my tests, the files file-es0.out.mkv, file-es3.out.mkv & file-es4.out.mkv were actually created, but were blank (0 bytes). Only file-es1.out.mkv & file-es2.out.mkv had data. So I think ES's count from 1...& my input file only had 2 audio tracks, so stopping at 2 makes sense.
Using the es output module...
- Output ES 1 via es output module...
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-all ":sout=#duplicate{dst=es{dst=es-es1.out.mkv},select=es=1}"
Output ES 2 via es output module...
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-all ":sout=#duplicate{dst=es{dst=es-es2.out.mkv},select=es=2}"
...here I only replaced file with es (& changed the output filename for clarity/testing). Remember, this is all guesswork, since I can find no info on what actually goes where.
Using this method seems a little worse, but better in another way?...
- Pros...
- Keeps Audio track meta-info (resulting file says "Track 1 - [English]" {or whatever the original track info said} instead of "Track 1")
- Cons...
- Loses the original container (mkv in my tests) (uses unknown default container or possibly no container) (file timing info says 0:00 for current position & length, but file plays fine in VLC)
During testing, I again did this...
- Output ES 0-4 via es output module...
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-all ":sout=#duplicate{dst=es{dst=es-es0.out.mkv},select=es=0,dst=es{dst=es-es1.out.mkv},select=es=1,dst=es{dst=es-es2.out.mkv},select=es=2,dst=es{dst=es-es3.out.mkv},select=es=3,dst=es{dst=es-es4.out.mkv},select=es=4}"
...this time, only es-es1.out.mkv & es-es2.out.mkv were output & had data (the non-existent ES's were not output as 0 bytes files).
Since that has the con of losing the original container (mkv in my tests), lets try to force mkv, shall we? After lots more searching & digging, I find "--sout-es-mux", but, of course, there's no info on "what goes after the equals sign?"...or "what muxers are available?". So, I just put things there & watch it bomb out!
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-es-mux=mkv --sout-all ":sout=#duplicate{dst=es{dst=es-es2.out.mkv},select=es=2}"
Results?...
- Tries to force mkv container (--sout-es-mux=mkv), fails, this doesn't work at all!
...I guess "mkv" isn't valid after that equals sign?, but nothing told me that did it? Too bad I'm not psychic...or maybe I am, cuz next I tried "mp4"...
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-es-mux=mp4 --sout-all ":sout=#duplicate{dst=es{dst=es-es2.out.mkv},select=es=2}"
Results?...
- Forces mp4 container (--sout-es-mux=mp4), works (file timing info works/displays correctly), but not correct if original file was mkv.
- Keeps Audio track meta-info (resulting file says "Track 1 - [English]" {or whatever the original track info said} instead of "Track 1")
...that seems pretty good, keep the audio track meta-info, lose the original container, replacing it with a container that preserves the timing info.
Also, in my searches, I found...
- --audiofile-file
- What does this do? Nothing...
Code: Select all
"vlc.exe" "file.in.mkv" --audiofile-file="file.out.mkv"
...no file output, no joy. Just plays the input file as if you didn't provide the --audiofile-file option. I'm sure I'm missing something about HOW to use it, but, again I'm NOT psychic!
--sout-select-enable
- What does this do? Nothing / Outputs ES1 like we can already do.
Code: Select all
"vlc.exe" "file.in.mkv" --no-sout-video --sout-select-enable=2 :sout=#file{dst=file.out.mkv}
...well that was fun, I'm gonna go smash my head into a wall now...
"why the f*** do i need a google+ account to comment on a video?" — jawed (2013) (about YouTube's new requirement of Google+)
youtube.lua — Play YouTube videos in VLC!
Updated: Thu, Jan 15, 2015 --- 1/15/15, 7:19:19pm EST
forum.videolan.org/viewtopic.php?f=29&t=111977&p=379147#p379147
Sigh, the above can't be a link: "You cannot use certain BBCodes: [url]."...so, I can't even link back to a post on this forum?
How about this: can long-term/trusted users be allowed links in sigs?