Append multiple files into one file.

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
netskink
Blank Cone
Blank Cone
Posts: 17
Joined: 07 Aug 2012 15:25

Append multiple files into one file.

Postby netskink » 08 Aug 2012 18:46

Hello

I was trying to use the vlc gui to append two files into one, but it did not work. I found a site on the wiki which gave info on how to do it. I used this method but it does not work. I get an output file with 0 bytes. Here is the batch file I used.



@echo off
set file1= xw-cw-top-heals-loss-a.avi
set file2= xw-cw-top-heals-loss-b.avi
vlc %file1% %file2% --sout "#gather:std{access=file,mux=ts,dst=out.avi}" --sout-keep

-----------------
I put this batch file in the directory where the two source avi files are located. I added the path to vlc.exe in my system path. Then I change directories to the directory where the two source files are located and run it. Running the batch file will pull up the vlc gui and it in the playlist pane it will show the two files and begin to save it - at least I think. The record button is red and it looks like it is doing something. When the red record button disables and the play progress bar stops, I close down vlc. In the folder where the two source files are located a new file named out.avi is located. However the file is zero bytes.

Once I get this working, I want to also want to merge an audio mp3 file. But, I can do that with the gui once I have a combined file.

John

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Append multiple files into one file.

Postby Rémi Denis-Courmont » 08 Aug 2012 19:11

I guess your Batch file syntax is incorrect.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

netskink
Blank Cone
Blank Cone
Posts: 17
Joined: 07 Aug 2012 15:25

Re: Append multiple files into one file.

Postby netskink » 08 Aug 2012 19:35

The batchfile generates the following output
vlc xw-cw-top-heals-loss-a.avi xw-cw-top-heals-loss-b.avi --sout "#gather:std{access=file,mux=ts,dst=out.avi}" --sout-keep

It looks like the same format as seen here:
http://wiki.videolan.org/How_to_Merge_a ... ple_Videos
which gives the following example
% vlc file1.ps file2.ps file3.ps --sout "#gather:std{access=file,mux=ts,dst=all.ts}" --sout-keep

The only change I have is the all.ts to out.avi which I think is just a filename.

netskink
Blank Cone
Blank Cone
Posts: 17
Joined: 07 Aug 2012 15:25

Re: Append multiple files into one file.

Postby netskink » 08 Aug 2012 20:19

Ahh, I've changed the mux=ts to mux=avi. I got the info via the #vlc channel on irc. I'll post the result when its done.

netskink
Blank Cone
Blank Cone
Posts: 17
Joined: 07 Aug 2012 15:25

Re: Append multiple files into one file.

Postby netskink » 08 Aug 2012 21:08

Well it did not really work. After it fixed the index, it truncated as soon at the first video.

netskink
Blank Cone
Blank Cone
Posts: 17
Joined: 07 Aug 2012 15:25

Re: Append multiple files into one file.

Postby netskink » 09 Aug 2012 16:30

So, it seems to work now. Here is how I did it.


@echo off
set file1= xw-cw-top-heals-loss-a.avi
set file2= xw-cw-top-heals-loss-b.avi
vlc %file1% %file2% --sout "#gather:std{access=file,mux=avi,dst=out.avi}" --sout-keep


This batch file takes two avi files and concats them to a new broken file.

Now, you need to convert/save this file using the gui to a new version. It will say the index is broken and it needs to rebuild it. Let it rebuild it.

Then you will get a new file, say out2.avi.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Append multiple files into one file.

Postby Jean-Baptiste Kempf » 10 Aug 2012 11:49

What is the version used?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

netskink
Blank Cone
Blank Cone
Posts: 17
Joined: 07 Aug 2012 15:25

Re: Append multiple files into one file.

Postby netskink » 10 Aug 2012 14:57

VLC Media Player 2.0.2 Twoflower
Win7 x64 OS

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Append multiple files into one file.

Postby Jean-Baptiste Kempf » 10 Aug 2012 16:15

OK, no idea. Sorry. Virtualdub is probably better for that.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

netskink
Blank Cone
Blank Cone
Posts: 17
Joined: 07 Aug 2012 15:25

Re: Append multiple files into one file.

Postby netskink » 10 Aug 2012 17:58

Hello Jean-Baptiste,

Ok. Np. So I have another problem. When I do manage to get a combined sound and video file, I can play it in vlc and it will play sound along with video. However, in windows media player it will only play video. If I try to upload to google, it says undefined server error. I think because the file is damaged. If I try to open it in virtual dub, it is also broken. It will says unsupported file type.

sam reckoner
New Cone
New Cone
Posts: 3
Joined: 23 Apr 2012 18:17

Re: Append multiple files into one file.

Postby sam reckoner » 07 Sep 2012 19:09

So, it seems to work now. Here is how I did it.


@echo off
set file1= xw-cw-top-heals-loss-a.avi
set file2= xw-cw-top-heals-loss-b.avi
vlc %file1% %file2% --sout "#gather:std{access=file,mux=avi,dst=out.avi}" --sout-keep


This batch file takes two avi files and concats them to a new broken file.

Now, you need to convert/save this file using the gui to a new version. It will say the index is broken and it needs to rebuild it. Let it rebuild it.

Then you will get a new file, say out2.avi.
I'm having the same problem. Here's my command line:

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc.exe" f1.mp4 f2.mp4 --sout-keep --sout=#gather:transcode{vcodec=h264,vb=128,scale=0.5,acodec=mp3,ab=128,channels=2}:standard{access=file,mux=ts,dst=All.mp4} --sout-all "vlc://quit"
what am I missing here? The output video has no time index. Is there something to change in this command-line that will fix this?

Any help greatly appreciated!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: blueice_haller and 119 guests