3

I have multiple steams in a TS MPEG2 file but when I try to open it, it only opens 1 specific video within a file. (WMP) When I open another it with another program it opens a different stream. Is there a program that allows me to split them and keep them in TS?

Thank you so much

General ID : 1283 (0x503) Complete name : G:\TV Shows\x\x.ts Format : MPEG-TS File size : 15.8 GiB Duration : 1h 38mn Start time : UTC 2012-05-30 11:02:45 End time : UTC 2012-05-30 12:40:54 Overall bit rate mode : Constant Overall bit rate : 23.0 Mbps Network name : Seven Network Country : AUS (2) / AUS (3) / AUS (4) / AUS (5) / AUS (6) / AUS (7) / AUS (8) Timezone : +10:00:00 / +10:00:00 / +10:00:00 / +09:30:00 / +08:00:00 / +10:00:00 / +09:30:00

Video #1 ID : 769 (0x301) Menu ID : 1332 (0x534) / 1329 (0x531) / 1328 (0x530) Format : MPEG Video Format version : Version 2

Video #2 ID : 801 (0x321) Menu ID : 1330 (0x532) Format : MPEG Video Format version : Version 2

Video #3 ID : 817 (0x331) Menu ID : 1331 (0x533) Format : MPEG Video Format version : Version 2

Video #4 ID : 881 (0x371) Menu ID : 1335 (0x537) Format : MPEG Video Format version : Version 2

Audio #1 ID : 770 (0x302) Menu ID : 1332 (0x534) / 1329 (0x531) / 1328 (0x530) Format : MPEG Audio Format version : Version 1

Audio #2 ID : 802 (0x322) Menu ID : 1330 (0x532) Format : MPEG Audio Format version : Version 1

Audio #3 ID : 819 (0x333) Menu ID : 1331 (0x533) Format : AC-3 Format/Info : Audio Coding 3

Audio #4 ID : 882 (0x372) Menu ID : 1335 (0x537) Format : MPEG Audio Format version : Version 1

Text #1 ID : 772 (0x304)-801 Menu ID : 1332 (0x534) / 1329 (0x531) / 1328 (0x530) Format : Teletext Subtitle Language : English

Text #2 ID : 804 (0x324)-801 Menu ID : 1330 (0x532) Format : Teletext Subtitle Language : English

Text #3 ID : 821 (0x335)-801 Menu ID : 1331 (0x533) Format : Teletext Subtitle Language : English

n0p
  • 3,399
  • 2
  • 29
  • 50
Chrisc
  • 31
  • 1
  • 3
  • Can someone please edit the code above so it looks nice! tried playing around with it but no idea :( – Chrisc Oct 14 '14 at 10:27
  • Did you find any solution?! If TS contain multiple programs (TV programs that captured by DVB-T), how can split it? For example I have a TS file that contain football + cooking + cartoon .How can i split this TS file to 3 mpg files? – Dr.jacky Jul 20 '15 at 12:58

1 Answers1

1

To simply extract streams for TS (i.e. demux) you can use ffmpeg. The following command will create output.mpeg with the program of index 1:

ffmpeg -i input.ts -y -c copy -map p:1 output.mpeg

Note that you can also remux it into a .ts file...

Another alternative is VLC's duplicate command line.

n0p
  • 3,399
  • 2
  • 29
  • 50
  • If TS contain multiple programs (TV programs that captured by DVB-T), how can split it? For example I have a TS file that contain football + cooking + cartoon .How can i split this TS file to 3 mpg files? – Dr.jacky Jul 20 '15 at 12:39
  • You have to identify the program you want to extract via their PMT (Program Map Table) then, use the matching index in the command example. – n0p Aug 03 '15 at 12:54
  • Yea, to convert MPTS to SPTS, your comment worked. But to seperate programs in SPTS, how can I do? – Dr.jacky Aug 03 '15 at 13:02
  • 1
    The comment is to get a `.MPEG` from a `.TS`. If I understand correctly you want to generate 3 `.TS` from the MPTS, unfortunately idk how to do this. I assume that you can extract the 3 program and for each of them generate a `.TS`. Maybe have a look at http://stackoverflow.com/q/23964980/3194340 – n0p Aug 03 '15 at 13:18
  • Output extension is not important for me. I just want to extract each program(music,football,cooking) from a SPTS. About that link, there is no documentation to how to use that tools! – Dr.jacky Aug 04 '15 at 05:07