Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a multi-program input. I want to take each of the programs and transcode each of them separately (because one is 16:9, one is 4:3) and then RTP each of the streams to a different address.

The problem is that I can't figure out a way to nest quotes in a way that is acceptable to VLC. Mostly this is because I need to not only transcode and RTP, but also select the program.


cvlc multi-program-input-source.ts 
--sout '#duplicate{
  dst="transcode{width=640,height=360,OTHER_SETTINGS}:rtp{mux=ts,dst=SOMEWHERE,port=20000},select="program=3"",
  dst="transcode{width=704,height=480,OTHER_SETTINGS}:rtp{mux=ts,dst=SOMEWHERE,port=20002},select="program=4""
}'

I'm open to any solution, but if there is a way to select the program without quotes or in a way that I could nest them, that would be great.

share|improve this question
up vote 0 down vote accepted

The proper format is to end the "dst" with a double-quote and then quote the select statement.

cvlc multi-program-input-source.ts 
--sout '#duplicate{
  dst="transcode{width=640,height=360,OTHER_SETTINGS}:rtp{mux=ts,dst=SOMEWHERE,port=20000}",select="program=3",
  dst="transcode{width=704,height=480,OTHER_SETTINGS}:rtp{mux=ts,dst=SOMEWHERE,port=20002}",select="program=4"
}'
share|improve this answer

I'm not entirely sure this will work, but in a lot of operating systems, you can escape the inner quotes with a backslash (\"). So it would look like this:

cvlc multi-program-input-source.ts 
--sout '#duplicate{
  dst=\"transcode{width=640,height=360,OTHER_SETTINGS}:rtp{mux=ts,dst=SOMEWHERE,port=20000},select=\"program=3\"",
  dst="transcode{width=704,height=480,OTHER_SETTINGS}:rtp{mux=ts,dst=SOMEWHERE,port=20002},select=\"program=4\""
}'

I may have messed up which double quotes need escaped, but hopefully escaping the inner sets with \" will work for you.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .