Playing Multiple Files in VLC OSX

macOS specific usage questions
Thalass
New Cone
New Cone
Posts: 6
Joined: 16 Aug 2010 19:52

Playing Multiple Files in VLC OSX

Postby Thalass » 16 Aug 2010 20:10

Hey everyone,

I found information on this, but the two relevant threads I found were from mid 2008 and early 2009, and I'm wondering if there has been any updates. What lead me to inquire about this was a problem I encountered when I downloaded a file. The video and audio were separate files, and I needed to play the two of them at once. The files should have been packaged together, so technically it's the uploaders fault for not "bundling" the files (and also my fault still downloading the file), but I figured it wasn't that big of a deal.

Unable to find a solution on my own, I searched up how to play two files at once in VLC. I found an old thread that stated it was possible (since the 0.9 versions of VLC on Windows), but that there wasn't a solution for Mac OSX just yet. Another thread contained a post made by an admin (his name was FKuehne) that said that he had opened a ticket in the bug tracker to make sure this feature would be added in future versions.

I am running version 1.1.2 (which is the most up to date version that I'm aware of), and still I can't find the option to play two files synchronously on the Mac Version. Does this ability exist? And if not, can it be included in an update soon? I'm not a coder, but I'd assume that it can't be that hard to implement on Mac if it's already on the PC version. Thanks in advance for any help that anyone can offer, and hopefully I posted this in the right sub-forum. Thanks!

Matt

ajmas
Big Cone-huna
Big Cone-huna
Posts: 935
Joined: 04 Feb 2006 07:33
VLC version: 3.0.x
Operating System: MacOS X
Location: Montreal, Canada

Re: Playing Multiple Files in VLC OSX

Postby ajmas » 17 Aug 2010 18:01

I am not aware whether VLC can do the job, though assuming the streams are using MPEG4 compatible codecs, then you could look at a tool called subler (open source) :

http://code.google.com/p/subler/

I have used this in the past to add audio and subtitle tracks to an MPEG4 file I have.

What format are the streams in?

There may be a command-line option in VLC that I am not aware of - I haven't looked.
Providing logs, messages, configuration info (VLC, OS, Hardware) and a clear explanation of the issue always helps the problem solvers help you, even if they don't end up solving the issue. Just think what you would need if you were solving someone else's problem. Additional: Always looking for eager and capable MacOS X developers to join the VLC team - for more information see here.

Thalass
New Cone
New Cone
Posts: 6
Joined: 16 Aug 2010 19:52

Re: Playing Multiple Files in VLC OSX

Postby Thalass » 17 Aug 2010 19:07

The video file is in .mkv format, and the audio file is .ac3

I read a comment on the torrent's page that recommended a program that enables the "bundling" of files into an .mkv file. They said it was as easy as drag and drop. I looked it up, but from the (admittedly limited) research I did, it wasn't available for Mac OSX.

And yeah, I stumbled across a couple of command prompts, but both of the ones I tried failed to work. Here's the first one:
In the terminal I navigate to the directory which contains the movie.avi and the audio.mp3 I wish to play synchronously. Then:

$ /Applications/VLC.app/Contents/MacOS/VLC movie.avi --input-slave=audio.mp3
As he didn't give instructions that I understood (and it was a 2 year old post, so I couldn't ask), I wasn't really sure what to do with the prompt. So what I did was substitute "VLC Movie.avi" with the video file I was trying to load, and "audio.mp3" with the audio file I was trying to load. That didn't work for some reason, so I tried the second command prompt (which I actually understood). Here's what that one looked like:
Using the commandline isn't difficult. As dionoea said open up a terminal and enter:
Code: Select all
vlc <main_input> --input-slave <slave_input>

Where <main_input> and <slave_input> are the file locations of the two files. You should be able to drag and drop a file there as you write it as well.
When I enter that into the terminal (after replacing the files, as directed), I get the following error: -bash: syntax error near unexpected token `newline'


What does that mean? And is it possible for me to get this command line to work?

rusty149
Blank Cone
Blank Cone
Posts: 15
Joined: 17 Aug 2010 23:32

Re: Playing Multiple Files in VLC OSX

Postby rusty149 » 18 Aug 2010 00:05

The command line should include an equals for option values.

vlc URL [:option=value]
or
vlc <main_input> --input-slave=<slave_input>

but I'm not running mac so can't tell you right now. Also if the <main_input> already has audio then you will probably need to select the <slave_input> as audio track 2 from the audio menu after the playback has started or as another option e.g --audio-track=1 (track number is zero-base, i.e Track 1 = 0, Track 2 = 1)

Hope this helps, reply if it does not. :)

Thalass
New Cone
New Cone
Posts: 6
Joined: 16 Aug 2010 19:52

Re: Playing Multiple Files in VLC OSX

Postby Thalass » 18 Aug 2010 17:39

Well, the good news is that when I enter that prompt, I don't get an error back. It just starts a new line as normal.

The bad news is that when I opened up the video file and selected the "Audio" menu, it still only showed the one audio track, and the slave audio wasn't there. I tried entering the prompt prior to opening the video, as well as after opening the video. I didn't have any luck either way.

Any more ideas?

rusty149
Blank Cone
Blank Cone
Posts: 15
Joined: 17 Aug 2010 23:32

Re: Playing Multiple Files in VLC OSX

Postby rusty149 » 18 Aug 2010 19:31

That command should launch VLC and open the files for you.

You probably are not referring to the program correctly.
Try this:
/Applications/VLC.app/Contents/MacOS/VLC <main_input> --input-slave=<slave_input>

If this works and it is something you will do often you should be able to make an alias like this:
alias vlc='/Applications/VLC.app/Contents/MacOS/VLC'

then the original command I gave should work.

Thalass
New Cone
New Cone
Posts: 6
Joined: 16 Aug 2010 19:52

Re: Playing Multiple Files in VLC OSX

Postby Thalass » 19 Aug 2010 01:03

Unfortunately that gave me the same error again:
-bash: syntax error near unexpected token `newline'
What is that saying? I'm typing in (copy and pasting, actually) the prompt correctly as far as I know. Don't know why a syntax error is popping up.

