How to stop VLC from re-muxing TS?

About encoding, codec settings, muxers and filter usage
shifty
New Cone
New Cone
Posts: 7
Joined: 17 Aug 2007 23:02

How to stop VLC from re-muxing TS?

Postby shifty » 17 Aug 2007 23:22

I enjoy to tinker on the side with various hardware and software. I downloaded VLC this week from the website (Ubuntu Feisty release). I absolutely love this software, and it has been great to do everything I need except one thing:

Since Monday I've been trying to get something working (and beating the search feature). I have a MPEG2 stream captured with specific ISO-13818 compliant data which I need my multicast clients to receive, unchanged.

I setup VLC GUI for UDP stream, the clients see the video, however, I notice that VLC always forces re-muxing the data, which changes the content of the stream to something I do not want. I need ES, TS, PS, PMT, PAT, SDT, etc. (basically all data) to remain intact from input to output.

Is it possible to only have VLC output RAW packets from an MPEG2 stream, so that no important PIDs and other data are lost/mangled/changed? I cannot seem to make it work, and after 5 days, I finally give up and ask for help. Any help or suggestions are appreciated. Here is a log that shows the re-muxing to create new PAT, PMT and other data which is driving me crazy!

(If someone can find a post about this, please tell me, I find nothing)

Code: Select all

