muxing 2 es into 1 ts

About encoding, codec settings, muxers and filter usage
didi156
Blank Cone
Blank Cone
Posts: 12
Joined: 23 Nov 2005 10:01
Location: Vienna

muxing 2 es into 1 ts

Postby didi156 » 23 Nov 2005 11:40

This question may seem trivial, but searching the docs and the forum I couldn't find any enlighting information.
I want to mux a H.264 ES and a AC-3 ES into a TS.
Using the GUI (File->Streaming Assistant->Transcode...) I couldn't find a way to do this. Is there another place to do this? I'm not familiar with VLC yet.
Also, the cmd-line syntax is

Code: Select all

vlc input_stream --sout "#module1{option1=parameter1{parameter-option1},option2=parameter2}:#module2{option1=...,option2=...}:..."
since here only 1 "inpute_stream"-parameter is allowed, I also don't see how to do this here. I guess there may be a module which can do that, but I didn't find one...

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 23 Nov 2005 15:50

you need to do that with the bridge-out and bridge-in sout elements using the vlm interface. Have a look at the Mosaic howto on the wiki for more info : http://wiki.videolan.org/index.php/Mosaic
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

didi156
Blank Cone
Blank Cone
Posts: 12
Joined: 23 Nov 2005 10:01
Location: Vienna

Postby didi156 » 23 Nov 2005 19:32

That doesn't look as simple as I hoped (at a first look). Maybe I'll try this out, thanks.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 23 Nov 2005 22:26

an example vlm config would be :

Code: Select all

# this sends the 1st es to the bridge system new es1 broadcast enabled input <your input> output #bridge-out # this grabs the 1st es and groups it with the 2nd es. # you can change display to any normal sout element. # see streaming howto chapter 3 new es2 broadcast enabled input <your other input> output #bridge-in:display
(this hasn't been tested so their might still be some things to tweak)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

didi156
Blank Cone
Blank Cone
Posts: 12
Joined: 23 Nov 2005 10:01
Location: Vienna

Postby didi156 » 24 Nov 2005 09:49

I tried this out now.

Code: Select all

new es1 broadcast enabled input "/server/nfs/testfiles/SD-sample-video.264" output #bridge-out new es2 broadcast enabled input "/server/nfs/testfiles/SD-sample-audio.mp3" output '#bridge-in:display control es1 play control es2 play
I tried to add the "control play" commands seen in the howto, but doesn't do nothing.
I saved the config file in the directory where I launched vlc with:

Code: Select all

vlc -vvv --vlm-conf config.vlm
I don't get any console output indicating that something is to be done (only interface related debug).

I also tried with output module standard{mux=ts,url=mux.ts,access=file}.

Is the way I tried correct or did I miss something?

I also tried this config:

Code: Select all

new my_mux broadcast enabled setup my_mix input input "SD-sample-video.264" input "SD-sample-audio.mp3" setup my_mux output '#standard{mux=ts,access=file,url=mux.ts}' control my_mux play
seen in chapter 5. I guess this way the 2 streams are muxed without sync info (timestamps or whatever...), Is that correct?

Salut a Paris et merci beaucoup :-)[/code]

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 26 Nov 2005 00:14

to load vlm stuff you need to use the telnet or http interface. Just add "-I telnet" to your vlc command line.

bonne chance,
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

didi156
Blank Cone
Blank Cone
Posts: 12
Joined: 23 Nov 2005 10:01
Location: Vienna

Postby didi156 » 26 Nov 2005 13:49

Well, that was a good hint :-)

Now I get a lot more output of vlc. Again the vlm config I uesd:

Code: Select all

new es1 broadcast enabled input "/server/nfs/testfiles/encoding/ts/SD-sample-video.264" output #bridge-out new es2 broadcast enabled input "/server/nfs/testfiles/encoding/ts/SD-sample-audio.mp3" output '#bridge-in:standard{access=file,url=mux-es.out,mux=ts}'
after doing

Code: Select all

control es1 play control es2 play
in telnet terminal, I get all that debug output attached. I don't understand if I still miss something in the vlm script or if it simply can't handle H.264 muxing:

Code: Select all

