Page 1 of 1

Split out two video streams fro one .TS file

Posted: 18 May 2016 20:02
by Video360-2
Hello All - thank you for giving me access to seek assistance with this.

I have a .TS video file that has two video streams inside it.

I want to use VLC command line to separate these two streams into two separate MP4 video files - I'm not really bothered about the audio.

I have tried to work this out but can't get anywhere with it and I hoped someone may be able to give me the command line?

Here is a MediaInfo report of the file:

Video #1
ID : 256 (0x100)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L5.2
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Width : 2 048 pixels
Height : 2 048 pixels
Display aspect ratio : 1.000
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive

Video #2
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L5.2
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Width : 2 048 pixels
Height : 2 048 pixels
Display aspect ratio : 1.000
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive

Audio
ID : 258 (0x102)
Menu ID : 1 (0x1)
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 2
Format profile : LC
Muxing mode : ADTS
Bit rate mode : Variable
Channel(s) : 1 channel
Sampling rate : 44.1 KHz
Resolution : 16 bits
Video delay : -367ms

Re: Split out two video streams fro one .TS file

Posted: 18 May 2016 20:04
by Video360-2
PS: I want to preserve the quality and resolution of the streams.

Re: Split out two video streams fro one .TS file

Posted: 18 May 2016 23:13
by kmf31
You can try (as command line):

vlc inputfile.ts --program=256 --no-sout-all --sout=file/ts:outputfile.ts vlc://quit

where 256 corresponds to the id of the first video track (in your file) but I am not sure if this works. Normally the option "--program" is for DVB TS-streams with several channels inside (but one video track and several possible audio tracks attributed to a "program"/channel).

Re: Split out two video streams fro one .TS file

Posted: 19 May 2016 14:31
by Video360-2
Thank you for suggesting this - it opens VLC and closed quickly and creates a zero length file outputfile.ts

Re: Split out two video streams fro one .TS file

Posted: 19 May 2016 20:45
by kmf31
The problem is that there is no option for choosing the video-track (contrary to audio-track) and there are quite some discussions on this point in the web (here and in other forums) easily found by google (e.g.: put "vlc select video track" in google).

You may try the same command line but without "--program=256", i.e.:

Code: Select all

vlc inputfile.ts --no-sout-all --sout=file/ts:outputfile.ts vlc://quit
Due to the option "--no-sout-all" it should select only one video track, the first one, at least I hope/think so. If this works you have 50% of the solution.