main debug: adding playlist item `/streams/1-Test-Stream.ts' ( /streams/1-Test-Stream.ts ) main debug: creating new input thread main debug: waiting for thread completion main debug: stream=`duplicate' main debug: looking for sout stream module: 1 candidate stream_out_duplicate debug: creating 'duplicate' stream_out_duplicate debug: * adding `std{access=udp,mux=ts,dst=233.1.1.5:1234}' main debug: stream=`std' main debug: looking for sout stream module: 1 candidate main debug: thread 1140881728 (input) created at priority 0 (input/input.c:265) main debug: set sout option: sout-standard-access to udp main debug: set sout option: sout-standard-mux to ts main debug: set sout option: sout-standard-dst to 233.1.1.5:1234 stream_out_standard debug: creating `udp/ts://233.1.1.5:1234' stream_out_standard debug: extension is 5:1234 stream_out_standard debug: extension -> mux=(null) stream_out_standard debug: using `udp/ts://233.1.1.5:1234' main debug: looking for sout access module: 1 candidate main debug: net: connecting to 233.1.1.5 port 1234 main debug: thread 1132489024 (sout write thread) created at priority 0 (udp.c:268) access_output_udp debug: udp access output opened(233.1.1.5:1234) main debug: using sout access module "access_output_udp" stream_out_standard debug: access opened main debug: looking for sout mux module: 1 candidate mux_ts debug: shaping=200000 pcr=70000 dts_delay=400000 main debug: using sout mux module "mux_ts" main debug: muxer support adding stream at any time stream_out_standard debug: mux opened main debug: using sout stream module "stream_out_standard" main debug: using sout stream module "stream_out_duplicate" main debug: `/streams/1-Test-Stream.ts' gives access `' demux `' path `/streams/1-Test-Stream.ts' main debug: creating demux: access='' demux='' path='/streams/1-Test-Stream.ts' main debug: looking for access_demux module: 2 candidates main debug: creating access '' path='/streams/1-Test-Stream.ts' main debug: looking for access2 module: 5 candidates vcd debug: trying .cue file: /streams/1-Test-Stream.cue vcd debug: could not find .cue file access_file debug: opening file `/streams/1-Test-Stream.ts' main debug: using access2 module "access_file" main debug: pre-buffering... main debug: received first data for our buffer main debug: pre-buffering done 1408981 bytes in 0s - 206383 kbytes/s main debug: creating demux: access='' demux='' path='/streams/1-Test-Stream.ts' main debug: looking for demux2 module: 45 candidates main debug: using demux2 module "ts" main debug: looking for a subtitle file in /streams/ ts debug: DEMUX_SET_GROUP 0 (nil) main debug: starting in sync mode main debug: `/streams/1-Test-Stream.ts' successfully opened ts debug: pid[4368] unknown ts debug: pid[4370] unknown ts debug: pid[4438] unknown ts debug: pid[4436] unknown ts debug: pid[4422] unknown ts debug: pid[4420] unknown ts debug: pid[4406] unknown ts debug: pid[4404] unknown ts debug: pid[4390] unknown ts debug: pid[4388] unknown ts debug: pid[1] unknown ts debug: pid[1278] unknown ts debug: PATCallBack called ts debug: new PAT ts_id=1 version=1 current_next=1 ts debug: * number=11 pid=1278 ts debug: PSINewTableCallBack: table 0x42(66) ext=0x1(1) ts debug: SDTCallBack called ts debug: new SDT ts_id=1 version=3 current_next=1 network_id=49 ts debug: * service id=11 eit schedule=1 present=1 running=4 free_ca=0 ts debug: - type=1 provider=nagra name=11 CLR main debug: EsOutProgramMeta: number=11 main debug: - Name = 11 CLR main debug: - Provider = nagra main debug: - Type = Digital television service main debug: - Status = Running main debug: Trying to add meta for non-existing program ts debug: * service id=36000 eit schedule=0 present=0 running=1 free_ca=0 main debug: EsOutProgramMeta: number=36000 main debug: - Status = Not running ts debug: PMTCallBack called ts debug: new PMT program number=11 version=1 pid_pcr=4368 ts debug: * es pid=4368 type=2 fcc=mpgv main debug: selecting program id=11 main debug: looking for packetizer module: 17 candidates main debug: using packetizer module "packetizer_mpegvideo" main debug: stream out mode -> no decoder thread ts debug: * es pid=4370 type=4 fcc=mpga main debug: looking for packetizer module: 17 candidates main debug: using packetizer module "mpeg_audio" main debug: stream out mode -> no decoder thread ts warning: first packet for pid=4368 cc=0xc ts warning: first packet for pid=4370 cc=0x1 ts debug: PSINewTableCallBack: table 0x51(81) ext=0xb(11) packetizer_mpegvideo debug: waiting for sequence start mpeg_audio debug: MPGA channels:2 samplerate:48000 bitrate:320 main debug: adding a new input stream_out_duplicate debug: duplicated a new stream codec=mpga (es=4370 group=11) main debug: adding a new input mux_ts debug: adding input codec=mpga pid=68 mux_ts debug: new PCR PID is 68 stream_out_duplicate debug: - added for output 0 packetizer_mpegvideo debug: waiting for sequence start packetizer_mpegvideo debug: size 704x576 fps=25.000 main debug: adding a new input stream_out_duplicate debug: duplicated a new stream codec=mpgv (es=4368 group=11) main debug: adding a new input mux_ts debug: adding input codec=mpgv pid=69 mux_ts debug: new PCR PID is 69 stream_out_duplicate debug: - added for output 0 ts debug: pid[16] unknown ts debug: PSINewTableCallBack: table 0x4e(78) ext=0xb(11) mux_ts debug: adjusting rate at -481245/239989 (8/846) ts debug: pid[20] unknown access_output_udp debug: mmh, packets in the past (476137) access_output_udp debug: packet has been sent too late (470721) access_output_udp debug: packet has been sent too late (464766) access_output_udp debug: packet has been sent too late (458809) access_output_udp debug: packet has been sent too late (452852) access_output_udp debug: packet has been sent too late (446896) access_output_udp debug: packet has been sent too late (440941) access_output_udp debug: packet has been sent too late (434984) access_output_udp debug: packet has been sent too late (429028) access_output_udp debug: packet has been sent too late (423069) access_output_udp debug: packet has been sent too late (417118) access_output_udp debug: packet has been sent too late (411158) access_output_udp debug: packet has been sent too late (405196) access_output_udp debug: packet has been sent too late (399235) access_output_udp debug: packet has been sent too late (393275) access_output_udp debug: packet has been sent too late (387314) access_output_udp debug: packet has been sent too late (381354) access_output_udp debug: packet has been sent too late (375397) access_output_udp debug: packet has been sent too late (369436) access_output_udp debug: packet has been sent too late (363477) access_output_udp debug: packet has been sent too late (357517) access_output_udp debug: packet has been sent too late (351560) access_output_udp debug: packet has been sent too late (345600) access_output_udp debug: packet has been sent too late (339639) access_output_udp debug: packet has been sent too late (333685) access_output_udp debug: packet has been sent too late (327724) access_output_udp debug: packet has been sent too late (321764) access_output_udp debug: packet has been sent too late (315803) access_output_udp debug: packet has been sent too late (309844) access_output_udp debug: packet has been sent too late (303883) access_output_udp debug: packet has been sent too late (297925) access_output_udp debug: packet has been sent too late (291966) access_output_udp debug: packet has been sent too late (286006) access_output_udp debug: packet has been sent too late (280046) access_output_udp debug: packet has been sent too late (274086) access_output_udp debug: packet has been sent too late (268125) access_output_udp debug: packet has been sent too late (262165) access_output_udp debug: packet has been sent too late (256205) access_output_udp debug: packet has been sent too late (250244) access_output_udp debug: packet has been sent too late (244289) access_output_udp debug: packet has been sent too late (238329) access_output_udp debug: packet has been sent too late (232368) access_output_udp debug: packet has been sent too late (226407) access_output_udp debug: packet has been sent too late (220448) access_output_udp debug: packet has been sent too late (214487) access_output_udp debug: packet has been sent too late (208528) access_output_udp debug: packet has been sent too late (202646) access_output_udp debug: packet has been sent too late (196686) access_output_udp debug: packet has been sent too late (190726) access_output_udp debug: packet has been sent too late (184766) access_output_udp debug: packet has been sent too late (178806) access_output_udp debug: packet has been sent too late (172846) access_output_udp debug: packet has been sent too late (166886) access_output_udp debug: packet has been sent too late (160925) access_output_udp debug: packet has been sent too late (154965) access_output_udp debug: packet has been sent too late (149005) access_output_udp debug: packet has been sent too late (143045) access_output_udp debug: packet has been sent too late (137085) access_output_udp debug: packet has been sent too late (131124) access_output_udp debug: packet has been sent too late (125163) access_output_udp debug: packet has been sent too late (119204) access_output_udp debug: packet has been sent too late (113242) access_output_udp debug: packet has been sent too late (107303) access_output_udp debug: packet has been sent too late (101344) access_output_udp debug: packet has been sent too late (95382) access_output_udp debug: packet has been sent too late (89422) access_output_udp debug: packet has been sent too late (83462) access_output_udp debug: packet has been sent too late (77502) access_output_udp debug: packet has been sent too late (71541) access_output_udp debug: packet has been sent too late (65581) access_output_udp debug: packet has been sent too late (59620) access_output_udp debug: packet has been sent too late (53659) access_output_udp debug: packet has been sent too late (47699) access_output_udp debug: packet has been sent too late (41738) access_output_udp debug: packet has been sent too late (35777) access_output_udp debug: packet has been sent too late (29818) access_output_udp debug: packet has been sent too late (23862) ts debug: EITCallBack called ts debug: new EIT service_id=11 version=9 current_next=1 ts_id=1 network_id=49 segment_last_section_number=1 last_table_id=78 ts debug: * event id=14704 start_time:mjd=53311 17:00:00 duration=01:00:00 running=0 free_ca=0 ts debug: - short event lang=spa 'Untitled 36' : '' ts debug: * event id=14705 start_time:mjd=53311 18:00:00 duration=01:00:00 running=0 free_ca=0 ts debug: - short event lang=spa 'Untitled 37' : '' main debug: EsOutProgramMeta: number=11 main debug: - Event 14704 = 17:00:00: Untitled 36 (+01:00:00) () main debug: - Event 14705 = 18:00:00: Untitled 37 (+01:00:00) () main debug: - Now Playing = ts debug: PSINewTableCallBack: table 0x50(80) ext=0xb(11) ts debug: pid[117] unknown