[00000253] main input debug: set input option: sout to #bridge-out [00000253] main input debug: waiting for thread completion [00000253] main input debug: thread 1096129456 (input) created at priority 0 (src/input/input.c:249) [00000254] main stream output debug: stream=`bridge-out' [00000255] main private debug: looking for sout stream module: 1 candidate [00000182] main module debug: using sout stream module "stream_out_bridge" [00000253] main input debug: `/server/nfs/testfiles/encoding/ts/SD-sample-video.264' gives access `' demux `' path `/server/nfs/testfiles/encoding/ts/SD-sample-video.264' [00000253] main input debug: creating demux: access='' demux='' path='/server/nfs/testfiles/encoding/ts/SD-sample-video.264' [00000259] main demuxer debug: looking for access_demux module: 0 candidates [00000259] main demuxer warning: no access_demux module matched "any" [00000253] main input debug: creating access '' path='/server/nfs/testfiles/encoding/ts/SD-sample-video.264' [00000260] main access debug: looking for access2 module: 4 candidates [00000260] vcd access debug: trying .cue file: /server/nfs/testfiles/encoding/ts/SD-sample-video.cue [00000260] access_file access debug: opening file `/server/nfs/testfiles/encoding/ts/SD-sample-video.264' [00000138] main module debug: using access2 module "access_file" [00000265] main private debug: pre buffering [00000265] main private debug: received first data for our buffer [00000265] main private debug: prebuffering done 1408981 bytes in 0s - 145789 kbytes/s [00000253] main input debug: creating demux: access='' demux='' path='/server/nfs/testfiles/encoding/ts/SD-sample-video.264' [00000266] main demuxer debug: looking for demux2 module: 38 candidates [00000266] ts demuxer warning: TS module discarded (lost sync) [00000266] ffmpeg demuxer debug: detected format: h264 [00000253] main input debug: selecting program id=0 [00000266] ffmpeg demuxer debug: adding es: video codec = h264 [00000266] ffmpeg demuxer debug: AVFormat supported stream [00000266] ffmpeg demuxer debug: - format = h264 (raw H264 video format) [00000266] ffmpeg demuxer debug: - start time = -1 [00000266] ffmpeg demuxer debug: - duration = -1 [00000016] main module debug: using demux2 module "ffmpeg" [00000253] main input debug: looking for a subtitle file in /server/nfs/testfiles/encoding/ts/ [00000303] main packetizer debug: looking for packetizer module: 15 candidates [00000303] packetizer_h264 packetizer debug: found NAL_SPS [00000233] main module debug: using packetizer module "packetizer_h264" [00000253] main input debug: stream out mode -> no decoder thread [00000253] main input debug: starting in synch mode [00000253] main input debug: `/server/nfs/testfiles/encoding/ts/SD-sample-video.264' successfully opened [00000303] packetizer_h264 packetizer debug: found NAL_PPS [00000254] main stream output debug: adding a new input [00000255] stream_out_bridge private debug: bridging out input codec=h264 id=0 pos=0 [00000254] main stream output warning: trying to send non-dated packet to stream output! [00000254] main stream output warning: trying to send non-dated packet to stream output! [00000321] main input debug: set input option: sout to '#bridge-in:standard{access=file,url=mux-es.out,mux=ts}' [00000321] main input debug: waiting for thread completion [00000321] main input debug: thread 1117023152 (input) created at priority 0 (src/input/input.c:249) [00000322] main stream output debug: using sout chain=`std{mux="",access="'#bridge-in",url="standard{access=file,url=mux-es.out,mux=ts}'"}' [00000322] main stream output debug: stream=`std' [00000323] main private debug: looking for sout stream module: 1 candidate [00000323] main private warning: missing value for option mux [00000323] main private debug: set sout option: sout-standard-access to '#bridge-in [00000323] main private debug: set sout option: sout-standard-url to standard{access=file,url=mux-es.out,mux=ts}' [00000323] stream_out_standard private debug: creating `'#bridge-in/(null)://standard{access=file,url=mux-es.out,mux=ts}'' [00000323] stream_out_standard private debug: extention is out,mux=ts}' [00000323] stream_out_standard private debug: extention -> mux=(null) [00000323] stream_out_standard private error: no mux specified or found by extention [00000323] main private warning: no sout stream module matching "std" could be loaded [00000323] main private debug: destroying chain... (name=std) [00000323] main private debug: destroying chain done [00000322] main stream output error: stream chained failed for `std{mux="",access="'#bridge-in",url="standard{access=file,url=mux-es.out,mux=ts}'"}' [00000321] main input error: cannot start stream output instance, aborting [00000321] main input debug: thread 1117023152 joined (src/input/input.c:386) [00000253] main input debug: EOF reached [00000253] main input debug: closing input [00000016] main module debug: unlocking module "ffmpeg" [00000138] main module debug: unlocking module "access_file" [00000233] main module debug: unlocking module "packetizer_h264" [00000303] main packetizer debug: killing decoder fourcc `h264', 0 PES in FIFO [00000254] main stream output debug: removing an input [00000253] main input debug: destroying sout [00000255] main private debug: destroying chain... (name=bridge-out) [00000182] main module debug: unlocking module "stream_out_bridge" [00000255] main private debug: destroying chain done [00000253] main input debug: thread 1096129456 joined (src/input/input.c:386)

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 26 Nov 2005 19:13

try removing the quotes arrond '#bridge-in ....'
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

didi156
Blank Cone
Blank Cone
Posts: 12
Joined: 23 Nov 2005 10:01
Location: Vienna

Postby didi156 » 28 Nov 2005 12:32

yeah, that was it, thanks.
Now in the resulting mux the video stream plays to fast, but that's another issue...


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 11 guests