# UDP Stream

**URL:** <https://casparcgforum.org/t/udp-stream/5007>\
**Category:** General\
**Tags:** streaming, client, playout, server\
**Created:** [August 16, 2022, 4:36pm UTC](https://casparcgforum.org/t/udp-stream/5007 "2022-08-16T16:36:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![quintanaplaca](https://casparcgforum.org/user_avatar/casparcgforum.org/quintanaplaca/32/1647_2.png) [@quintanaplaca](https://casparcgforum.org/u/quintanaplaca)\
**Post date:** [August 16, 2022, 4:36pm UTC](https://casparcgforum.org/t/udp-stream/5007/1 "2022-08-16T16:36:15Z")

</div>

I am using the CasparCG Playout to generate a channel with many video files. However, I can’t configure a multicast output (UDP). Does anyone know if this is possible?

I tried to change the `carparcg.config` file with this line:

```auto
	<channels>
		<channel>
			<video-mode>1080p6000</video-mode>
			<consumers>
				<screen>
					<device>1</device>
					<name>youcast</name>
					<aspect-ratio>16:9</aspect-ratio>
				</screen>
				<system-audio />					
				<ffmpeg>
					<path>udp://239.50.98.216:5001</path>
					<args>-format mpegts -vcodec libx264 -crf 0 -tune zerolatency -preset ultrafast </args>
					<separate-key>false</separate-key>
					<mono-streams>false</mono-streams>
				</ffmpeg>
			</consumers>
		</channel>
	</channels>

```

But it doesn’t work. Could you help me?

Thank you.

---

<div class="post-metadata">

**Author:** ![andyw](https://casparcgforum.org/letter_avatar_proxy/v4/letter/a/f05b48/32.png) [@andyw](https://casparcgforum.org/u/andyw)\
**Post date:** [August 18, 2022, 7:55am UTC](https://casparcgforum.org/t/udp-stream/5007/2 "2022-08-18T07:55:20Z")

</div>

Try moving the `-format` switch to the end of the argument string.

```auto
<args>-vcodec libx264 -crf 0 -tune zerolatency -preset ultrafast -format mpegts</args>

```

-format often assumes the rest of the properties up to the end of the line are switches for the format. The -format switch at the start of the line does sometimes work, for example when the standard client asks for a preview stream from the server.

Occasionally you need to specify a maximum packet size as well. The example below uses a custom command to add a stream to channel 1 on localhost:

```auto
ADD 1-1001 STREAM udp://127.0.0.1:9999?pkt_size=1316 -codec:v libx264
-tune:v zerolatency -preset:v ultrafast -crf:v 25 -format mpegts

```

It can be received in VLC with a command `udp://@127.0.0.1:9999?pkt_size=1316`