Thanks for the help so far though; hopefully we can find a solution soon.

rusty149
Blank Cone
Blank Cone
Posts: 15
Joined: 17 Aug 2010 23:32

Re: Playing Multiple Files in VLC OSX

Postby rusty149 » 19 Aug 2010 01:54

Can you copy/paste the actual commands used here or screenshot them?

Are you dragging the movie file into the terminal for there full path names? Are you replacing the <main input> tags we are using?

-bash: syntax error near unexpected token `newline'
That means that you are not entering the command correctly. Possibly due to a space in the file name or missing a space between options.

Show me the exact command used so I can check it for the syntax error.

Thalass
New Cone
New Cone
Posts: 6
Joined: 16 Aug 2010 19:52

Re: Playing Multiple Files in VLC OSX

Postby Thalass » 19 Aug 2010 18:03

Alright, here's two photos of the process. For the most part, I've been copy/pasting the command you gave me, deleting the "main_input" and "slave_input" names, and replacing them with the file names (while keeping the brackets). I have also tried it by leaving "main_input" and "slave_input" within the brackets along with the file name, but that doesn't work either. Here's the pictures that illustrate what I mean:

After replacing the main_input and slave_input commands:

Image

Without replacing the commands:

Image

rusty149
Blank Cone
Blank Cone
Posts: 15
Joined: 17 Aug 2010 23:32

Re: Playing Multiple Files in VLC OSX

Postby rusty149 » 19 Aug 2010 18:44

Don't keep the brackets.
Use this:
/Applications/VLC.app/Contents/MacOS/VLC /Users/Home/Movies/Hidalgo/Hidalgo.2004.720p.BluRay.x264-SEPTiC.Rus.mkv --input-slave=/Users/Home/Movies/Hidalgo/Hidalgo_Eng.ac3

Or to select the slave audio track:
/Applications/VLC.app/Contents/MacOS/VLC /Users/Home/Movies/Hidalgo/Hidalgo.2004.720p.BluRay.x264-SEPTiC.Rus.mkv --input-slave=/Users/Home/Movies/Hidalgo/Hidalgo_Eng.ac3 --audio-track=1

Or to Shorten (Let me know if this works; never done it :D):
alias vlc=/Applications/VLC.app/Contents/MacOS/VLC
Then:
vlc /Users/Home/Movies/Hidalgo/Hidalgo.2004.720p.BluRay.x264-SEPTiC.Rus.mkv --input-slave=/Users/Home/Movies/Hidalgo/Hidalgo_Eng.ac3 --audio-track=1

Thalass
New Cone
New Cone
Posts: 6
Joined: 16 Aug 2010 19:52

Re: Playing Multiple Files in VLC OSX

Postby Thalass » 19 Aug 2010 19:21

The last "shortened" version didn't work, but the first one I tried did!

That'll do :D Thanks so much for the help, it's greatly appreciated!

Mudassar
New Cone
New Cone
Posts: 8
Joined: 17 Mar 2009 18:06

Re: Playing Multiple Files in VLC OSX

Postby Mudassar » 09 Sep 2010 12:29

Hi I am having the problem in MAC Os X 10.5, with VLC 1.1.2 I am triying the following command:

vlc ~/abc.MPG --input-slave= ~/audio.mp3

But its not playing the audio.mp3 it only plays video with its own audio, I tried to select audio trac from audio menu but there is onle one Track available, I also tried --audio-track=1 but its not working as well. Any clue?

rusty149
Blank Cone
Blank Cone
Posts: 15
Joined: 17 Aug 2010 23:32

Re: Playing Multiple Files in VLC OSX

Postby rusty149 » 27 Sep 2010 14:26

Try without space after =

Code: Select all

vlc ~/abc.MPG --input-slave=~/audio.mp3
Or if that doesn't work drag and drop the audio file into command line after typing the equals.
Type:

Code: Select all

vlc ~/abc.MPG --input-slave=
Then drop audio file at the end WITHOUT a space.


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 25 guests