Split out two video streams fro one .TS file

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Video360-2
New Cone
New Cone
Posts: 3
Joined: 18 May 2016 16:20

Split out two video streams fro one .TS file

Postby Video360-2 » 18 May 2016 20:02

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

Video360-2
New Cone
New Cone
Posts: 3
Joined: 18 May 2016 16:20

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

Postby Video360-2 » 18 May 2016 20:04

PS: I want to preserve the quality and resolution of the streams.

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

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

Postby kmf31 » 18 May 2016 23:13

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).

Video360-2
New Cone
New Cone
Posts: 3
Joined: 18 May 2016 16:20

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

Postby Video360-2 » 19 May 2016 14:31

Thank you for suggesting this - it opens VLC and closed quickly and creates a zero length file outputfile.ts

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

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

Postby kmf31 » 19 May 2016 20:45

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.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 59 guests