shifty
New Cone
New Cone
Posts: 7
Joined: 17 Aug 2007 23:02

Re: How to stop VLC from re-muxing TS?

Postby shifty » 18 Aug 2007 20:15

Ok, so, I decided to move to command line for more flexibility. I read the longhelp/advanced section and did several things. I still could not stop VLC from remuxing with new SI/PSI data.

I have a solution, but it is not perfect. My friend stayed up late last night to hack the live555 source so to output the streams in an unmolested/unchanged state, and it works! The bad part is, it is all CLI commands, and you must calculate the bitrate of the stream and use this value in the command line. After talking to him, it seems that the hacks were not very complex, so this makes me wonder if ... well, if maybe VLC would also do it?

I realize it has only been a day since I created this thread, but, simply, if someone could post a "yes, this is possible for VLC" or "no, VLC will always change the PSI/SI data", this would be great! I would prefer to use VLC, but if VLC does not support this, I would love to move on! :D

Meanwhile, I want to say thanks - this software is a great package. It is clear a lot of work went into it!

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Re: How to stop VLC from re-muxing TS?

Postby funman » 18 Aug 2007 22:30

i'm not sure, but you may have more luck using VLS (VideoLan Server), even if that product isn't maintained anymore.

i know it's not able to transcode, but not sure if it can stream data without remuxing

