protocols.texi 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. @chapter Protocols
  2. @c man begin PROTOCOLS
  3. Protocols are configured elements in FFmpeg which allow to access
  4. resources which require the use of a particular protocol.
  5. When you configure your FFmpeg build, all the supported protocols are
  6. enabled by default. You can list all available ones using the
  7. configure option "--list-protocols".
  8. You can disable all the protocols using the configure option
  9. "--disable-protocols", and selectively enable a protocol using the
  10. option "--enable-protocol=@var{PROTOCOL}", or you can disable a
  11. particular protocol using the option
  12. "--disable-protocol=@var{PROTOCOL}".
  13. The option "-protocols" of the ff* tools will display the list of
  14. supported protocols.
  15. A description of the currently available protocols follows.
  16. @section bluray
  17. Read BluRay playlist.
  18. The accepted options are:
  19. @table @option
  20. @item angle
  21. BluRay angle
  22. @item chapter
  23. Start chapter (1...N)
  24. @item playlist
  25. Playlist to read (BDMV/PLAYLIST/?????.mpls)
  26. @end table
  27. Examples:
  28. Read longest playlist from BluRay mounted to /mnt/bluray:
  29. @example
  30. bluray:/mnt/bluray
  31. @end example
  32. Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
  33. @example
  34. -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
  35. @end example
  36. @section concat
  37. Physical concatenation protocol.
  38. Allow to read and seek from many resource in sequence as if they were
  39. a unique resource.
  40. A URL accepted by this protocol has the syntax:
  41. @example
  42. concat:@var{URL1}|@var{URL2}|...|@var{URLN}
  43. @end example
  44. where @var{URL1}, @var{URL2}, ..., @var{URLN} are the urls of the
  45. resource to be concatenated, each one possibly specifying a distinct
  46. protocol.
  47. For example to read a sequence of files @file{split1.mpeg},
  48. @file{split2.mpeg}, @file{split3.mpeg} with @command{ffplay} use the
  49. command:
  50. @example
  51. ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
  52. @end example
  53. Note that you may need to escape the character "|" which is special for
  54. many shells.
  55. @section file
  56. File access protocol.
  57. Allow to read from or read to a file.
  58. For example to read from a file @file{input.mpeg} with @command{ffmpeg}
  59. use the command:
  60. @example
  61. ffmpeg -i file:input.mpeg output.mpeg
  62. @end example
  63. The ff* tools default to the file protocol, that is a resource
  64. specified with the name "FILE.mpeg" is interpreted as the URL
  65. "file:FILE.mpeg".
  66. @section gopher
  67. Gopher protocol.
  68. @section hls
  69. Read Apple HTTP Live Streaming compliant segmented stream as
  70. a uniform one. The M3U8 playlists describing the segments can be
  71. remote HTTP resources or local files, accessed using the standard
  72. file protocol.
  73. The nested protocol is declared by specifying
  74. "+@var{proto}" after the hls URI scheme name, where @var{proto}
  75. is either "file" or "http".
  76. @example
  77. hls+http://host/path/to/remote/resource.m3u8
  78. hls+file://path/to/local/resource.m3u8
  79. @end example
  80. Using this protocol is discouraged - the hls demuxer should work
  81. just as well (if not, please report the issues) and is more complete.
  82. To use the hls demuxer instead, simply use the direct URLs to the
  83. m3u8 files.
  84. @section http
  85. HTTP (Hyper Text Transfer Protocol).
  86. @section mmst
  87. MMS (Microsoft Media Server) protocol over TCP.
  88. @section mmsh
  89. MMS (Microsoft Media Server) protocol over HTTP.
  90. The required syntax is:
  91. @example
  92. mmsh://@var{server}[:@var{port}][/@var{app}][/@var{playpath}]
  93. @end example
  94. @section md5
  95. MD5 output protocol.
  96. Computes the MD5 hash of the data to be written, and on close writes
  97. this to the designated output or stdout if none is specified. It can
  98. be used to test muxers without writing an actual file.
  99. Some examples follow.
  100. @example
  101. # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
  102. ffmpeg -i input.flv -f avi -y md5:output.avi.md5
  103. # Write the MD5 hash of the encoded AVI file to stdout.
  104. ffmpeg -i input.flv -f avi -y md5:
  105. @end example
  106. Note that some formats (typically MOV) require the output protocol to
  107. be seekable, so they will fail with the MD5 output protocol.
  108. @section pipe
  109. UNIX pipe access protocol.
  110. Allow to read and write from UNIX pipes.
  111. The accepted syntax is:
  112. @example
  113. pipe:[@var{number}]
  114. @end example
  115. @var{number} is the number corresponding to the file descriptor of the
  116. pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If @var{number}
  117. is not specified, by default the stdout file descriptor will be used
  118. for writing, stdin for reading.
  119. For example to read from stdin with @command{ffmpeg}:
  120. @example
  121. cat test.wav | ffmpeg -i pipe:0
  122. # ...this is the same as...
  123. cat test.wav | ffmpeg -i pipe:
  124. @end example
  125. For writing to stdout with @command{ffmpeg}:
  126. @example
  127. ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
  128. # ...this is the same as...
  129. ffmpeg -i test.wav -f avi pipe: | cat > test.avi
  130. @end example
  131. Note that some formats (typically MOV), require the output protocol to
  132. be seekable, so they will fail with the pipe output protocol.
  133. @section rtmp
  134. Real-Time Messaging Protocol.
  135. The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
  136. content across a TCP/IP network.
  137. The required syntax is:
  138. @example
  139. rtmp://@var{server}[:@var{port}][/@var{app}][/@var{instance}][/@var{playpath}]
  140. @end example
  141. The accepted parameters are:
  142. @table @option
  143. @item server
  144. The address of the RTMP server.
  145. @item port
  146. The number of the TCP port to use (by default is 1935).
  147. @item app
  148. It is the name of the application to access. It usually corresponds to
  149. the path where the application is installed on the RTMP server
  150. (e.g. @file{/ondemand/}, @file{/flash/live/}, etc.). You can override
  151. the value parsed from the URI through the @code{rtmp_app} option, too.
  152. @item playpath
  153. It is the path or name of the resource to play with reference to the
  154. application specified in @var{app}, may be prefixed by "mp4:". You
  155. can override the value parsed from the URI through the @code{rtmp_playpath}
  156. option, too.
  157. @item listen
  158. Act as a server, listening for an incoming connection.
  159. @item timeout
  160. Maximum time to wait for the incoming connection. Implies listen.
  161. @end table
  162. Additionally, the following parameters can be set via command line options
  163. (or in code via @code{AVOption}s):
  164. @table @option
  165. @item rtmp_app
  166. Name of application to connect on the RTMP server. This option
  167. overrides the parameter specified in the URI.
  168. @item rtmp_buffer
  169. Set the client buffer time in milliseconds. The default is 3000.
  170. @item rtmp_conn
  171. Extra arbitrary AMF connection parameters, parsed from a string,
  172. e.g. like @code{B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0}.
  173. Each value is prefixed by a single character denoting the type,
  174. B for Boolean, N for number, S for string, O for object, or Z for null,
  175. followed by a colon. For Booleans the data must be either 0 or 1 for
  176. FALSE or TRUE, respectively. Likewise for Objects the data must be 0 or
  177. 1 to end or begin an object, respectively. Data items in subobjects may
  178. be named, by prefixing the type with 'N' and specifying the name before
  179. the value (i.e. @code{NB:myFlag:1}). This option may be used multiple
  180. times to construct arbitrary AMF sequences.
  181. @item rtmp_flashver
  182. Version of the Flash plugin used to run the SWF player. The default
  183. is LNX 9,0,124,2.
  184. @item rtmp_flush_interval
  185. Number of packets flushed in the same request (RTMPT only). The default
  186. is 10.
  187. @item rtmp_live
  188. Specify that the media is a live stream. No resuming or seeking in
  189. live streams is possible. The default value is @code{any}, which means the
  190. subscriber first tries to play the live stream specified in the
  191. playpath. If a live stream of that name is not found, it plays the
  192. recorded stream. The other possible values are @code{live} and
  193. @code{recorded}.
  194. @item rtmp_pageurl
  195. URL of the web page in which the media was embedded. By default no
  196. value will be sent.
  197. @item rtmp_playpath
  198. Stream identifier to play or to publish. This option overrides the
  199. parameter specified in the URI.
  200. @item rtmp_subscribe
  201. Name of live stream to subscribe to. By default no value will be sent.
  202. It is only sent if the option is specified or if rtmp_live
  203. is set to live.
  204. @item rtmp_swfhash
  205. SHA256 hash of the decompressed SWF file (32 bytes).
  206. @item rtmp_swfsize
  207. Size of the decompressed SWF file, required for SWFVerification.
  208. @item rtmp_swfurl
  209. URL of the SWF player for the media. By default no value will be sent.
  210. @item rtmp_swfverify
  211. URL to player swf file, compute hash/size automatically.
  212. @item rtmp_tcurl
  213. URL of the target stream. Defaults to proto://host[:port]/app.
  214. @end table
  215. For example to read with @command{ffplay} a multimedia resource named
  216. "sample" from the application "vod" from an RTMP server "myserver":
  217. @example
  218. ffplay rtmp://myserver/vod/sample
  219. @end example
  220. @section rtmpe
  221. Encrypted Real-Time Messaging Protocol.
  222. The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
  223. streaming multimedia content within standard cryptographic primitives,
  224. consisting of Diffie-Hellman key exchange and HMACSHA256, generating
  225. a pair of RC4 keys.
  226. @section rtmps
  227. Real-Time Messaging Protocol over a secure SSL connection.
  228. The Real-Time Messaging Protocol (RTMPS) is used for streaming
  229. multimedia content across an encrypted connection.
  230. @section rtmpt
  231. Real-Time Messaging Protocol tunneled through HTTP.
  232. The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
  233. for streaming multimedia content within HTTP requests to traverse
  234. firewalls.
  235. @section rtmpte
  236. Encrypted Real-Time Messaging Protocol tunneled through HTTP.
  237. The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
  238. is used for streaming multimedia content within HTTP requests to traverse
  239. firewalls.
  240. @section rtmpts
  241. Real-Time Messaging Protocol tunneled through HTTPS.
  242. The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
  243. for streaming multimedia content within HTTPS requests to traverse
  244. firewalls.
  245. @section rtmp, rtmpe, rtmps, rtmpt, rtmpte
  246. Real-Time Messaging Protocol and its variants supported through
  247. librtmp.
  248. Requires the presence of the librtmp headers and library during
  249. configuration. You need to explicitly configure the build with
  250. "--enable-librtmp". If enabled this will replace the native RTMP
  251. protocol.
  252. This protocol provides most client functions and a few server
  253. functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
  254. encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
  255. variants of these encrypted types (RTMPTE, RTMPTS).
  256. The required syntax is:
  257. @example
  258. @var{rtmp_proto}://@var{server}[:@var{port}][/@var{app}][/@var{playpath}] @var{options}
  259. @end example
  260. where @var{rtmp_proto} is one of the strings "rtmp", "rtmpt", "rtmpe",
  261. "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
  262. @var{server}, @var{port}, @var{app} and @var{playpath} have the same
  263. meaning as specified for the RTMP native protocol.
  264. @var{options} contains a list of space-separated options of the form
  265. @var{key}=@var{val}.
  266. See the librtmp manual page (man 3 librtmp) for more information.
  267. For example, to stream a file in real-time to an RTMP server using
  268. @command{ffmpeg}:
  269. @example
  270. ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
  271. @end example
  272. To play the same stream using @command{ffplay}:
  273. @example
  274. ffplay "rtmp://myserver/live/mystream live=1"
  275. @end example
  276. @section rtp
  277. Real-Time Protocol.
  278. @section rtsp
  279. RTSP is not technically a protocol handler in libavformat, it is a demuxer
  280. and muxer. The demuxer supports both normal RTSP (with data transferred
  281. over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
  282. data transferred over RDT).
  283. The muxer can be used to send a stream using RTSP ANNOUNCE to a server
  284. supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
  285. @uref{http://github.com/revmischa/rtsp-server, RTSP server}).
  286. The required syntax for a RTSP url is:
  287. @example
  288. rtsp://@var{hostname}[:@var{port}]/@var{path}
  289. @end example
  290. The following options (set on the @command{ffmpeg}/@command{ffplay} command
  291. line, or set in code via @code{AVOption}s or in @code{avformat_open_input}),
  292. are supported:
  293. Flags for @code{rtsp_transport}:
  294. @table @option
  295. @item udp
  296. Use UDP as lower transport protocol.
  297. @item tcp
  298. Use TCP (interleaving within the RTSP control channel) as lower
  299. transport protocol.
  300. @item udp_multicast
  301. Use UDP multicast as lower transport protocol.
  302. @item http
  303. Use HTTP tunneling as lower transport protocol, which is useful for
  304. passing proxies.
  305. @end table
  306. Multiple lower transport protocols may be specified, in that case they are
  307. tried one at a time (if the setup of one fails, the next one is tried).
  308. For the muxer, only the @code{tcp} and @code{udp} options are supported.
  309. Flags for @code{rtsp_flags}:
  310. @table @option
  311. @item filter_src
  312. Accept packets only from negotiated peer address and port.
  313. @item listen
  314. Act as a server, listening for an incoming connection.
  315. @end table
  316. When receiving data over UDP, the demuxer tries to reorder received packets
  317. (since they may arrive out of order, or packets may get lost totally). This
  318. can be disabled by setting the maximum demuxing delay to zero (via
  319. the @code{max_delay} field of AVFormatContext).
  320. When watching multi-bitrate Real-RTSP streams with @command{ffplay}, the
  321. streams to display can be chosen with @code{-vst} @var{n} and
  322. @code{-ast} @var{n} for video and audio respectively, and can be switched
  323. on the fly by pressing @code{v} and @code{a}.
  324. Example command lines:
  325. To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
  326. @example
  327. ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
  328. @end example
  329. To watch a stream tunneled over HTTP:
  330. @example
  331. ffplay -rtsp_transport http rtsp://server/video.mp4
  332. @end example
  333. To send a stream in realtime to a RTSP server, for others to watch:
  334. @example
  335. ffmpeg -re -i @var{input} -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
  336. @end example
  337. To receive a stream in realtime:
  338. @example
  339. ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp @var{output}
  340. @end example
  341. @section sap
  342. Session Announcement Protocol (RFC 2974). This is not technically a
  343. protocol handler in libavformat, it is a muxer and demuxer.
  344. It is used for signalling of RTP streams, by announcing the SDP for the
  345. streams regularly on a separate port.
  346. @subsection Muxer
  347. The syntax for a SAP url given to the muxer is:
  348. @example
  349. sap://@var{destination}[:@var{port}][?@var{options}]
  350. @end example
  351. The RTP packets are sent to @var{destination} on port @var{port},
  352. or to port 5004 if no port is specified.
  353. @var{options} is a @code{&}-separated list. The following options
  354. are supported:
  355. @table @option
  356. @item announce_addr=@var{address}
  357. Specify the destination IP address for sending the announcements to.
  358. If omitted, the announcements are sent to the commonly used SAP
  359. announcement multicast address 224.2.127.254 (sap.mcast.net), or
  360. ff0e::2:7ffe if @var{destination} is an IPv6 address.
  361. @item announce_port=@var{port}
  362. Specify the port to send the announcements on, defaults to
  363. 9875 if not specified.
  364. @item ttl=@var{ttl}
  365. Specify the time to live value for the announcements and RTP packets,
  366. defaults to 255.
  367. @item same_port=@var{0|1}
  368. If set to 1, send all RTP streams on the same port pair. If zero (the
  369. default), all streams are sent on unique ports, with each stream on a
  370. port 2 numbers higher than the previous.
  371. VLC/Live555 requires this to be set to 1, to be able to receive the stream.
  372. The RTP stack in libavformat for receiving requires all streams to be sent
  373. on unique ports.
  374. @end table
  375. Example command lines follow.
  376. To broadcast a stream on the local subnet, for watching in VLC:
  377. @example
  378. ffmpeg -re -i @var{input} -f sap sap://224.0.0.255?same_port=1
  379. @end example
  380. Similarly, for watching in @command{ffplay}:
  381. @example
  382. ffmpeg -re -i @var{input} -f sap sap://224.0.0.255
  383. @end example
  384. And for watching in @command{ffplay}, over IPv6:
  385. @example
  386. ffmpeg -re -i @var{input} -f sap sap://[ff0e::1:2:3:4]
  387. @end example
  388. @subsection Demuxer
  389. The syntax for a SAP url given to the demuxer is:
  390. @example
  391. sap://[@var{address}][:@var{port}]
  392. @end example
  393. @var{address} is the multicast address to listen for announcements on,
  394. if omitted, the default 224.2.127.254 (sap.mcast.net) is used. @var{port}
  395. is the port that is listened on, 9875 if omitted.
  396. The demuxers listens for announcements on the given address and port.
  397. Once an announcement is received, it tries to receive that particular stream.
  398. Example command lines follow.
  399. To play back the first stream announced on the normal SAP multicast address:
  400. @example
  401. ffplay sap://
  402. @end example
  403. To play back the first stream announced on one the default IPv6 SAP multicast address:
  404. @example
  405. ffplay sap://[ff0e::2:7ffe]
  406. @end example
  407. @section tcp
  408. Trasmission Control Protocol.
  409. The required syntax for a TCP url is:
  410. @example
  411. tcp://@var{hostname}:@var{port}[?@var{options}]
  412. @end example
  413. @table @option
  414. @item listen
  415. Listen for an incoming connection
  416. @item timeout=@var{microseconds}
  417. In read mode: if no data arrived in more than this time interval, raise error.
  418. In write mode: if socket cannot be written in more than this time interval, raise error.
  419. This also sets timeout on TCP connection establishing.
  420. @example
  421. ffmpeg -i @var{input} -f @var{format} tcp://@var{hostname}:@var{port}?listen
  422. ffplay tcp://@var{hostname}:@var{port}
  423. @end example
  424. @end table
  425. @section tls
  426. Transport Layer Security/Secure Sockets Layer
  427. The required syntax for a TLS/SSL url is:
  428. @example
  429. tls://@var{hostname}:@var{port}[?@var{options}]
  430. @end example
  431. @table @option
  432. @item listen
  433. Act as a server, listening for an incoming connection.
  434. @item cafile=@var{filename}
  435. Certificate authority file. The file must be in OpenSSL PEM format.
  436. @item cert=@var{filename}
  437. Certificate file. The file must be in OpenSSL PEM format.
  438. @item key=@var{filename}
  439. Private key file.
  440. @item verify=@var{0|1}
  441. Verify the peer's certificate.
  442. @end table
  443. Example command lines:
  444. To create a TLS/SSL server that serves an input stream.
  445. @example
  446. ffmpeg -i @var{input} -f @var{format} tls://@var{hostname}:@var{port}?listen&cert=@var{server.crt}&key=@var{server.key}
  447. @end example
  448. To play back a stream from the TLS/SSL server using @command{ffplay}:
  449. @example
  450. ffplay tls://@var{hostname}:@var{port}
  451. @end example
  452. @section udp
  453. User Datagram Protocol.
  454. The required syntax for a UDP url is:
  455. @example
  456. udp://@var{hostname}:@var{port}[?@var{options}]
  457. @end example
  458. @var{options} contains a list of &-separated options of the form @var{key}=@var{val}.
  459. In case threading is enabled on the system, a circular buffer is used
  460. to store the incoming data, which allows to reduce loss of data due to
  461. UDP socket buffer overruns. The @var{fifo_size} and
  462. @var{overrun_nonfatal} options are related to this buffer.
  463. The list of supported options follows.
  464. @table @option
  465. @item buffer_size=@var{size}
  466. Set the UDP socket buffer size in bytes. This is used both for the
  467. receiving and the sending buffer size.
  468. @item localport=@var{port}
  469. Override the local UDP port to bind with.
  470. @item localaddr=@var{addr}
  471. Choose the local IP address. This is useful e.g. if sending multicast
  472. and the host has multiple interfaces, where the user can choose
  473. which interface to send on by specifying the IP address of that interface.
  474. @item pkt_size=@var{size}
  475. Set the size in bytes of UDP packets.
  476. @item reuse=@var{1|0}
  477. Explicitly allow or disallow reusing UDP sockets.
  478. @item ttl=@var{ttl}
  479. Set the time to live value (for multicast only).
  480. @item connect=@var{1|0}
  481. Initialize the UDP socket with @code{connect()}. In this case, the
  482. destination address can't be changed with ff_udp_set_remote_url later.
  483. If the destination address isn't known at the start, this option can
  484. be specified in ff_udp_set_remote_url, too.
  485. This allows finding out the source address for the packets with getsockname,
  486. and makes writes return with AVERROR(ECONNREFUSED) if "destination
  487. unreachable" is received.
  488. For receiving, this gives the benefit of only receiving packets from
  489. the specified peer address/port.
  490. @item sources=@var{address}[,@var{address}]
  491. Only receive packets sent to the multicast group from one of the
  492. specified sender IP addresses.
  493. @item block=@var{address}[,@var{address}]
  494. Ignore packets sent to the multicast group from the specified
  495. sender IP addresses.
  496. @item fifo_size=@var{units}
  497. Set the UDP receiving circular buffer size, expressed as a number of
  498. packets with size of 188 bytes. If not specified defaults to 7*4096.
  499. @item overrun_nonfatal=@var{1|0}
  500. Survive in case of UDP receiving circular buffer overrun. Default
  501. value is 0.
  502. @item timeout=@var{microseconds}
  503. In read mode: if no data arrived in more than this time interval, raise error.
  504. @end table
  505. Some usage examples of the UDP protocol with @command{ffmpeg} follow.
  506. To stream over UDP to a remote endpoint:
  507. @example
  508. ffmpeg -i @var{input} -f @var{format} udp://@var{hostname}:@var{port}
  509. @end example
  510. To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
  511. @example
  512. ffmpeg -i @var{input} -f mpegts udp://@var{hostname}:@var{port}?pkt_size=188&buffer_size=65535
  513. @end example
  514. To receive over UDP from a remote endpoint:
  515. @example
  516. ffmpeg -i udp://[@var{multicast-address}]:@var{port}
  517. @end example
  518. @c man end PROTOCOLS