Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sh \" Subsection heading
  6. .br
  7. .if t .Sp
  8. .ne 5
  9. .PP
  10. \fB\\$1\fR
  11. .PP
  12. ..
  13. .de Sp \" Vertical space (when we can't use .PP)
  14. .if t .sp .5v
  15. .if n .sp
  16. ..
  17. .de Vb \" Begin verbatim text
  18. .ft CW
  19. .nf
  20. .ne \\$1
  21. ..
  22. .de Ve \" End verbatim text
  23. .ft R
  24. .fi
  25. ..
  26. .\" Set up some character translations and predefined strings.  \*(-- will
  27. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  28. .\" double quote, and \*(R" will give a right double quote.  | will give a
  29. .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
  30. .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
  31. .\" expand to `' in nroff, nothing in troff, for use with C<>.
  32. .tr \(*W-|\(bv\*(Tr
  33. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  34. .ie n \{\
  35. .    ds -- \(*W-
  36. .    ds PI pi
  37. .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  38. .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
  39. .    ds L" ""
  40. .    ds R" ""
  41. .    ds C` ""
  42. .    ds C' ""
  43. 'br\}
  44. .el\{\
  45. .    ds -- \|\(em\|
  46. .    ds PI \(*p
  47. .    ds L" ``
  48. .    ds R" ''
  49. 'br\}
  50. .\"
  51. .\" If the F register is turned on, we'll generate index entries on stderr for
  52. .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
  53. .\" entries marked with X<> in POD.  Of course, you'll have to process the
  54. .\" output yourself in some meaningful fashion.
  55. .if \nF \{\
  56. .    de IX
  57. .    tm Index:\\$1\t\\n%\t"\\$2"
  58. ..
  59. .    nr % 0
  60. .    rr F
  61. .\}
  62. .\"
  63. .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
  64. .\" way too many mistakes in technical documents.
  65. .hy 0
  66. .if n .na
  67. .\"
  68. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  69. .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
  70. .    \" fudge factors for nroff and troff
  71. .if n \{\
  72. .    ds #H 0
  73. .    ds #V .8m
  74. .    ds #F .3m
  75. .    ds #[ \f1
  76. .    ds #] \fP
  77. .\}
  78. .if t \{\
  79. .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  80. .    ds #V .6m
  81. .    ds #F 0
  82. .    ds #[ \&
  83. .    ds #] \&
  84. .\}
  85. .    \" simple accents for nroff and troff
  86. .if n \{\
  87. .    ds ' \&
  88. .    ds ` \&
  89. .    ds ^ \&
  90. .    ds , \&
  91. .    ds ~ ~
  92. .    ds /
  93. .\}
  94. .if t \{\
  95. .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  96. .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  97. .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  98. .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  99. .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  100. .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  101. .\}
  102. .    \" troff and (daisy-wheel) nroff accents
  103. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  104. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  105. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  106. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  107. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  108. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  109. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  110. .ds ae a\h'-(\w'a'u*4/10)'e
  111. .ds Ae A\h'-(\w'A'u*4/10)'E
  112. .    \" corrections for vroff
  113. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  114. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  115. .    \" for low resolution devices (crt and lpr)
  116. .if \n(.H>23 .if \n(.V>19 \
  117. \{\
  118. .    ds : e
  119. .    ds 8 ss
  120. .    ds o a
  121. .    ds d- d\h'-1'\(ga
  122. .    ds D- D\h'-1'\(hy
  123. .    ds th \o'bp'
  124. .    ds Th \o'LP'
  125. .    ds ae ae
  126. .    ds Ae AE
  127. .\}
  128. .rm #[ #] #H #V #F C
  129. .\" ========================================================================
  130. .\"
  131. .IX Title "FFMPEG-PROTOCOLS 1"
  132. .TH FFMPEG-PROTOCOLS 1 " " " " " "
  133. .SH "NAME"
  134. ffmpeg\-protocols \- FFmpeg protocols
  135. .SH "DESCRIPTION"
  136. .IX Header "DESCRIPTION"
  137. This document describes the input and output protocols provided by the
  138. libavformat library.
  139. .SH "PROTOCOLS"
  140. .IX Header "PROTOCOLS"
  141. Protocols are configured elements in FFmpeg that enable access to
  142. resources that require specific protocols.
  143. .PP
  144. When you configure your FFmpeg build, all the supported protocols are
  145. enabled by default. You can list all available ones using the
  146. configure option \*(L"\-\-list\-protocols\*(R".
  147. .PP
  148. You can disable all the protocols using the configure option
  149. \&\*(L"\-\-disable\-protocols\*(R", and selectively enable a protocol using the
  150. option "\-\-enable\-protocol=\fI\s-1PROTOCOL\s0\fR\*(L", or you can disable a
  151. particular protocol using the option
  152. \&\*(R"\-\-disable\-protocol=\fI\s-1PROTOCOL\s0\fR".
  153. .PP
  154. The option \*(L"\-protocols\*(R" of the ff* tools will display the list of
  155. supported protocols.
  156. .PP
  157. A description of the currently available protocols follows.
  158. .Sh "async"
  159. .IX Subsection "async"
  160. Asynchronous data filling wrapper for input stream.
  161. .PP
  162. Fill data in a background thread, to decouple I/O operation from demux thread.
  163. .PP
  164. .Vb 3
  165. \&        async:<URL>
  166. \&        async:http://host/resource
  167. \&        async:cache:http://host/resource
  168. .Ve
  169. .Sh "bluray"
  170. .IX Subsection "bluray"
  171. Read BluRay playlist.
  172. .PP
  173. The accepted options are:
  174. .IP "\fBangle\fR" 4
  175. .IX Item "angle"
  176. BluRay angle
  177. .IP "\fBchapter\fR" 4
  178. .IX Item "chapter"
  179. Start chapter (1...N)
  180. .IP "\fBplaylist\fR" 4
  181. .IX Item "playlist"
  182. Playlist to read (\s-1BDMV/PLAYLIST/\s0?????.mpls)
  183. .PP
  184. Examples:
  185. .PP
  186. Read longest playlist from BluRay mounted to /mnt/bluray:
  187. .PP
  188. .Vb 1
  189. \&        bluray:/mnt/bluray
  190. .Ve
  191. .PP
  192. Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
  193. .PP
  194. .Vb 1
  195. \&        -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
  196. .Ve
  197. .Sh "cache"
  198. .IX Subsection "cache"
  199. Caching wrapper for input stream.
  200. .PP
  201. Cache the input stream to temporary file. It brings seeking capability to live streams.
  202. .PP
  203. .Vb 1
  204. \&        cache:<URL>
  205. .Ve
  206. .Sh "concat"
  207. .IX Subsection "concat"
  208. Physical concatenation protocol.
  209. .PP
  210. Read and seek from many resources in sequence as if they were
  211. a unique resource.
  212. .PP
  213. A \s-1URL\s0 accepted by this protocol has the syntax:
  214. .PP
  215. .Vb 1
  216. \&        concat:<URL1>|<URL2>|...|<URLN>
  217. .Ve
  218. .PP
  219. where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the
  220. resource to be concatenated, each one possibly specifying a distinct
  221. protocol.
  222. .PP
  223. For example to read a sequence of files \fIsplit1.mpeg\fR,
  224. \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fBffplay\fR use the
  225. command:
  226. .PP
  227. .Vb 1
  228. \&        ffplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg
  229. .Ve
  230. .PP
  231. Note that you may need to escape the character \*(L"|\*(R" which is special for
  232. many shells.
  233. .Sh "crypto"
  234. .IX Subsection "crypto"
  235. AES-encrypted stream reading protocol.
  236. .PP
  237. The accepted options are:
  238. .IP "\fBkey\fR" 4
  239. .IX Item "key"
  240. Set the \s-1AES\s0 decryption key binary block from given hexadecimal representation.
  241. .IP "\fBiv\fR" 4
  242. .IX Item "iv"
  243. Set the \s-1AES\s0 decryption initialization vector binary block from given hexadecimal representation.
  244. .PP
  245. Accepted \s-1URL\s0 formats:
  246. .PP
  247. .Vb 2
  248. \&        crypto:<URL>
  249. \&        crypto+<URL>
  250. .Ve
  251. .Sh "data"
  252. .IX Subsection "data"
  253. Data in-line in the \s-1URI\s0. See <\fBhttp://en.wikipedia.org/wiki/Data_URI_scheme\fR>.
  254. .PP
  255. For example, to convert a \s-1GIF\s0 file given inline with \fBffmpeg\fR:
  256. .PP
  257. .Vb 1
  258. \&        ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png
  259. .Ve
  260. .Sh "file"
  261. .IX Subsection "file"
  262. File access protocol.
  263. .PP
  264. Read from or write to a file.
  265. .PP
  266. A file \s-1URL\s0 can have the form:
  267. .PP
  268. .Vb 1
  269. \&        file:<filename>
  270. .Ve
  271. .PP
  272. where \fIfilename\fR is the path of the file to read.
  273. .PP
  274. An \s-1URL\s0 that does not have a protocol prefix will be assumed to be a
  275. file \s-1URL\s0. Depending on the build, an \s-1URL\s0 that looks like a Windows
  276. path with the drive letter at the beginning will also be assumed to be
  277. a file \s-1URL\s0 (usually not the case in builds for unix-like systems).
  278. .PP
  279. For example to read from a file \fIinput.mpeg\fR with \fBffmpeg\fR
  280. use the command:
  281. .PP
  282. .Vb 1
  283. \&        ffmpeg -i file:input.mpeg output.mpeg
  284. .Ve
  285. .PP
  286. This protocol accepts the following options:
  287. .IP "\fBtruncate\fR" 4
  288. .IX Item "truncate"
  289. Truncate existing files on write, if set to 1. A value of 0 prevents
  290. truncating. Default value is 1.
  291. .IP "\fBblocksize\fR" 4
  292. .IX Item "blocksize"
  293. Set I/O operation maximum block size, in bytes. Default value is
  294. \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size.
  295. Setting this value reasonably low improves user termination request reaction
  296. time, which is valuable for files on slow medium.
  297. .Sh "ftp"
  298. .IX Subsection "ftp"
  299. \&\s-1FTP\s0 (File Transfer Protocol).
  300. .PP
  301. Read from or write to remote resources using \s-1FTP\s0 protocol.
  302. .PP
  303. Following syntax is required.
  304. .PP
  305. .Vb 1
  306. \&        ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  307. .Ve
  308. .PP
  309. This protocol accepts the following options.
  310. .IP "\fBtimeout\fR" 4
  311. .IX Item "timeout"
  312. Set timeout in microseconds of socket I/O operations used by the underlying low level
  313. operation. By default it is set to \-1, which means that the timeout is
  314. not specified.
  315. .IP "\fBftp-anonymous-password\fR" 4
  316. .IX Item "ftp-anonymous-password"
  317. Password used when login as anonymous user. Typically an e\-mail address
  318. should be used.
  319. .IP "\fBftp-write-seekable\fR" 4
  320. .IX Item "ftp-write-seekable"
  321. Control seekability of connection during encoding. If set to 1 the
  322. resource is supposed to be seekable, if set to 0 it is assumed not
  323. to be seekable. Default value is 0.
  324. .PP
  325. \&\s-1NOTE:\s0 Protocol can be used as output, but it is recommended to not do
  326. it, unless special care is taken (tests, customized server configuration
  327. etc.). Different \s-1FTP\s0 servers behave in different way during seek
  328. operation. ff* tools may produce incomplete content due to server limitations.
  329. .Sh "gopher"
  330. .IX Subsection "gopher"
  331. Gopher protocol.
  332. .Sh "hls"
  333. .IX Subsection "hls"
  334. Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as
  335. a uniform one. The M3U8 playlists describing the segments can be
  336. remote \s-1HTTP\s0 resources or local files, accessed using the standard
  337. file protocol.
  338. The nested protocol is declared by specifying
  339. "+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR
  340. is either \*(L"file\*(R" or \*(L"http\*(R".
  341. .PP
  342. .Vb 2
  343. \&        hls+http://host/path/to/remote/resource.m3u8
  344. \&        hls+file://path/to/local/resource.m3u8
  345. .Ve
  346. .PP
  347. Using this protocol is discouraged \- the hls demuxer should work
  348. just as well (if not, please report the issues) and is more complete.
  349. To use the hls demuxer instead, simply use the direct URLs to the
  350. m3u8 files.
  351. .Sh "http"
  352. .IX Subsection "http"
  353. \&\s-1HTTP\s0 (Hyper Text Transfer Protocol).
  354. .PP
  355. This protocol accepts the following options:
  356. .IP "\fBseekable\fR" 4
  357. .IX Item "seekable"
  358. Control seekability of connection. If set to 1 the resource is
  359. supposed to be seekable, if set to 0 it is assumed not to be seekable,
  360. if set to \-1 it will try to autodetect if it is seekable. Default
  361. value is \-1.
  362. .IP "\fBchunked_post\fR" 4
  363. .IX Item "chunked_post"
  364. If set to 1 use chunked Transfer-Encoding for posts, default is 1.
  365. .IP "\fBcontent_type\fR" 4
  366. .IX Item "content_type"
  367. Set a specific content type for the \s-1POST\s0 messages.
  368. .IP "\fBheaders\fR" 4
  369. .IX Item "headers"
  370. Set custom \s-1HTTP\s0 headers, can override built in default headers. The
  371. value must be a string encoding the headers.
  372. .IP "\fBmultiple_requests\fR" 4
  373. .IX Item "multiple_requests"
  374. Use persistent connections if set to 1, default is 0.
  375. .IP "\fBpost_data\fR" 4
  376. .IX Item "post_data"
  377. Set custom \s-1HTTP\s0 post data.
  378. .IP "\fBuser-agent\fR" 4
  379. .IX Item "user-agent"
  380. .PD 0
  381. .IP "\fBuser_agent\fR" 4
  382. .IX Item "user_agent"
  383. .PD
  384. Override the User-Agent header. If not specified the protocol will use a
  385. string describing the libavformat build. ("Lavf/<version>")
  386. .IP "\fBtimeout\fR" 4
  387. .IX Item "timeout"
  388. Set timeout in microseconds of socket I/O operations used by the underlying low level
  389. operation. By default it is set to \-1, which means that the timeout is
  390. not specified.
  391. .IP "\fBmime_type\fR" 4
  392. .IX Item "mime_type"
  393. Export the \s-1MIME\s0 type.
  394. .IP "\fBicy\fR" 4
  395. .IX Item "icy"
  396. If set to 1 request \s-1ICY\s0 (SHOUTcast) metadata from the server. If the server
  397. supports this, the metadata has to be retrieved by the application by reading
  398. the \fBicy_metadata_headers\fR and \fBicy_metadata_packet\fR options.
  399. The default is 1.
  400. .IP "\fBicy_metadata_headers\fR" 4
  401. .IX Item "icy_metadata_headers"
  402. If the server supports \s-1ICY\s0 metadata, this contains the ICY-specific \s-1HTTP\s0 reply
  403. headers, separated by newline characters.
  404. .IP "\fBicy_metadata_packet\fR" 4
  405. .IX Item "icy_metadata_packet"
  406. If the server supports \s-1ICY\s0 metadata, and \fBicy\fR was set to 1, this
  407. contains the last non-empty metadata packet sent by the server. It should be
  408. polled in regular intervals by applications interested in mid-stream metadata
  409. updates.
  410. .IP "\fBcookies\fR" 4
  411. .IX Item "cookies"
  412. Set the cookies to be sent in future requests. The format of each cookie is the
  413. same as the value of a Set-Cookie \s-1HTTP\s0 response field. Multiple cookies can be
  414. delimited by a newline character.
  415. .IP "\fBoffset\fR" 4
  416. .IX Item "offset"
  417. Set initial byte offset.
  418. .IP "\fBend_offset\fR" 4
  419. .IX Item "end_offset"
  420. Try to limit the request to bytes preceding this offset.
  421. .IP "\fBmethod\fR" 4
  422. .IX Item "method"
  423. When used as a client option it sets the \s-1HTTP\s0 method for the request.
  424. .Sp
  425. When used as a server option it sets the \s-1HTTP\s0 method that is going to be
  426. expected from the client(s).
  427. If the expected and the received \s-1HTTP\s0 method do not match the client will
  428. be given a Bad Request response.
  429. When unset the \s-1HTTP\s0 method is not checked for now. This will be replaced by
  430. autodetection in the future.
  431. .IP "\fBlisten\fR" 4
  432. .IX Item "listen"
  433. If set to 1 enables experimental \s-1HTTP\s0 server. This can be used to send data when
  434. used as an output option, or read data from a client with \s-1HTTP\s0 \s-1POST\s0 when used as
  435. an input option.
  436. If set to 2 enables experimental mutli-client \s-1HTTP\s0 server. This is not yet implemented
  437. in ffmpeg.c or ffserver.c and thus must not be used as a command line option.
  438. .Sp
  439. .Vb 2
  440. \&        # Server side (sending):
  441. \&        ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<server>:<port>
  442. .Ve
  443. .Sp
  444. .Vb 2
  445. \&        # Client side (receiving):
  446. \&        ffmpeg -i http://<server>:<port> -c copy somefile.ogg
  447. .Ve
  448. .Sp
  449. .Vb 2
  450. \&        # Client can also be done with wget:
  451. \&        wget http://<server>:<port> -O somefile.ogg
  452. .Ve
  453. .Sp
  454. .Vb 2
  455. \&        # Server side (receiving):
  456. \&        ffmpeg -listen 1 -i http://<server>:<port> -c copy somefile.ogg
  457. .Ve
  458. .Sp
  459. .Vb 2
  460. \&        # Client side (sending):
  461. \&        ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<server>:<port>
  462. .Ve
  463. .Sp
  464. .Vb 2
  465. \&        # Client can also be done with wget:
  466. \&        wget --post-file=somefile.ogg http://<server>:<port>
  467. .Ve
  468. .PP
  469. \fI\s-1HTTP\s0 Cookies\fR
  470. .IX Subsection "HTTP Cookies"
  471. .PP
  472. Some \s-1HTTP\s0 requests will be denied unless cookie values are passed in with the
  473. request. The \fBcookies\fR option allows these cookies to be specified. At
  474. the very least, each cookie must specify a value along with a path and domain.
  475. \&\s-1HTTP\s0 requests that match both the domain and path will automatically include the
  476. cookie value in the \s-1HTTP\s0 Cookie header field. Multiple cookies can be delimited
  477. by a newline.
  478. .PP
  479. The required syntax to play a stream specifying a cookie is:
  480. .PP
  481. .Vb 1
  482. \&        ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
  483. .Ve
  484. .Sh "Icecast"
  485. .IX Subsection "Icecast"
  486. Icecast protocol (stream to Icecast servers)
  487. .PP
  488. This protocol accepts the following options:
  489. .IP "\fBice_genre\fR" 4
  490. .IX Item "ice_genre"
  491. Set the stream genre.
  492. .IP "\fBice_name\fR" 4
  493. .IX Item "ice_name"
  494. Set the stream name.
  495. .IP "\fBice_description\fR" 4
  496. .IX Item "ice_description"
  497. Set the stream description.
  498. .IP "\fBice_url\fR" 4
  499. .IX Item "ice_url"
  500. Set the stream website \s-1URL\s0.
  501. .IP "\fBice_public\fR" 4
  502. .IX Item "ice_public"
  503. Set if the stream should be public.
  504. The default is 0 (not public).
  505. .IP "\fBuser_agent\fR" 4
  506. .IX Item "user_agent"
  507. Override the User-Agent header. If not specified a string of the form
  508. "Lavf/<version>" will be used.
  509. .IP "\fBpassword\fR" 4
  510. .IX Item "password"
  511. Set the Icecast mountpoint password.
  512. .IP "\fBcontent_type\fR" 4
  513. .IX Item "content_type"
  514. Set the stream content type. This must be set if it is different from
  515. audio/mpeg.
  516. .IP "\fBlegacy_icecast\fR" 4
  517. .IX Item "legacy_icecast"
  518. This enables support for Icecast versions < 2.4.0, that do not support the
  519. \&\s-1HTTP\s0 \s-1PUT\s0 method but the \s-1SOURCE\s0 method.
  520. .PP
  521. .Vb 1
  522. \&        icecast://[<username>[:<password>]@]<server>:<port>/<mountpoint>
  523. .Ve
  524. .Sh "mmst"
  525. .IX Subsection "mmst"
  526. \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP\s0.
  527. .Sh "mmsh"
  528. .IX Subsection "mmsh"
  529. \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP\s0.
  530. .PP
  531. The required syntax is:
  532. .PP
  533. .Vb 1
  534. \&        mmsh://<server>[:<port>][/<app>][/<playpath>]
  535. .Ve
  536. .Sh "md5"
  537. .IX Subsection "md5"
  538. \&\s-1MD5\s0 output protocol.
  539. .PP
  540. Computes the \s-1MD5\s0 hash of the data to be written, and on close writes
  541. this to the designated output or stdout if none is specified. It can
  542. be used to test muxers without writing an actual file.
  543. .PP
  544. Some examples follow.
  545. .PP
  546. .Vb 2
  547. \&        # Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
  548. \&        ffmpeg -i input.flv -f avi -y md5:output.avi.md5
  549. .Ve
  550. .PP
  551. .Vb 2
  552. \&        # Write the MD5 hash of the encoded AVI file to stdout.
  553. \&        ffmpeg -i input.flv -f avi -y md5:
  554. .Ve
  555. .PP
  556. Note that some formats (typically \s-1MOV\s0) require the output protocol to
  557. be seekable, so they will fail with the \s-1MD5\s0 output protocol.
  558. .Sh "pipe"
  559. .IX Subsection "pipe"
  560. \&\s-1UNIX\s0 pipe access protocol.
  561. .PP
  562. Read and write from \s-1UNIX\s0 pipes.
  563. .PP
  564. The accepted syntax is:
  565. .PP
  566. .Vb 1
  567. \&        pipe:[<number>]
  568. .Ve
  569. .PP
  570. \&\fInumber\fR is the number corresponding to the file descriptor of the
  571. pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr).  If \fInumber\fR
  572. is not specified, by default the stdout file descriptor will be used
  573. for writing, stdin for reading.
  574. .PP
  575. For example to read from stdin with \fBffmpeg\fR:
  576. .PP
  577. .Vb 3
  578. \&        cat test.wav | ffmpeg -i pipe:0
  579. \&        # ...this is the same as...
  580. \&        cat test.wav | ffmpeg -i pipe:
  581. .Ve
  582. .PP
  583. For writing to stdout with \fBffmpeg\fR:
  584. .PP
  585. .Vb 3
  586. \&        ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
  587. \&        # ...this is the same as...
  588. \&        ffmpeg -i test.wav -f avi pipe: | cat > test.avi
  589. .Ve
  590. .PP
  591. This protocol accepts the following options:
  592. .IP "\fBblocksize\fR" 4
  593. .IX Item "blocksize"
  594. Set I/O operation maximum block size, in bytes. Default value is
  595. \&\f(CW\*(C`INT_MAX\*(C'\fR, which results in not limiting the requested block size.
  596. Setting this value reasonably low improves user termination request reaction
  597. time, which is valuable if data transmission is slow.
  598. .PP
  599. Note that some formats (typically \s-1MOV\s0), require the output protocol to
  600. be seekable, so they will fail with the pipe output protocol.
  601. .Sh "rtmp"
  602. .IX Subsection "rtmp"
  603. Real-Time Messaging Protocol.
  604. .PP
  605. The Real-Time Messaging Protocol (\s-1RTMP\s0) is used for streaming multimedia
  606. content across a \s-1TCP/IP\s0 network.
  607. .PP
  608. The required syntax is:
  609. .PP
  610. .Vb 1
  611. \&        rtmp://[<username>:<password>@]<server>[:<port>][/<app>][/<instance>][/<playpath>]
  612. .Ve
  613. .PP
  614. The accepted parameters are:
  615. .IP "\fBusername\fR" 4
  616. .IX Item "username"
  617. An optional username (mostly for publishing).
  618. .IP "\fBpassword\fR" 4
  619. .IX Item "password"
  620. An optional password (mostly for publishing).
  621. .IP "\fBserver\fR" 4
  622. .IX Item "server"
  623. The address of the \s-1RTMP\s0 server.
  624. .IP "\fBport\fR" 4
  625. .IX Item "port"
  626. The number of the \s-1TCP\s0 port to use (by default is 1935).
  627. .IP "\fBapp\fR" 4
  628. .IX Item "app"
  629. It is the name of the application to access. It usually corresponds to
  630. the path where the application is installed on the \s-1RTMP\s0 server
  631. (e.g. \fI/ondemand/\fR, \fI/flash/live/\fR, etc.). You can override
  632. the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_app\*(C'\fR option, too.
  633. .IP "\fBplaypath\fR" 4
  634. .IX Item "playpath"
  635. It is the path or name of the resource to play with reference to the
  636. application specified in \fIapp\fR, may be prefixed by \*(L"mp4:\*(R". You
  637. can override the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_playpath\*(C'\fR
  638. option, too.
  639. .IP "\fBlisten\fR" 4
  640. .IX Item "listen"
  641. Act as a server, listening for an incoming connection.
  642. .IP "\fBtimeout\fR" 4
  643. .IX Item "timeout"
  644. Maximum time to wait for the incoming connection. Implies listen.
  645. .PP
  646. Additionally, the following parameters can be set via command line options
  647. (or in code via \f(CW\*(C`AVOption\*(C'\fRs):
  648. .IP "\fBrtmp_app\fR" 4
  649. .IX Item "rtmp_app"
  650. Name of application to connect on the \s-1RTMP\s0 server. This option
  651. overrides the parameter specified in the \s-1URI\s0.
  652. .IP "\fBrtmp_buffer\fR" 4
  653. .IX Item "rtmp_buffer"
  654. Set the client buffer time in milliseconds. The default is 3000.
  655. .IP "\fBrtmp_conn\fR" 4
  656. .IX Item "rtmp_conn"
  657. Extra arbitrary \s-1AMF\s0 connection parameters, parsed from a string,
  658. e.g. like \f(CW\*(C`B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0\*(C'\fR.
  659. Each value is prefixed by a single character denoting the type,
  660. B for Boolean, N for number, S for string, O for object, or Z for null,
  661. followed by a colon. For Booleans the data must be either 0 or 1 for
  662. \&\s-1FALSE\s0 or \s-1TRUE\s0, respectively.  Likewise for Objects the data must be 0 or
  663. 1 to end or begin an object, respectively. Data items in subobjects may
  664. be named, by prefixing the type with 'N' and specifying the name before
  665. the value (i.e. \f(CW\*(C`NB:myFlag:1\*(C'\fR). This option may be used multiple
  666. times to construct arbitrary \s-1AMF\s0 sequences.
  667. .IP "\fBrtmp_flashver\fR" 4
  668. .IX Item "rtmp_flashver"
  669. Version of the Flash plugin used to run the \s-1SWF\s0 player. The default
  670. is \s-1LNX\s0 9,0,124,2. (When publishing, the default is \s-1FMLE/3\s0.0 (compatible;
  671. <libavformat version>).)
  672. .IP "\fBrtmp_flush_interval\fR" 4
  673. .IX Item "rtmp_flush_interval"
  674. Number of packets flushed in the same request (\s-1RTMPT\s0 only). The default
  675. is 10.
  676. .IP "\fBrtmp_live\fR" 4
  677. .IX Item "rtmp_live"
  678. Specify that the media is a live stream. No resuming or seeking in
  679. live streams is possible. The default value is \f(CW\*(C`any\*(C'\fR, which means the
  680. subscriber first tries to play the live stream specified in the
  681. playpath. If a live stream of that name is not found, it plays the
  682. recorded stream. The other possible values are \f(CW\*(C`live\*(C'\fR and
  683. \&\f(CW\*(C`recorded\*(C'\fR.
  684. .IP "\fBrtmp_pageurl\fR" 4
  685. .IX Item "rtmp_pageurl"
  686. \&\s-1URL\s0 of the web page in which the media was embedded. By default no
  687. value will be sent.
  688. .IP "\fBrtmp_playpath\fR" 4
  689. .IX Item "rtmp_playpath"
  690. Stream identifier to play or to publish. This option overrides the
  691. parameter specified in the \s-1URI\s0.
  692. .IP "\fBrtmp_subscribe\fR" 4
  693. .IX Item "rtmp_subscribe"
  694. Name of live stream to subscribe to. By default no value will be sent.
  695. It is only sent if the option is specified or if rtmp_live
  696. is set to live.
  697. .IP "\fBrtmp_swfhash\fR" 4
  698. .IX Item "rtmp_swfhash"
  699. \&\s-1SHA256\s0 hash of the decompressed \s-1SWF\s0 file (32 bytes).
  700. .IP "\fBrtmp_swfsize\fR" 4
  701. .IX Item "rtmp_swfsize"
  702. Size of the decompressed \s-1SWF\s0 file, required for SWFVerification.
  703. .IP "\fBrtmp_swfurl\fR" 4
  704. .IX Item "rtmp_swfurl"
  705. \&\s-1URL\s0 of the \s-1SWF\s0 player for the media. By default no value will be sent.
  706. .IP "\fBrtmp_swfverify\fR" 4
  707. .IX Item "rtmp_swfverify"
  708. \&\s-1URL\s0 to player swf file, compute hash/size automatically.
  709. .IP "\fBrtmp_tcurl\fR" 4
  710. .IX Item "rtmp_tcurl"
  711. \&\s-1URL\s0 of the target stream. Defaults to proto://host[:port]/app.
  712. .PP
  713. For example to read with \fBffplay\fR a multimedia resource named
  714. \&\*(L"sample\*(R" from the application \*(L"vod\*(R" from an \s-1RTMP\s0 server \*(L"myserver\*(R":
  715. .PP
  716. .Vb 1
  717. \&        ffplay rtmp://myserver/vod/sample
  718. .Ve
  719. .PP
  720. To publish to a password protected server, passing the playpath and
  721. app names separately:
  722. .PP
  723. .Vb 1
  724. \&        ffmpeg -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
  725. .Ve
  726. .Sh "rtmpe"
  727. .IX Subsection "rtmpe"
  728. Encrypted Real-Time Messaging Protocol.
  729. .PP
  730. The Encrypted Real-Time Messaging Protocol (\s-1RTMPE\s0) is used for
  731. streaming multimedia content within standard cryptographic primitives,
  732. consisting of Diffie-Hellman key exchange and \s-1HMACSHA256\s0, generating
  733. a pair of \s-1RC4\s0 keys.
  734. .Sh "rtmps"
  735. .IX Subsection "rtmps"
  736. Real-Time Messaging Protocol over a secure \s-1SSL\s0 connection.
  737. .PP
  738. The Real-Time Messaging Protocol (\s-1RTMPS\s0) is used for streaming
  739. multimedia content across an encrypted connection.
  740. .Sh "rtmpt"
  741. .IX Subsection "rtmpt"
  742. Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
  743. .PP
  744. The Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPT\s0) is used
  745. for streaming multimedia content within \s-1HTTP\s0 requests to traverse
  746. firewalls.
  747. .Sh "rtmpte"
  748. .IX Subsection "rtmpte"
  749. Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0.
  750. .PP
  751. The Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP\s0 (\s-1RTMPTE\s0)
  752. is used for streaming multimedia content within \s-1HTTP\s0 requests to traverse
  753. firewalls.
  754. .Sh "rtmpts"
  755. .IX Subsection "rtmpts"
  756. Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0.
  757. .PP
  758. The Real-Time Messaging Protocol tunneled through \s-1HTTPS\s0 (\s-1RTMPTS\s0) is used
  759. for streaming multimedia content within \s-1HTTPS\s0 requests to traverse
  760. firewalls.
  761. .Sh "libsmbclient"
  762. .IX Subsection "libsmbclient"
  763. libsmbclient permits one to manipulate \s-1CIFS/SMB\s0 network resources.
  764. .PP
  765. Following syntax is required.
  766. .PP
  767. .Vb 1
  768. \&        smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
  769. .Ve
  770. .PP
  771. This protocol accepts the following options.
  772. .IP "\fBtimeout\fR" 4
  773. .IX Item "timeout"
  774. Set timeout in miliseconds of socket I/O operations used by the underlying
  775. low level operation. By default it is set to \-1, which means that the timeout
  776. is not specified.
  777. .IP "\fBtruncate\fR" 4
  778. .IX Item "truncate"
  779. Truncate existing files on write, if set to 1. A value of 0 prevents
  780. truncating. Default value is 1.
  781. .IP "\fBworkgroup\fR" 4
  782. .IX Item "workgroup"
  783. Set the workgroup used for making connections. By default workgroup is not specified.
  784. .PP
  785. For more information see: <\fBhttp://www.samba.org/\fR>.
  786. .Sh "libssh"
  787. .IX Subsection "libssh"
  788. Secure File Transfer Protocol via libssh
  789. .PP
  790. Read from or write to remote resources using \s-1SFTP\s0 protocol.
  791. .PP
  792. Following syntax is required.
  793. .PP
  794. .Vb 1
  795. \&        sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  796. .Ve
  797. .PP
  798. This protocol accepts the following options.
  799. .IP "\fBtimeout\fR" 4
  800. .IX Item "timeout"
  801. Set timeout of socket I/O operations used by the underlying low level
  802. operation. By default it is set to \-1, which means that the timeout
  803. is not specified.
  804. .IP "\fBtruncate\fR" 4
  805. .IX Item "truncate"
  806. Truncate existing files on write, if set to 1. A value of 0 prevents
  807. truncating. Default value is 1.
  808. .IP "\fBprivate_key\fR" 4
  809. .IX Item "private_key"
  810. Specify the path of the file containing private key to use during authorization.
  811. By default libssh searches for keys in the \fI~/.ssh/\fR directory.
  812. .PP
  813. Example: Play a file stored on remote server.
  814. .PP
  815. .Vb 1
  816. \&        ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
  817. .Ve
  818. .Sh "librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte"
  819. .IX Subsection "librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte"
  820. Real-Time Messaging Protocol and its variants supported through
  821. librtmp.
  822. .PP
  823. Requires the presence of the librtmp headers and library during
  824. configuration. You need to explicitly configure the build with
  825. \&\*(L"\-\-enable\-librtmp\*(R". If enabled this will replace the native \s-1RTMP\s0
  826. protocol.
  827. .PP
  828. This protocol provides most client functions and a few server
  829. functions needed to support \s-1RTMP\s0, \s-1RTMP\s0 tunneled in \s-1HTTP\s0 (\s-1RTMPT\s0),
  830. encrypted \s-1RTMP\s0 (\s-1RTMPE\s0), \s-1RTMP\s0 over \s-1SSL/TLS\s0 (\s-1RTMPS\s0) and tunneled
  831. variants of these encrypted types (\s-1RTMPTE\s0, \s-1RTMPTS\s0).
  832. .PP
  833. The required syntax is:
  834. .PP
  835. .Vb 1
  836. \&        <rtmp_proto>://<server>[:<port>][/<app>][/<playpath>] <options>
  837. .Ve
  838. .PP
  839. where \fIrtmp_proto\fR is one of the strings \*(L"rtmp\*(R", \*(L"rtmpt\*(R", \*(L"rtmpe\*(R",
  840. \&\*(L"rtmps\*(R", \*(L"rtmpte\*(R", \*(L"rtmpts\*(R" corresponding to each \s-1RTMP\s0 variant, and
  841. \&\fIserver\fR, \fIport\fR, \fIapp\fR and \fIplaypath\fR have the same
  842. meaning as specified for the \s-1RTMP\s0 native protocol.
  843. \&\fIoptions\fR contains a list of space-separated options of the form
  844. \&\fIkey\fR=\fIval\fR.
  845. .PP
  846. See the librtmp manual page (man 3 librtmp) for more information.
  847. .PP
  848. For example, to stream a file in real-time to an \s-1RTMP\s0 server using
  849. \&\fBffmpeg\fR:
  850. .PP
  851. .Vb 1
  852. \&        ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
  853. .Ve
  854. .PP
  855. To play the same stream using \fBffplay\fR:
  856. .PP
  857. .Vb 1
  858. \&        ffplay "rtmp://myserver/live/mystream live=1"
  859. .Ve
  860. .Sh "rtp"
  861. .IX Subsection "rtp"
  862. Real-time Transport Protocol.
  863. .PP
  864. The required syntax for an \s-1RTP\s0 \s-1URL\s0 is:
  865. rtp://\fIhostname\fR[:\fIport\fR][?\fIoption\fR=\fIval\fR...]
  866. .PP
  867. \&\fIport\fR specifies the \s-1RTP\s0 port to use.
  868. .PP
  869. The following \s-1URL\s0 options are supported:
  870. .IP "\fBttl=\fR\fIn\fR" 4
  871. .IX Item "ttl=n"
  872. Set the \s-1TTL\s0 (Time\-To\-Live) value (for multicast only).
  873. .IP "\fBrtcpport=\fR\fIn\fR" 4
  874. .IX Item "rtcpport=n"
  875. Set the remote \s-1RTCP\s0 port to \fIn\fR.
  876. .IP "\fBlocalrtpport=\fR\fIn\fR" 4
  877. .IX Item "localrtpport=n"
  878. Set the local \s-1RTP\s0 port to \fIn\fR.
  879. .IP "\fBlocalrtcpport=\fR\fIn\fR\fB'\fR" 4
  880. .IX Item "localrtcpport=n'"
  881. Set the local \s-1RTCP\s0 port to \fIn\fR.
  882. .IP "\fBpkt_size=\fR\fIn\fR" 4
  883. .IX Item "pkt_size=n"
  884. Set max packet size (in bytes) to \fIn\fR.
  885. .IP "\fBconnect=0|1\fR" 4
  886. .IX Item "connect=0|1"
  887. Do a \f(CW\*(C`connect()\*(C'\fR on the \s-1UDP\s0 socket (if set to 1) or not (if set
  888. to 0).
  889. .IP "\fBsources=\fR\fIip\fR\fB[,\fR\fIip\fR\fB]\fR" 4
  890. .IX Item "sources=ip[,ip]"
  891. List allowed source \s-1IP\s0 addresses.
  892. .IP "\fBblock=\fR\fIip\fR\fB[,\fR\fIip\fR\fB]\fR" 4
  893. .IX Item "block=ip[,ip]"
  894. List disallowed (blocked) source \s-1IP\s0 addresses.
  895. .IP "\fBwrite_to_source=0|1\fR" 4
  896. .IX Item "write_to_source=0|1"
  897. Send packets to the source address of the latest received packet (if
  898. set to 1) or to a default remote address (if set to 0).
  899. .IP "\fBlocalport=\fR\fIn\fR" 4
  900. .IX Item "localport=n"
  901. Set the local \s-1RTP\s0 port to \fIn\fR.
  902. .Sp
  903. This is a deprecated option. Instead, \fBlocalrtpport\fR should be
  904. used.
  905. .PP
  906. Important notes:
  907. .IP "1." 4
  908. If \fBrtcpport\fR is not set the \s-1RTCP\s0 port will be set to the \s-1RTP\s0
  909. port value plus 1.
  910. .IP "2." 4
  911. If \fBlocalrtpport\fR (the local \s-1RTP\s0 port) is not set any available
  912. port will be used for the local \s-1RTP\s0 and \s-1RTCP\s0 ports.
  913. .IP "3." 4
  914. If \fBlocalrtcpport\fR (the local \s-1RTCP\s0 port) is not set it will be
  915. set to the local \s-1RTP\s0 port value plus 1.
  916. .Sh "rtsp"
  917. .IX Subsection "rtsp"
  918. Real-Time Streaming Protocol.
  919. .PP
  920. \&\s-1RTSP\s0 is not technically a protocol handler in libavformat, it is a demuxer
  921. and muxer. The demuxer supports both normal \s-1RTSP\s0 (with data transferred
  922. over \s-1RTP\s0; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
  923. data transferred over \s-1RDT\s0).
  924. .PP
  925. The muxer can be used to send a stream using \s-1RTSP\s0 \s-1ANNOUNCE\s0 to a server
  926. supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
  927. <\fBhttps://github.com/revmischa/rtsp\-server\fR>).
  928. .PP
  929. The required syntax for a \s-1RTSP\s0 url is:
  930. .PP
  931. .Vb 1
  932. \&        rtsp://<hostname>[:<port>]/<path>
  933. .Ve
  934. .PP
  935. Options can be set on the \fBffmpeg\fR/\fBffplay\fR command
  936. line, or set in code via \f(CW\*(C`AVOption\*(C'\fRs or in
  937. \&\f(CW\*(C`avformat_open_input\*(C'\fR.
  938. .PP
  939. The following options are supported.
  940. .IP "\fBinitial_pause\fR" 4
  941. .IX Item "initial_pause"
  942. Do not start playing the stream immediately if set to 1. Default value
  943. is 0.
  944. .IP "\fBrtsp_transport\fR" 4
  945. .IX Item "rtsp_transport"
  946. Set \s-1RTSP\s0 transport protocols.
  947. .Sp
  948. It accepts the following values:
  949. .RS 4
  950. .IP "\fBudp\fR" 4
  951. .IX Item "udp"
  952. Use \s-1UDP\s0 as lower transport protocol.
  953. .IP "\fBtcp\fR" 4
  954. .IX Item "tcp"
  955. Use \s-1TCP\s0 (interleaving within the \s-1RTSP\s0 control channel) as lower
  956. transport protocol.
  957. .IP "\fBudp_multicast\fR" 4
  958. .IX Item "udp_multicast"
  959. Use \s-1UDP\s0 multicast as lower transport protocol.
  960. .IP "\fBhttp\fR" 4
  961. .IX Item "http"
  962. Use \s-1HTTP\s0 tunneling as lower transport protocol, which is useful for
  963. passing proxies.
  964. .RE
  965. .RS 4
  966. .Sp
  967. Multiple lower transport protocols may be specified, in that case they are
  968. tried one at a time (if the setup of one fails, the next one is tried).
  969. For the muxer, only the \fBtcp\fR and \fBudp\fR options are supported.
  970. .RE
  971. .IP "\fBrtsp_flags\fR" 4
  972. .IX Item "rtsp_flags"
  973. Set \s-1RTSP\s0 flags.
  974. .Sp
  975. The following values are accepted:
  976. .RS 4
  977. .IP "\fBfilter_src\fR" 4
  978. .IX Item "filter_src"
  979. Accept packets only from negotiated peer address and port.
  980. .IP "\fBlisten\fR" 4
  981. .IX Item "listen"
  982. Act as a server, listening for an incoming connection.
  983. .IP "\fBprefer_tcp\fR" 4
  984. .IX Item "prefer_tcp"
  985. Try \s-1TCP\s0 for \s-1RTP\s0 transport first, if \s-1TCP\s0 is available as \s-1RTSP\s0 \s-1RTP\s0 transport.
  986. .RE
  987. .RS 4
  988. .Sp
  989. Default value is \fBnone\fR.
  990. .RE
  991. .IP "\fBallowed_media_types\fR" 4
  992. .IX Item "allowed_media_types"
  993. Set media types to accept from the server.
  994. .Sp
  995. The following flags are accepted:
  996. .RS 4
  997. .IP "\fBvideo\fR" 4
  998. .IX Item "video"
  999. .PD 0
  1000. .IP "\fBaudio\fR" 4
  1001. .IX Item "audio"
  1002. .IP "\fBdata\fR" 4
  1003. .IX Item "data"
  1004. .RE
  1005. .RS 4
  1006. .PD
  1007. .Sp
  1008. By default it accepts all media types.
  1009. .RE
  1010. .IP "\fBmin_port\fR" 4
  1011. .IX Item "min_port"
  1012. Set minimum local \s-1UDP\s0 port. Default value is 5000.
  1013. .IP "\fBmax_port\fR" 4
  1014. .IX Item "max_port"
  1015. Set maximum local \s-1UDP\s0 port. Default value is 65000.
  1016. .IP "\fBtimeout\fR" 4
  1017. .IX Item "timeout"
  1018. Set maximum timeout (in seconds) to wait for incoming connections.
  1019. .Sp
  1020. A value of \-1 means infinite (default). This option implies the
  1021. \&\fBrtsp_flags\fR set to \fBlisten\fR.
  1022. .IP "\fBreorder_queue_size\fR" 4
  1023. .IX Item "reorder_queue_size"
  1024. Set number of packets to buffer for handling of reordered packets.
  1025. .IP "\fBstimeout\fR" 4
  1026. .IX Item "stimeout"
  1027. Set socket \s-1TCP\s0 I/O timeout in microseconds.
  1028. .IP "\fBuser-agent\fR" 4
  1029. .IX Item "user-agent"
  1030. Override User-Agent header. If not specified, it defaults to the
  1031. libavformat identifier string.
  1032. .PP
  1033. When receiving data over \s-1UDP\s0, the demuxer tries to reorder received packets
  1034. (since they may arrive out of order, or packets may get lost totally). This
  1035. can be disabled by setting the maximum demuxing delay to zero (via
  1036. the \f(CW\*(C`max_delay\*(C'\fR field of AVFormatContext).
  1037. .PP
  1038. When watching multi-bitrate Real-RTSP streams with \fBffplay\fR, the
  1039. streams to display can be chosen with \f(CW\*(C`\-vst\*(C'\fR \fIn\fR and
  1040. \&\f(CW\*(C`\-ast\*(C'\fR \fIn\fR for video and audio respectively, and can be switched
  1041. on the fly by pressing \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`a\*(C'\fR.
  1042. .PP
  1043. \fIExamples\fR
  1044. .IX Subsection "Examples"
  1045. .PP
  1046. The following examples all make use of the \fBffplay\fR and
  1047. \&\fBffmpeg\fR tools.
  1048. .IP "\(bu" 4
  1049. Watch a stream over \s-1UDP\s0, with a max reordering delay of 0.5 seconds:
  1050. .Sp
  1051. .Vb 1
  1052. \&        ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
  1053. .Ve
  1054. .IP "\(bu" 4
  1055. Watch a stream tunneled over \s-1HTTP:\s0
  1056. .Sp
  1057. .Vb 1
  1058. \&        ffplay -rtsp_transport http rtsp://server/video.mp4
  1059. .Ve
  1060. .IP "\(bu" 4
  1061. Send a stream in realtime to a \s-1RTSP\s0 server, for others to watch:
  1062. .Sp
  1063. .Vb 1
  1064. \&        ffmpeg -re -i <input> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
  1065. .Ve
  1066. .IP "\(bu" 4
  1067. Receive a stream in realtime:
  1068. .Sp
  1069. .Vb 1
  1070. \&        ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <output>
  1071. .Ve
  1072. .Sh "sap"
  1073. .IX Subsection "sap"
  1074. Session Announcement Protocol (\s-1RFC\s0 2974). This is not technically a
  1075. protocol handler in libavformat, it is a muxer and demuxer.
  1076. It is used for signalling of \s-1RTP\s0 streams, by announcing the \s-1SDP\s0 for the
  1077. streams regularly on a separate port.
  1078. .PP
  1079. \fIMuxer\fR
  1080. .IX Subsection "Muxer"
  1081. .PP
  1082. The syntax for a \s-1SAP\s0 url given to the muxer is:
  1083. .PP
  1084. .Vb 1
  1085. \&        sap://<destination>[:<port>][?<options>]
  1086. .Ve
  1087. .PP
  1088. The \s-1RTP\s0 packets are sent to \fIdestination\fR on port \fIport\fR,
  1089. or to port 5004 if no port is specified.
  1090. \&\fIoptions\fR is a \f(CW\*(C`&\*(C'\fR\-separated list. The following options
  1091. are supported:
  1092. .IP "\fBannounce_addr=\fR\fIaddress\fR" 4
  1093. .IX Item "announce_addr=address"
  1094. Specify the destination \s-1IP\s0 address for sending the announcements to.
  1095. If omitted, the announcements are sent to the commonly used \s-1SAP\s0
  1096. announcement multicast address 224.2.127.254 (sap.mcast.net), or
  1097. ff0e::2:7ffe if \fIdestination\fR is an IPv6 address.
  1098. .IP "\fBannounce_port=\fR\fIport\fR" 4
  1099. .IX Item "announce_port=port"
  1100. Specify the port to send the announcements on, defaults to
  1101. 9875 if not specified.
  1102. .IP "\fBttl=\fR\fIttl\fR" 4
  1103. .IX Item "ttl=ttl"
  1104. Specify the time to live value for the announcements and \s-1RTP\s0 packets,
  1105. defaults to 255.
  1106. .IP "\fBsame_port=\fR\fI0|1\fR" 4
  1107. .IX Item "same_port=0|1"
  1108. If set to 1, send all \s-1RTP\s0 streams on the same port pair. If zero (the
  1109. default), all streams are sent on unique ports, with each stream on a
  1110. port 2 numbers higher than the previous.
  1111. VLC/Live555 requires this to be set to 1, to be able to receive the stream.
  1112. The \s-1RTP\s0 stack in libavformat for receiving requires all streams to be sent
  1113. on unique ports.
  1114. .PP
  1115. Example command lines follow.
  1116. .PP
  1117. To broadcast a stream on the local subnet, for watching in \s-1VLC:\s0
  1118. .PP
  1119. .Vb 1
  1120. \&        ffmpeg -re -i <input> -f sap sap://224.0.0.255?same_port=1
  1121. .Ve
  1122. .PP
  1123. Similarly, for watching in \fBffplay\fR:
  1124. .PP
  1125. .Vb 1
  1126. \&        ffmpeg -re -i <input> -f sap sap://224.0.0.255
  1127. .Ve
  1128. .PP
  1129. And for watching in \fBffplay\fR, over IPv6:
  1130. .PP
  1131. .Vb 1
  1132. \&        ffmpeg -re -i <input> -f sap sap://[ff0e::1:2:3:4]
  1133. .Ve
  1134. .PP
  1135. \fIDemuxer\fR
  1136. .IX Subsection "Demuxer"
  1137. .PP
  1138. The syntax for a \s-1SAP\s0 url given to the demuxer is:
  1139. .PP
  1140. .Vb 1
  1141. \&        sap://[<address>][:<port>]
  1142. .Ve
  1143. .PP
  1144. \&\fIaddress\fR is the multicast address to listen for announcements on,
  1145. if omitted, the default 224.2.127.254 (sap.mcast.net) is used. \fIport\fR
  1146. is the port that is listened on, 9875 if omitted.
  1147. .PP
  1148. The demuxers listens for announcements on the given address and port.
  1149. Once an announcement is received, it tries to receive that particular stream.
  1150. .PP
  1151. Example command lines follow.
  1152. .PP
  1153. To play back the first stream announced on the normal \s-1SAP\s0 multicast address:
  1154. .PP
  1155. .Vb 1
  1156. \&        ffplay sap://
  1157. .Ve
  1158. .PP
  1159. To play back the first stream announced on one the default IPv6 \s-1SAP\s0 multicast address:
  1160. .PP
  1161. .Vb 1
  1162. \&        ffplay sap://[ff0e::2:7ffe]
  1163. .Ve
  1164. .Sh "sctp"
  1165. .IX Subsection "sctp"
  1166. Stream Control Transmission Protocol.
  1167. .PP
  1168. The accepted \s-1URL\s0 syntax is:
  1169. .PP
  1170. .Vb 1
  1171. \&        sctp://<host>:<port>[?<options>]
  1172. .Ve
  1173. .PP
  1174. The protocol accepts the following options:
  1175. .IP "\fBlisten\fR" 4
  1176. .IX Item "listen"
  1177. If set to any value, listen for an incoming connection. Outgoing connection is done by default.
  1178. .IP "\fBmax_streams\fR" 4
  1179. .IX Item "max_streams"
  1180. Set the maximum number of streams. By default no limit is set.
  1181. .Sh "srtp"
  1182. .IX Subsection "srtp"
  1183. Secure Real-time Transport Protocol.
  1184. .PP
  1185. The accepted options are:
  1186. .IP "\fBsrtp_in_suite\fR" 4
  1187. .IX Item "srtp_in_suite"
  1188. .PD 0
  1189. .IP "\fBsrtp_out_suite\fR" 4
  1190. .IX Item "srtp_out_suite"
  1191. .PD
  1192. Select input and output encoding suites.
  1193. .Sp
  1194. Supported values:
  1195. .RS 4
  1196. .IP "\fB\s-1AES_CM_128_HMAC_SHA1_80\s0\fR" 4
  1197. .IX Item "AES_CM_128_HMAC_SHA1_80"
  1198. .PD 0
  1199. .IP "\fB\s-1SRTP_AES128_CM_HMAC_SHA1_80\s0\fR" 4
  1200. .IX Item "SRTP_AES128_CM_HMAC_SHA1_80"
  1201. .IP "\fB\s-1AES_CM_128_HMAC_SHA1_32\s0\fR" 4
  1202. .IX Item "AES_CM_128_HMAC_SHA1_32"
  1203. .IP "\fB\s-1SRTP_AES128_CM_HMAC_SHA1_32\s0\fR" 4
  1204. .IX Item "SRTP_AES128_CM_HMAC_SHA1_32"
  1205. .RE
  1206. .RS 4
  1207. .RE
  1208. .IP "\fBsrtp_in_params\fR" 4
  1209. .IX Item "srtp_in_params"
  1210. .IP "\fBsrtp_out_params\fR" 4
  1211. .IX Item "srtp_out_params"
  1212. .PD
  1213. Set input and output encoding parameters, which are expressed by a
  1214. base64\-encoded representation of a binary block. The first 16 bytes of
  1215. this binary block are used as master key, the following 14 bytes are
  1216. used as master salt.
  1217. .Sh "subfile"
  1218. .IX Subsection "subfile"
  1219. Virtually extract a segment of a file or another stream.
  1220. The underlying stream must be seekable.
  1221. .PP
  1222. Accepted options:
  1223. .IP "\fBstart\fR" 4
  1224. .IX Item "start"
  1225. Start offset of the extracted segment, in bytes.
  1226. .IP "\fBend\fR" 4
  1227. .IX Item "end"
  1228. End offset of the extracted segment, in bytes.
  1229. .PP
  1230. Examples:
  1231. .PP
  1232. Extract a chapter from a \s-1DVD\s0 \s-1VOB\s0 file (start and end sectors obtained
  1233. externally and multiplied by 2048):
  1234. .PP
  1235. .Vb 1
  1236. \&        subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
  1237. .Ve
  1238. .PP
  1239. Play an \s-1AVI\s0 file directly from a \s-1TAR\s0 archive:
  1240. .PP
  1241. .Vb 1
  1242. \&        subfile,,start,183241728,end,366490624,,:archive.tar
  1243. .Ve
  1244. .Sh "tcp"
  1245. .IX Subsection "tcp"
  1246. Transmission Control Protocol.
  1247. .PP
  1248. The required syntax for a \s-1TCP\s0 url is:
  1249. .PP
  1250. .Vb 1
  1251. \&        tcp://<hostname>:<port>[?<options>]
  1252. .Ve
  1253. .PP
  1254. \&\fIoptions\fR contains a list of &\-separated options of the form
  1255. \&\fIkey\fR=\fIval\fR.
  1256. .PP
  1257. The list of supported options follows.
  1258. .IP "\fBlisten=\fR\fI1|0\fR" 4
  1259. .IX Item "listen=1|0"
  1260. Listen for an incoming connection. Default value is 0.
  1261. .IP "\fBtimeout=\fR\fImicroseconds\fR" 4
  1262. .IX Item "timeout=microseconds"
  1263. Set raise error timeout, expressed in microseconds.
  1264. .Sp
  1265. This option is only relevant in read mode: if no data arrived in more
  1266. than this time interval, raise error.
  1267. .IP "\fBlisten_timeout=\fR\fImilliseconds\fR" 4
  1268. .IX Item "listen_timeout=milliseconds"
  1269. Set listen timeout, expressed in milliseconds.
  1270. .PP
  1271. The following example shows how to setup a listening \s-1TCP\s0 connection
  1272. with \fBffmpeg\fR, which is then accessed with \fBffplay\fR:
  1273. .PP
  1274. .Vb 2
  1275. \&        ffmpeg -i <input> -f <format> tcp://<hostname>:<port>?listen
  1276. \&        ffplay tcp://<hostname>:<port>
  1277. .Ve
  1278. .Sh "tls"
  1279. .IX Subsection "tls"
  1280. Transport Layer Security (\s-1TLS\s0) / Secure Sockets Layer (\s-1SSL\s0)
  1281. .PP
  1282. The required syntax for a \s-1TLS/SSL\s0 url is:
  1283. .PP
  1284. .Vb 1
  1285. \&        tls://<hostname>:<port>[?<options>]
  1286. .Ve
  1287. .PP
  1288. The following parameters can be set via command line options
  1289. (or in code via \f(CW\*(C`AVOption\*(C'\fRs):
  1290. .IP "\fBca_file, cafile=\fR\fIfilename\fR" 4
  1291. .IX Item "ca_file, cafile=filename"
  1292. A file containing certificate authority (\s-1CA\s0) root certificates to treat
  1293. as trusted. If the linked \s-1TLS\s0 library contains a default this might not
  1294. need to be specified for verification to work, but not all libraries and
  1295. setups have defaults built in.
  1296. The file must be in OpenSSL \s-1PEM\s0 format.
  1297. .IP "\fBtls_verify=\fR\fI1|0\fR" 4
  1298. .IX Item "tls_verify=1|0"
  1299. If enabled, try to verify the peer that we are communicating with.
  1300. Note, if using OpenSSL, this currently only makes sure that the
  1301. peer certificate is signed by one of the root certificates in the \s-1CA\s0
  1302. database, but it does not validate that the certificate actually
  1303. matches the host name we are trying to connect to. (With GnuTLS,
  1304. the host name is validated as well.)
  1305. .Sp
  1306. This is disabled by default since it requires a \s-1CA\s0 database to be
  1307. provided by the caller in many cases.
  1308. .IP "\fBcert_file, cert=\fR\fIfilename\fR" 4
  1309. .IX Item "cert_file, cert=filename"
  1310. A file containing a certificate to use in the handshake with the peer.
  1311. (When operating as server, in listen mode, this is more often required
  1312. by the peer, while client certificates only are mandated in certain
  1313. setups.)
  1314. .IP "\fBkey_file, key=\fR\fIfilename\fR" 4
  1315. .IX Item "key_file, key=filename"
  1316. A file containing the private key for the certificate.
  1317. .IP "\fBlisten=\fR\fI1|0\fR" 4
  1318. .IX Item "listen=1|0"
  1319. If enabled, listen for connections on the provided port, and assume
  1320. the server role in the handshake instead of the client role.
  1321. .PP
  1322. Example command lines:
  1323. .PP
  1324. To create a \s-1TLS/SSL\s0 server that serves an input stream.
  1325. .PP
  1326. .Vb 1
  1327. \&        ffmpeg -i <input> -f <format> tls://<hostname>:<port>?listen&cert=<server.crt>&key=<server.key>
  1328. .Ve
  1329. .PP
  1330. To play back a stream from the \s-1TLS/SSL\s0 server using \fBffplay\fR:
  1331. .PP
  1332. .Vb 1
  1333. \&        ffplay tls://<hostname>:<port>
  1334. .Ve
  1335. .Sh "udp"
  1336. .IX Subsection "udp"
  1337. User Datagram Protocol.
  1338. .PP
  1339. The required syntax for an \s-1UDP\s0 \s-1URL\s0 is:
  1340. .PP
  1341. .Vb 1
  1342. \&        udp://<hostname>:<port>[?<options>]
  1343. .Ve
  1344. .PP
  1345. \&\fIoptions\fR contains a list of &\-separated options of the form \fIkey\fR=\fIval\fR.
  1346. .PP
  1347. In case threading is enabled on the system, a circular buffer is used
  1348. to store the incoming data, which allows one to reduce loss of data due to
  1349. \&\s-1UDP\s0 socket buffer overruns. The \fIfifo_size\fR and
  1350. \&\fIoverrun_nonfatal\fR options are related to this buffer.
  1351. .PP
  1352. The list of supported options follows.
  1353. .IP "\fBbuffer_size=\fR\fIsize\fR" 4
  1354. .IX Item "buffer_size=size"
  1355. Set the \s-1UDP\s0 maximum socket buffer size in bytes. This is used to set either
  1356. the receive or send buffer size, depending on what the socket is used for.
  1357. Default is 64KB.  See also \fIfifo_size\fR.
  1358. .IP "\fBlocalport=\fR\fIport\fR" 4
  1359. .IX Item "localport=port"
  1360. Override the local \s-1UDP\s0 port to bind with.
  1361. .IP "\fBlocaladdr=\fR\fIaddr\fR" 4
  1362. .IX Item "localaddr=addr"
  1363. Choose the local \s-1IP\s0 address. This is useful e.g. if sending multicast
  1364. and the host has multiple interfaces, where the user can choose
  1365. which interface to send on by specifying the \s-1IP\s0 address of that interface.
  1366. .IP "\fBpkt_size=\fR\fIsize\fR" 4
  1367. .IX Item "pkt_size=size"
  1368. Set the size in bytes of \s-1UDP\s0 packets.
  1369. .IP "\fBreuse=\fR\fI1|0\fR" 4
  1370. .IX Item "reuse=1|0"
  1371. Explicitly allow or disallow reusing \s-1UDP\s0 sockets.
  1372. .IP "\fBttl=\fR\fIttl\fR" 4
  1373. .IX Item "ttl=ttl"
  1374. Set the time to live value (for multicast only).
  1375. .IP "\fBconnect=\fR\fI1|0\fR" 4
  1376. .IX Item "connect=1|0"
  1377. Initialize the \s-1UDP\s0 socket with \f(CW\*(C`connect()\*(C'\fR. In this case, the
  1378. destination address can't be changed with ff_udp_set_remote_url later.
  1379. If the destination address isn't known at the start, this option can
  1380. be specified in ff_udp_set_remote_url, too.
  1381. This allows finding out the source address for the packets with getsockname,
  1382. and makes writes return with \s-1AVERROR\s0(\s-1ECONNREFUSED\s0) if \*(L"destination
  1383. unreachable\*(R" is received.
  1384. For receiving, this gives the benefit of only receiving packets from
  1385. the specified peer address/port.
  1386. .IP "\fBsources=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
  1387. .IX Item "sources=address[,address]"
  1388. Only receive packets sent to the multicast group from one of the
  1389. specified sender \s-1IP\s0 addresses.
  1390. .IP "\fBblock=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4
  1391. .IX Item "block=address[,address]"
  1392. Ignore packets sent to the multicast group from the specified
  1393. sender \s-1IP\s0 addresses.
  1394. .IP "\fBfifo_size=\fR\fIunits\fR" 4
  1395. .IX Item "fifo_size=units"
  1396. Set the \s-1UDP\s0 receiving circular buffer size, expressed as a number of
  1397. packets with size of 188 bytes. If not specified defaults to 7*4096.
  1398. .IP "\fBoverrun_nonfatal=\fR\fI1|0\fR" 4
  1399. .IX Item "overrun_nonfatal=1|0"
  1400. Survive in case of \s-1UDP\s0 receiving circular buffer overrun. Default
  1401. value is 0.
  1402. .IP "\fBtimeout=\fR\fImicroseconds\fR" 4
  1403. .IX Item "timeout=microseconds"
  1404. Set raise error timeout, expressed in microseconds.
  1405. .Sp
  1406. This option is only relevant in read mode: if no data arrived in more
  1407. than this time interval, raise error.
  1408. .IP "\fBbroadcast=\fR\fI1|0\fR" 4
  1409. .IX Item "broadcast=1|0"
  1410. Explicitly allow or disallow \s-1UDP\s0 broadcasting.
  1411. .Sp
  1412. Note that broadcasting may not work properly on networks having
  1413. a broadcast storm protection.
  1414. .PP
  1415. \fIExamples\fR
  1416. .IX Subsection "Examples"
  1417. .IP "\(bu" 4
  1418. Use \fBffmpeg\fR to stream over \s-1UDP\s0 to a remote endpoint:
  1419. .Sp
  1420. .Vb 1
  1421. \&        ffmpeg -i <input> -f <format> udp://<hostname>:<port>
  1422. .Ve
  1423. .IP "\(bu" 4
  1424. Use \fBffmpeg\fR to stream in mpegts format over \s-1UDP\s0 using 188
  1425. sized \s-1UDP\s0 packets, using a large input buffer:
  1426. .Sp
  1427. .Vb 1
  1428. \&        ffmpeg -i <input> -f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
  1429. .Ve
  1430. .IP "\(bu" 4
  1431. Use \fBffmpeg\fR to receive over \s-1UDP\s0 from a remote endpoint:
  1432. .Sp
  1433. .Vb 1
  1434. \&        ffmpeg -i udp://[<multicast-address>]:<port> ...
  1435. .Ve
  1436. .Sh "unix"
  1437. .IX Subsection "unix"
  1438. Unix local socket
  1439. .PP
  1440. The required syntax for a Unix socket \s-1URL\s0 is:
  1441. .PP
  1442. .Vb 1
  1443. \&        unix://<filepath>
  1444. .Ve
  1445. .PP
  1446. The following parameters can be set via command line options
  1447. (or in code via \f(CW\*(C`AVOption\*(C'\fRs):
  1448. .IP "\fBtimeout\fR" 4
  1449. .IX Item "timeout"
  1450. Timeout in ms.
  1451. .IP "\fBlisten\fR" 4
  1452. .IX Item "listen"
  1453. Create the Unix socket in listening mode.
  1454. .SH "SEE ALSO"
  1455. .IX Header "SEE ALSO"
  1456. \&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavformat\fR\|(3)
  1457. .SH "AUTHORS"
  1458. .IX Header "AUTHORS"
  1459. The FFmpeg developers.
  1460. .PP
  1461. For details about the authorship, see the Git history of the project
  1462. (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
  1463. \&\fBgit log\fR in the FFmpeg source directory, or browsing the
  1464. online repository at <\fBhttp://source.ffmpeg.org\fR>.
  1465. .PP
  1466. Maintainers for the specific components are listed in the file
  1467. \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.
  1468.