shifty
New Cone
New Cone
Posts: 7
Joined: 17 Aug 2007 23:02

Re: How to stop VLC from re-muxing TS?

Postby shifty » 19 Aug 2007 21:29

i'm not sure, but you may have more luck using VLS (VideoLan Server), even if that product isn't maintained anymore.

i know it's not able to transcode, but not sure if it can stream data without remuxing
Thanks for the response!

I guess re-muxing is not truly the problem, maybe the topic of this thread is bad -- I'm *OK* with VLC re-muxing the stream, I just want it to be re-mux'd with the same PID values :), so the STB I'm playing with will see the content *exactly* is if it were coming from the original DVB source (only the stream I am giving it is recorded, however). I want all of the CA information to remain intact, EMMs, ECMs, CA descriptors ... everything, this is important to my testing (I am working on PSI drivers for experimental hardware at home).

All of the other software I am finding online will only take from a DVB source (ASI input, etc) and uni/multicast that data over IP (unchanged SI/PSI data). I want something that will treat the 'input stream' from a file on my computer, then multicast out the NIC.

VLC is incredibly close. I installed VLS day before yesterday, but the setup was complex (cfg files, etc) so I started looking for other solutions .... VLC is as close as it gets to perfect.

I am still nearly convinced that it would be possible to do this with VLC, I think I am just missing something.

shifty
New Cone
New Cone
Posts: 7
Joined: 17 Aug 2007 23:02

Re: How to stop VLC from re-muxing TS?

Postby shifty » 20 Aug 2007 23:17

I took your advice and tried using VLS today. I made the config file (based on instructions from documentation), setup this vls.cfg for logging, input name, input type/description/location, channels (multicast/network) and associated addresses, then the LaunchOnStartUp entry to launch "start Pgrm1 multicast1 local1 --loop" and ... nothing :) Sniffing for packets, it does not seem to output, even with "Interface" defined and running as root. I sniffed for packets at the multicast router of this network and nothing!

Is there some place to get support for VLC? I still have no 'official' answer if VLC will remux the TS with the original PID values. Is there some flag to do this from the command line? I do not want to bother about this, but I would love to have an "authoritative" answer on the topic.

If it does not, I guess I am just out of luck :( I didn't want to pay someone write a solution, but realistically, I would have paid a few hundred $$$ USD for something to do this with a simple interface. Nothing is free these days, I guess!

hihi
Blank Cone
Blank Cone
Posts: 49
Joined: 09 Jan 2007 08:48

Re: How to stop VLC from re-muxing TS?

Postby hihi » 20 Aug 2007 23:56

Hi,

I'm also using VLC to stream a TS that supose to be complient with DVB, but I've difficulties with the SDT I'm trying to include the service name without any succes ... Does anyone have documentation how to use the --sout-ts-sdtdesc or --sout-ts-program-pmt.

On an other thing that I'm working on is to extract EIT info from an DVB UDP stream, is it possible to save the EPG data into a file?

Anyway the remuxing itselves is working fine.

shifty
New Cone
New Cone
Posts: 7
Joined: 17 Aug 2007 23:02

Re: How to stop VLC from re-muxing TS?

Postby shifty » 21 Aug 2007 18:12

remuxing is great if you don't care about PID value consistency from the original stream. i know my stream is DVB compliant (it is captured off a live headend :D), but ... that is another story entirely.

about dumping the content of your stream, there are several tools out there. searching Google for 'mpeg dump' will produce a lot of results, here is a Windows executable that showed up as result #1 at Google: http://www.ifp.uiuc.edu/~rwang/mpeg_dump.html (I cannot vouch for this software, I have never used it).

a full list of commands available for VLC can be obtained by typing 'vlc --longhelp --advanced' at the command prompt.

full documentation for VLC and VLS and its application are here: http://www.videolan.org/doc/

for command-line help with the --sout flags you are speaking about, please see the Wiki page covering these topics: http://wiki.videolan.org/VLC_command-line_help

if that page is down, try accessing the cached page from Google search here: http://tinyurl.com/yugzba (may take a sec to load)

note that you need to use --sout-ts-es-id-pid if you want to use --sout-ts-program-pmt !

good luck to you :) i may not be able to get help, but i don't mind offering it ;)

