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.

link|improve this question

feedback

2 Answers

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"
}'
link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.