Code: Select all
# TS Batch
del all
# Input options
new chan1 broadcast enabled
setup chan1 input "file1.mpg"
setup chan1 option sout-ts-es-id-pid
setup chan1 option sout-ts-program-pmt="30"
setup chan1 option sout-ts-pid-video=31
setup chan1 option sout-ts-pid-audio=32
setup chan1 option sout-ts-sdtdesc="chan1 Out"
setup chan1 output #duplicate{dst=bridge-out{id=31},select=video,dst=bridge-out{id=32},select=audio}
new chan2 broadcast enabled
setup chan2 input "file2.mpg"
setup chan2 option sout-ts-es-id-pid
setup chan2 option sout-ts-program-pmt="40"
setup chan2 option sout-ts-pid-video=41
setup chan2 option sout-ts-pid-audio=42
setup chan2 option sout-ts-sdtdesc="chan2 Out"
setup chan2 output #duplicate{dst=bridge-out{id=41},select=video,dst=bridge-out{id=42},select=audio}
# Launch everything
control chan1 play
control chan2 play
new muxerout broadcast enabled
setup muxerout option sout-ts-tsid=1
setup muxerout option sout-ts-netid=10
setup muxerout option sout-ts-program-pmt="30,40"
setup muxerout option sout-ts-muxpmt="31,32,,41,42"
setup muxerout option sout-ts-sdtdesc="chan1,1,chan2,2"
setup muxerout output #bridge-in{id-offset=0}:duplicate{dst=std{access=http,mux=ts,dst=:8181}}
control muxerout play
# end of TS Batch
Code: Select all
#################################
# This VLM file does not work with VLC 2.x.x.
# Please use the latest version of VLC 1.x.x (tested in 1.1.12 in OS X and 1.1.11 in Windows XP)
# This VLM file takes 4 single program transport streams
# and muxes them into a single, multiple program transport stream.
# It outputs this muxed stream to a file and to a UDP IP address.
# Remove "dst=standard{access=file,mux=ts,dst=mux.ts}," from MuxTS output to remove file saving.
# Remove ",dst=standard{access=udp,mux=ts,dst=127.0.0.1:1234}" from MuxTS output to remove UDP streaming.
# Change all IP addresses as necessary. These are all loopback addresses, viewable only on the serving machine.
# Add or remove channels by following the PID, PMT, and bridge-out pattern.
# First channel must stream to the input of last muxed output channel, not bridge-out to it.
# This VLM file only loads in a location with no spaces in the file name OR file path
# e.g. "/Users/shortname/Desktop/broadcast.vlm" not "/Users/shortname/Desktop/Untitled Folder/broadcast.vlm"
# Adjust file paths on inputs to reflect your files or streams - valid MRLs only
# this means no "\" file path characters in Windows, use "file:///C:/path/to/file.ts".
# In OS X, use full paths, not characters like "~" for the file path.
# Ideally all stream inputs would be the same running time, or continuously running.
# The loop command seems to cut off some frames at end of each stream in the recorded file.
# OS X command in Terminal.app: /Applications/VLC.app/Contents/MacOS/VLC -I telnet --vlm-conf /Users/shortname/Desktop/vlc-test/broadcast.vlm
# To stop the configuration running press control-c in the open Terminal.app window.
# Windows command: "C:\Program Files\VideoLAN\VLC\vlc.exe" -I telnet --vlm-conf "C:\pathto\broadcast.vlm"
# Stop command: taskkill.exe /IM vlc.exe /F
# The Windows stop command kills all processes named vlc.exe, so use wisely.
# To open the muxed stream, open this network connection in VLC: udp://@127.0.0.1:1234
# Adjust IP addresses as necessary.
#################################
# reset VLM configuration
del all
#################################
# Create Channel 1 - This channel should stream to the last input
new Channel1 broadcast enabled loop
setup Channel1 input "file:///Users/shortname/Desktop/vlc-test/Channel1.ts"
setup Channel1 option sout-ts-es-id-pid
setup Channel1 option sout-ts-pid-video=110
setup Channel1 option sout-ts-pid-audio=120
setup Channel1 option sout-ts-program-pmt="100"
setup Channel1 output #standard{mux=ts,dst=127.0.0.1:8081,access=udp}
#################################
#################################
# Create Channel 2
new Channel2 broadcast enabled loop
setup Channel2 input "file:///Users/shortname/Desktop/vlc-test/Channel2.ts"
setup Channel2 option sout-ts-es-id-pid
setup Channel2 option sout-ts-pid-video=210
setup Channel2 option sout-ts-pid-audio=220
setup Channel2 option sout-ts-program-pmt="200"
setup Channel2 output #duplicate{dst=bridge-out{id=210},select=video,dst=bridge-out{id=220},select=audio}
#################################
#################################
# Create Channel 3
new Channel3 broadcast enabled loop
setup Channel3 input "file:///Users/shortname/Desktop/vlc-test/Channel3.ts"
setup Channel3 option sout-ts-es-id-pid
setup Channel3 option sout-ts-pid-video=310
setup Channel3 option sout-ts-pid-audio=320
setup Channel3 option sout-ts-program-pmt="300"
setup Channel3 output #duplicate{dst=bridge-out{id=310},select=video,dst=bridge-out{id=320},select=audio}
#################################
#################################
# Create Channel 4
new Channel4 broadcast enabled
setup Channel4 input "file:///Users/shortname/Desktop/vlc-test/Channel4.ts"
setup Channel4 option sout-ts-es-id-pid
setup Channel4 option sout-ts-pid-video=410
setup Channel4 option sout-ts-pid-audio=420
setup Channel4 option sout-ts-program-pmt="400"
setup Channel4 output #duplicate{dst=bridge-out{id=410},select=video,dst=bridge-out{id=420},select=audio}
#################################
#################################
# Create mux of channels above
# Feed first input's output into this input
# Output file gets placed in root of user folder
new MuxTS broadcast enabled loop
setup MuxTS input udp://@127.0.0.1:8081
setup MuxTS option sout-ts-es-id-pid
setup MuxTS option sout-ts-pid-video=510
setup MuxTS option sout-ts-pid-audio=520
setup MuxTS option sout-ts-tsid=1
setup MuxTS option sout-ts-netid=610
setup MuxTS option sout-ts-program-pmt="100,200,300,400,500"
setup MuxTS option sout-ts-muxpmt="110,120,,210,220,,310,320,,410,420"
setup MuxTS option sout-ts-sdtdesc="Sub-Channel Name 1,Program Name 1,Sub-Channel Name 2,Program Name 2,Sub-Channel Name 3,Program Name 3,Sub-Channel Name 4,Program Name 4"
setup MuxTS output #bridge-in{id-offset=0}:duplicate{dst=standard{access=file,mux=ts,dst=mux.ts},dst=standard{access=udp,mux=ts,dst=127.0.0.1:1234}}
#################################
# Play all channels
control Channel1 play
control Channel2 play
control Channel3 play
control Channel4 play
control MuxTS play
Code: Select all
#!/bin/bash
killall vlc
sleep 3
su someuser -c 'cvlc --daemon --intf=dummy --vlm-conf p005-test.cfg'
Code: Select all
# reset VLM configuration
del all
#################################
# Create Channel 1 - This channel should stream to the last input
new Channel1 broadcast enabled loop
setup Channel1 input http://192.168.3.11:31344
setup Channel1 option sout-ts-es-id-pid
setup Channel1 option sout-ts-pid-video=110
setup Channel1 option sout-ts-pid-audio=120
setup Channel1 option sout-ts-program-pmt="100"
setup Channel1 output #standard{mux=ts,dst=127.0.0.1:8081,access=udp}
#################################
#################################
# Create Channel 2
new Channel2 broadcast enabled loop
setup Channel2 input "http://192.168.3.12:31344"
setup Channel2 option sout-ts-es-id-pid
setup Channel2 option sout-ts-pid-video=210
setup Channel2 option sout-ts-pid-audio=220
setup Channel2 option sout-ts-program-pmt="200"
setup Channel2 output #duplicate{dst=bridge-out{id=210},select=video,dst=bridge-out{id=220},select=audio}
#################################
#################################
# Create Channel 3
new Channel3 broadcast enabled loop
setup Channel3 input http://192.168.3.13:31344
setup Channel3 option sout-ts-es-id-pid
setup Channel3 option sout-ts-pid-video=310
setup Channel3 option sout-ts-pid-audio=320
setup Channel3 option sout-ts-program-pmt="300"
setup Channel3 output #duplicate{dst=bridge-out{id=310},select=video,dst=bridge-out{id=320},select=audio}
#################################
#################################
# Create Channel 4
new Channel4 broadcast enabled
setup Channel4 input http://192.168.3.14:31344
setup Channel4 option sout-ts-es-id-pid
setup Channel4 option sout-ts-pid-video=410
setup Channel4 option sout-ts-pid-audio=420
setup Channel4 option sout-ts-program-pmt="400"
setup Channel4 output #duplicate{dst=bridge-out{id=410},select=video,dst=bridge-out{id=420},select=audio}
#################################
#################################
# Create mux of channels above
# Feed first input's output into this input
# Output file gets placed in root of user folder
new MuxTS broadcast enabled loop
setup MuxTS input udp://@127.0.0.1:8081
setup MuxTS option sout-ts-es-id-pid
setup MuxTS option sout-ts-pid-video=510
setup MuxTS option sout-ts-pid-audio=520
setup MuxTS option sout-ts-tsid=1
setup MuxTS option sout-ts-netid=610
#setup MuxTS option sout-ts-program-pmt="100,200,300,400,500"
#setup MuxTS option sout-ts-muxpmt="110,120,,210,220,,310,320,,410,420"
#setup MuxTS option sout-ts-sdtdesc="Sub-Channel Name 1,Program Name 1,Sub-Channel Name 2,Program Name 2,Sub-Channel Name 3,Program Name 3,Sub-Channel Name 4,Program Name 4"
#setup MuxTS output #bridge-in{id-offset=0}:duplicate{dst=standard{access=udp,mux=ts{program-pmt="100,200,300,400,500",muxpmt="110,120,,210,220,,310,320,,410,420"},dst=192.168.2.111:1234},dst=standard{access=file,mux=ts,dst=mux.ts}}
setup MuxTS output #bridge-in{id-offset=0}:std{access=udp,mux=ts{program-pmt="100,200,300,400,500",muxpmt="110,120,,210,220,,310,320,,410,420",sdtdesc="Sub-Channel Name 1,Program Name 1,Sub-Channel Name 2,Program Name 2,Sub-Channel Name 3,Program Name 3,Sub-Channel Name 4,Program Name 4"},dst=192.168.2.111:1234}
#################################
# Play all channels
control Channel1 play
control Channel2 play
control Channel3 play
control Channel4 play
control MuxTS play
Code: Select all
del all
new Channel2 broadcast enabled loop
setup Channel2 input http://192.168.3.11:31344
setup Channel2 output #duplicate{dst=bridge-out{id=210},select=video,dst=bridge-out{id=220},select=audio}
new Channel3 broadcast enabled loop
setup Channel3 input http://192.168.3.12:31344
setup Channel3 output #duplicate{dst=bridge-out{id=310},select=video,dst=bridge-out{id=320},select=audio}
new Channel4 broadcast enabled loop
setup Channel4 input http://192.168.3.13:31344
setup Channel4 output #duplicate{dst=bridge-out{id=410},select=video,dst=bridge-out{id=420},select=audio}
new Channel5 broadcast enabled
setup Channel5 input http://192.168.3.14:31344
setup Channel5 output #duplicate{dst=bridge-out{id=510},select=video,dst=bridge-out{id=520},select=audio}
# Channel 1 without video and audio pid ... help
new MuxTS broadcast enabled loop
setup MuxTS input http://192.168.3.7:31344
setup MuxTS output #bridge-in{id-offset=0}:std{access=udp,mux=ts{es-id-pid,tsid=1,netid=610,program-pmt="100,200,300,400,500",muxpmt="110,120,,210,220,,310,320,,410,420,,510,520",sdtdesc="Sub-Channel Name 1,Program Name 1,Sub-Channel Name 2,Program Name 2,Sub-Channel Name 3,Program Name 3,Sub-Channel Name 4,Program Name 4,Sub-Channel Name 5,Program Name 5"},dst=192.168.2.111:1234}
control Channel2 play
control Channel3 play
control Channel4 play
control Channel5 play
control MuxTS play
Code: Select all
new Channel1 broadcast enabled loop
setup Channel1 input "..."
setup Channel1 output #standard{mux=ts{no-es-id-pid,tsid=1,netid=760,pid-video=110,pid-audio=120,pid-pmt=100,program-pmt="1",sdtdesc="Provider,Channel1"},dst=226.0.10.99:1234,access=udp}
Users browsing this forum: No registered users and 7 guests