hihi
Blank Cone
Blank Cone
Posts: 49
Joined: 09 Jan 2007 08:48

Re: How to stop VLC from re-muxing TS?

Postby hihi » 21 Aug 2007 21:41

Hi,

The Pid values are no problem from the conf file:

Code: Select all

# Output options new stream1 broadcast enabled setup stream1 input "somefile" setup stream1 output #std{access=udp{ttl=5},mux=ts,dst=225.1.1.77:2000} # TS options setup stream1 option sout-ts-pid-video=2899 setup stream1 option sout-ts-pid-pmt=2897 setup stream1 option sout-ts-tsid=11 setup stream1 option sout-ts-netid=511 setup stream1 option sout-ts-program-pmt=1105 # Launch everything control stream1 play
Dont forget to use the PCR option, caus I think the standard is max 50 instead of 70 :roll:

Code: Select all

setup stream1 option sout-ts-pcr=50
The only things that dont work are the "netid=511" (it doesnt come out that way :? ) and I dont know how to "name" my streaming service (like RTV-Polonia) ?!

In the -long -help -vlc it sais:
--sout-ts-sdtdesc <tekst> (no example of <tekst> ... dont know how to use it if anyone has an idea please LET ME KNOW :x )

BTW from with Headend are you capturing, I'm interested to capture the EIT info because it isnt scrambled and I want to store the data like EPG ...

Gujs
Blank Cone
Blank Cone
Posts: 74
Joined: 22 Oct 2004 19:28

Re: How to stop VLC from re-muxing TS?

Postby Gujs » 21 Aug 2007 22:00

I am also interested in tool for extracting EIT data from DVB transponders!

shifty
New Cone
New Cone
Posts: 7
Joined: 17 Aug 2007 23:02

Re: How to stop VLC from re-muxing TS?

Postby shifty » 22 Aug 2007 04:39

Unfortunately I cannot talk about what HE I am getting my feeds from :)

hihi
Blank Cone
Blank Cone
Posts: 49
Joined: 09 Jan 2007 08:48

Re: How to stop VLC from re-muxing TS?

Postby hihi » 23 Aug 2007 17:26

last time I was trying to save a certain service (program) from a live UDP TS but is wasn't working, and I dont know why. here is the code:

Code: Select all

# Input options new testing1 broadcast enabled setup testing1 input "udp://1.1.1.1@224.1.1.1:1234" setup testing1 output '#duplicate{dst=standard{access=file,mux=ts,dst=fileA.ts},select="video,program=545",dst=standard{access=file,mux=ts,dst=fileB.ts},select="video,program=547"}' # Launch everything control testing1 play
I dont see anything wrong on the code ... anyone idea?

tskd
New Cone
New Cone
Posts: 2
Joined: 23 May 2008 07:23

Re: How to stop VLC from re-muxing TS?

Postby tskd » 23 May 2008 07:34

Hi,

Any news on how to stop VLC remuxing the Transport stream?
Atleast how to preserve the transport stream and not mutilate it by stripping the descriptors off??

Please advice.

Thanks!

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

Re: How to stop VLC from re-muxing TS?

Postby Rémi Denis-Courmont » 23 May 2008 16:13

If you want to bypass demux and remux, I wonder why you bother with VLC. You might as well use netcat -U and pipe the result to a file.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

tskd
New Cone
New Cone
Posts: 2
Joined: 23 May 2008 07:23

Re: How to stop VLC from re-muxing TS?

Postby tskd » 04 Jun 2008 06:58

Netcat, Socat etc. wont work because they dont stream in the 188 byte TS format right?

kvmsanand
New Cone
New Cone
Posts: 2
Joined: 19 Aug 2008 22:22

Re: How to stop VLC from re-muxing TS?

Postby kvmsanand » 20 Aug 2008 14:41

hi everyone, even i have the same problem. i want vlc not to remux the stream but to stream the transport stream as it is?? any pointers are appreciated....

thanks
anand...


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: Google [Bot] and 8 guests