Page 1 of 1

Joining two video files with VLC?

Posted: 11 Feb 2007 11:55
by damocles
Is it possible to append one video file onto the end of another using VLC's stream outputs? If yes, can someone give me some hints on where to get started (eg what command line options would be best, etc)

Posted: 11 Feb 2007 16:30
by dionoea

Code: Select all

vlc input1 input2 --sout "#std{access=file,mux=ts,dst=file.ts}" --sout-keep
Of course you might need to change the mux but this should basically work. (you also might need to transcode)

Posted: 11 Feb 2007 18:34
by damocles
Using the command line you gave half works - it made a combined file of the two files, but forgot to include the video :) So assuming it to be a transcoding issue, I tried this:

Code: Select all

"c:\vlc\vlc" -vvv "d:\media\video1.avi" "d:\media\video2.avi" --sout=#transcode{vcodec=WMV2,scale=1,acodec=wma,ab=96,channels=2}:duplicate{dst=std{access=file,mux=asf,dst="D:\media\test.wmv"}} --sout-keep
I figured I might as well get it ready for 360 streaming while I'm combining it. Sadly though this only transcoded the first file and output it to test.wmv. However, although it went through the transcoding process for the second file, it didn't seem to save it anywhere - certainly not on the end of the first file. Now, I'm not that hot with vlc's command line, so I may be doing something obviously wrong, but I don't know what it is. Anyone know where I'm going wrong?

HELP Please Joining Merging files Driving me Mad

Posted: 07 Mar 2007 02:22
by bgidman
I know theoretically I should be able to join files using vlc but after a whole week of trying I've hit a brick wall. I can combine two files of which the first file plays ok but as soon as the second part of the file in the merged file tries to play it crashes. I think it maybe to do with headers or 2 streams in one file.

I've used a variation of the above code as follows:

"c:\vlc\vlc" %1 %2 --sout #std{access=file,mux=asf,dst=%1.wmv} --sout-file-append vlc:quit

transcoding does'nt seem to make any difference as I've tried:

"c:\vlc\vlc" -vvv %1 %2 --sout-ffmpeg-qscale 1 --sout=#transcode{vcodec=WMV2,width=640,height=360,acodec=wma,ab=96,channels=2}:duplicate{dst=std{access=file,mux=asf,dst=%1.wmv --sout-file-append vlc:quit

I'm stuck too!

Posted: 17 Mar 2007 17:02
by kewa
Hi

I've spent hours trying so many different ways of joining 2 files all without success so I'd really appreciate some help as I'm obviously doing something stupid.

I'm using VLC 0.8.6a with Windows XP Home.

I have 2 files C:\MyVideos\Shaun1.ts and C:\MyVideos\Shaun2.ts which I'm looking to join together in a single file C:\MyVideos\CompleteShaun.ts

I'm going to File, Open File and select the files above using the Browse button which displays as "C:\MyVideos\Shaun1.ts" "C:\MyVideos\Shaun2.ts" then checking Stream/Save and clicking on the Settings button.

Under Output I check File and put C:\MyVideos\CompleteShaun.ts in Filename.

Under Encapsulation Method the MPEG TS radio button is checked

When the process starts the new file C:\MyVideos\CompleteShaun.ts is created and the file size grows as C:\MyVideos\Shaun1.ts is processed. Everything seems to go OK but when the second file starts to process it recreates the output file thus overwriting the contents with C:\MyVideos\Shaun2.ts.

So, I'm nearly there to the extent that I'm creating outputs from the inputs but unfortunately they aren't joined.

I've tried using the code posted above by Dionoea: vlc input1 input2 --sout "#std{access=file,mux=ts,dst=file.ts}" --sout-keep

and changed this to vlc "C:\MyVideos\Shaun1.ts" "C:\MyVideos\Shaun2.ts" --sout "#std{access=file,mux=ts,dst=C:\MyVideos\CompleteShaun.ts}" --sout-keep

but I may be putting this in the wrong place

Please can someone explain in simple terms what I need to do to crack this.

Many thanks in anticipation

Kewa

Posted: 16 Apr 2007 12:00
by papako
try with command line
copy /b video1.ts + video2.ts output.ts

it works