You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

824 lines
61KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. FFmpeg FAQ
  8. </title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  10. <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  11. <link rel="stylesheet" type="text/css" href="style.min.css">
  12. </head>
  13. <body>
  14. <div class="container">
  15. <h1>
  16. FFmpeg FAQ
  17. </h1>
  18. <div align="center">
  19. </div>
  20. <a name="SEC_Top"></a>
  21. <div class="Contents_element" id="SEC_Contents">
  22. <h2 class="contents-heading">Table of Contents</h2>
  23. <div class="contents">
  24. <ul class="no-bullet">
  25. <li><a id="toc-General-Questions" href="#General-Questions">1 General Questions</a>
  26. <ul class="no-bullet">
  27. <li><a id="toc-Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f" href="#Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f">1.1 Why doesn&rsquo;t FFmpeg support feature [xyz]?</a></li>
  28. <li><a id="toc-FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f" href="#FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f">1.2 FFmpeg does not support codec XXX. Can you include a Windows DLL loader to support it?</a></li>
  29. <li><a id="toc-I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e" href="#I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e">1.3 I cannot read this file although this format seems to be supported by ffmpeg.</a></li>
  30. <li><a id="toc-Which-codecs-are-supported-by-Windows_003f" href="#Which-codecs-are-supported-by-Windows_003f">1.4 Which codecs are supported by Windows?</a></li>
  31. </ul></li>
  32. <li><a id="toc-Compilation" href="#Compilation">2 Compilation</a>
  33. <ul class="no-bullet">
  34. <li><a id="toc-error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027" href="#error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027">2.1 <code>error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'</code></a></li>
  35. <li><a id="toc-I-have-installed-this-library-with-my-distro_0027s-package-manager_002e-Why-does-configure-not-see-it_003f" href="#I-have-installed-this-library-with-my-distro_0027s-package-manager_002e-Why-does-configure-not-see-it_003f">2.2 I have installed this library with my distro&rsquo;s package manager. Why does <code>configure</code> not see it?</a></li>
  36. <li><a id="toc-How-do-I-make-pkg_002dconfig-find-my-libraries_003f" href="#How-do-I-make-pkg_002dconfig-find-my-libraries_003f">2.3 How do I make <code>pkg-config</code> find my libraries?</a></li>
  37. <li><a id="toc-How-do-I-use-pkg_002dconfig-when-cross_002dcompiling_003f" href="#How-do-I-use-pkg_002dconfig-when-cross_002dcompiling_003f">2.4 How do I use <code>pkg-config</code> when cross-compiling?</a></li>
  38. </ul></li>
  39. <li><a id="toc-Usage" href="#Usage">3 Usage</a>
  40. <ul class="no-bullet">
  41. <li><a id="toc-ffmpeg-does-not-work_003b-what-is-wrong_003f" href="#ffmpeg-does-not-work_003b-what-is-wrong_003f">3.1 ffmpeg does not work; what is wrong?</a></li>
  42. <li><a id="toc-How-do-I-encode-single-pictures-into-movies_003f" href="#How-do-I-encode-single-pictures-into-movies_003f">3.2 How do I encode single pictures into movies?</a></li>
  43. <li><a id="toc-How-do-I-encode-movie-to-single-pictures_003f" href="#How-do-I-encode-movie-to-single-pictures_003f">3.3 How do I encode movie to single pictures?</a></li>
  44. <li><a id="toc-Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f" href="#Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f">3.4 Why do I see a slight quality degradation with multithreaded MPEG* encoding?</a></li>
  45. <li><a id="toc-How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f" href="#How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f">3.5 How can I read from the standard input or write to the standard output?</a></li>
  46. <li><a id="toc-_002df-jpeg-doesn_0027t-work_002e" href="#g_t_002df-jpeg-doesn_0027t-work_002e">3.6 -f jpeg doesn&rsquo;t work.</a></li>
  47. <li><a id="toc-Why-can-I-not-change-the-frame-rate_003f" href="#Why-can-I-not-change-the-frame-rate_003f">3.7 Why can I not change the frame rate?</a></li>
  48. <li><a id="toc-How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f" href="#How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f">3.8 How do I encode Xvid or DivX video with ffmpeg?</a></li>
  49. <li><a id="toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f">3.9 Which are good parameters for encoding high quality MPEG-4?</a></li>
  50. <li><a id="toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f">3.10 Which are good parameters for encoding high quality MPEG-1/MPEG-2?</a></li>
  51. <li><a id="toc-Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f" href="#Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f">3.11 Interlaced video looks very bad when encoded with ffmpeg, what is wrong?</a></li>
  52. <li><a id="toc-How-can-I-read-DirectShow-files_003f" href="#How-can-I-read-DirectShow-files_003f">3.12 How can I read DirectShow files?</a></li>
  53. <li><a id="toc-How-can-I-join-video-files_003f" href="#How-can-I-join-video-files_003f">3.13 How can I join video files?</a></li>
  54. <li><a id="toc-How-can-I-concatenate-video-files_003f" href="#How-can-I-concatenate-video-files_003f">3.14 How can I concatenate video files?</a>
  55. <ul class="no-bullet">
  56. <li><a id="toc-Concatenating-using-the-concat-filter" href="#Concatenating-using-the-concat-filter">3.14.1 Concatenating using the concat <em>filter</em></a></li>
  57. <li><a id="toc-Concatenating-using-the-concat-demuxer" href="#Concatenating-using-the-concat-demuxer">3.14.2 Concatenating using the concat <em>demuxer</em></a></li>
  58. <li><a id="toc-Concatenating-using-the-concat-protocol-_0028file-level_0029" href="#Concatenating-using-the-concat-protocol-_0028file-level_0029">3.14.3 Concatenating using the concat <em>protocol</em> (file level)</a></li>
  59. <li><a id="toc-Concatenating-using-raw-audio-and-video" href="#Concatenating-using-raw-audio-and-video">3.14.4 Concatenating using raw audio and video</a></li>
  60. </ul></li>
  61. <li><a id="toc-Using-_002df-lavfi_002c-audio-becomes-mono-for-no-apparent-reason_002e" href="#Using-_002df-lavfi_002c-audio-becomes-mono-for-no-apparent-reason_002e">3.15 Using <samp>-f lavfi</samp>, audio becomes mono for no apparent reason.</a></li>
  62. <li><a id="toc-Why-does-FFmpeg-not-see-the-subtitles-in-my-VOB-file_003f" href="#Why-does-FFmpeg-not-see-the-subtitles-in-my-VOB-file_003f">3.16 Why does FFmpeg not see the subtitles in my VOB file?</a></li>
  63. <li><a id="toc-Why-was-the-ffmpeg-_002dsameq-option-removed_003f-What-to-use-instead_003f" href="#Why-was-the-ffmpeg-_002dsameq-option-removed_003f-What-to-use-instead_003f">3.17 Why was the <code>ffmpeg</code> <samp>-sameq</samp> option removed? What to use instead?</a></li>
  64. <li><a id="toc-I-have-a-stretched-video_002c-why-does-scaling-does-not-fix-it_003f" href="#I-have-a-stretched-video_002c-why-does-scaling-does-not-fix-it_003f">3.18 I have a stretched video, why does scaling does not fix it?</a></li>
  65. <li><a id="toc-How-do-I-run-ffmpeg-as-a-background-task_003f" href="#How-do-I-run-ffmpeg-as-a-background-task_003f">3.19 How do I run ffmpeg as a background task?</a></li>
  66. <li><a id="toc-How-do-I-prevent-ffmpeg-from-suspending-with-a-message-like-suspended-_0028tty-output_0029_003f" href="#How-do-I-prevent-ffmpeg-from-suspending-with-a-message-like-suspended-_0028tty-output_0029_003f">3.20 How do I prevent ffmpeg from suspending with a message like <em>suspended (tty output)</em>?</a></li>
  67. </ul></li>
  68. <li><a id="toc-Development" href="#Development">4 Development</a>
  69. <ul class="no-bullet">
  70. <li><a id="toc-Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f" href="#Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f">4.1 Are there examples illustrating how to use the FFmpeg libraries, particularly libavcodec and libavformat?</a></li>
  71. <li><a id="toc-Can-you-support-my-C-compiler-XXX_003f" href="#Can-you-support-my-C-compiler-XXX_003f">4.2 Can you support my C compiler XXX?</a></li>
  72. <li><a id="toc-Is-Microsoft-Visual-C_002b_002b-supported_003f" href="#Is-Microsoft-Visual-C_002b_002b-supported_003f">4.3 Is Microsoft Visual C++ supported?</a></li>
  73. <li><a id="toc-Can-you-add-automake_002c-libtool-or-autoconf-support_003f" href="#Can-you-add-automake_002c-libtool-or-autoconf-support_003f">4.4 Can you add automake, libtool or autoconf support?</a></li>
  74. <li><a id="toc-Why-not-rewrite-FFmpeg-in-object_002doriented-C_002b_002b_003f" href="#Why-not-rewrite-FFmpeg-in-object_002doriented-C_002b_002b_003f">4.5 Why not rewrite FFmpeg in object-oriented C++?</a></li>
  75. <li><a id="toc-Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f" href="#Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f">4.6 Why are the ffmpeg programs devoid of debugging symbols?</a></li>
  76. <li><a id="toc-I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f" href="#I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f">4.7 I do not like the LGPL, can I contribute code under the GPL instead?</a></li>
  77. <li><a id="toc-I_0027m-using-FFmpeg-from-within-my-C-application-but-the-linker-complains-about-missing-symbols-from-the-libraries-themselves_002e" href="#I_0027m-using-FFmpeg-from-within-my-C-application-but-the-linker-complains-about-missing-symbols-from-the-libraries-themselves_002e">4.8 I&rsquo;m using FFmpeg from within my C application but the linker complains about missing symbols from the libraries themselves.</a></li>
  78. <li><a id="toc-I_0027m-using-FFmpeg-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e" href="#I_0027m-using-FFmpeg-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e">4.9 I&rsquo;m using FFmpeg from within my C++ application but the linker complains about missing symbols which seem to be available.</a></li>
  79. <li><a id="toc-I_0027m-using-libavutil-from-within-my-C_002b_002b-application-but-the-compiler-complains-about-_0027UINT64_005fC_0027-was-not-declared-in-this-scope" href="#I_0027m-using-libavutil-from-within-my-C_002b_002b-application-but-the-compiler-complains-about-_0027UINT64_005fC_0027-was-not-declared-in-this-scope">4.10 I&rsquo;m using libavutil from within my C++ application but the compiler complains about &rsquo;UINT64_C&rsquo; was not declared in this scope</a></li>
  80. <li><a id="toc-I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f" href="#I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f">4.11 I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?</a></li>
  81. <li><a id="toc-Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f" href="#Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f">4.12 Where is the documentation about ffv1, msmpeg4, asv1, 4xm?</a></li>
  82. <li><a id="toc-How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f" href="#How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f">4.13 How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?</a></li>
  83. <li><a id="toc-AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-frame-rate_002e" href="#AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-frame-rate_002e">4.14 AVStream.r_frame_rate is wrong, it is much larger than the frame rate.</a></li>
  84. <li><a id="toc-Why-is-make-fate-not-running-all-tests_003f" href="#Why-is-make-fate-not-running-all-tests_003f">4.15 Why is <code>make fate</code> not running all tests?</a></li>
  85. <li><a id="toc-Why-is-make-fate-not-finding-the-samples_003f" href="#Why-is-make-fate-not-finding-the-samples_003f">4.16 Why is <code>make fate</code> not finding the samples?</a></li>
  86. </ul></li>
  87. </ul>
  88. </div>
  89. </div>
  90. <a name="General-Questions"></a>
  91. <h2 class="chapter">1 General Questions<span class="pull-right"><a class="anchor hidden-xs" href="#General-Questions" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-General-Questions" aria-hidden="true">TOC</a></span></h2>
  92. <a name="Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f"></a>
  93. <h3 class="section">1.1 Why doesn&rsquo;t FFmpeg support feature [xyz]?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-doesn_0027t-FFmpeg-support-feature-_005bxyz_005d_003f" aria-hidden="true">TOC</a></span></h3>
  94. <p>Because no one has taken on that task yet. FFmpeg development is
  95. driven by the tasks that are important to the individual developers.
  96. If there is a feature that is important to you, the best way to get
  97. it implemented is to undertake the task yourself or sponsor a developer.
  98. </p>
  99. <a name="FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f"></a>
  100. <h3 class="section">1.2 FFmpeg does not support codec XXX. Can you include a Windows DLL loader to support it?<span class="pull-right"><a class="anchor hidden-xs" href="#FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-FFmpeg-does-not-support-codec-XXX_002e-Can-you-include-a-Windows-DLL-loader-to-support-it_003f" aria-hidden="true">TOC</a></span></h3>
  101. <p>No. Windows DLLs are not portable, bloated and often slow.
  102. Moreover FFmpeg strives to support all codecs natively.
  103. A DLL loader is not conducive to that goal.
  104. </p>
  105. <a name="I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e"></a>
  106. <h3 class="section">1.3 I cannot read this file although this format seems to be supported by ffmpeg.<span class="pull-right"><a class="anchor hidden-xs" href="#I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I-cannot-read-this-file-although-this-format-seems-to-be-supported-by-ffmpeg_002e" aria-hidden="true">TOC</a></span></h3>
  107. <p>Even if ffmpeg can read the container format, it may not support all its
  108. codecs. Please consult the supported codec list in the ffmpeg
  109. documentation.
  110. </p>
  111. <a name="Which-codecs-are-supported-by-Windows_003f"></a>
  112. <h3 class="section">1.4 Which codecs are supported by Windows?<span class="pull-right"><a class="anchor hidden-xs" href="#Which-codecs-are-supported-by-Windows_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Which-codecs-are-supported-by-Windows_003f" aria-hidden="true">TOC</a></span></h3>
  113. <p>Windows does not support standard formats like MPEG very well, unless you
  114. install some additional codecs.
  115. </p>
  116. <p>The following list of video codecs should work on most Windows systems:
  117. </p><dl compact="compact">
  118. <dt><span><samp>msmpeg4v2</samp></span></dt>
  119. <dd><p>.avi/.asf
  120. </p></dd>
  121. <dt><span><samp>msmpeg4</samp></span></dt>
  122. <dd><p>.asf only
  123. </p></dd>
  124. <dt><span><samp>wmv1</samp></span></dt>
  125. <dd><p>.asf only
  126. </p></dd>
  127. <dt><span><samp>wmv2</samp></span></dt>
  128. <dd><p>.asf only
  129. </p></dd>
  130. <dt><span><samp>mpeg4</samp></span></dt>
  131. <dd><p>Only if you have some MPEG-4 codec like ffdshow or Xvid installed.
  132. </p></dd>
  133. <dt><span><samp>mpeg1video</samp></span></dt>
  134. <dd><p>.mpg only
  135. </p></dd>
  136. </dl>
  137. <p>Note, ASF files often have .wmv or .wma extensions in Windows. It should also
  138. be mentioned that Microsoft claims a patent on the ASF format, and may sue
  139. or threaten users who create ASF files with non-Microsoft software. It is
  140. strongly advised to avoid ASF where possible.
  141. </p>
  142. <p>The following list of audio codecs should work on most Windows systems:
  143. </p><dl compact="compact">
  144. <dt><span><samp>adpcm_ima_wav</samp></span></dt>
  145. <dt><span><samp>adpcm_ms</samp></span></dt>
  146. <dt><span><samp>pcm_s16le</samp></span></dt>
  147. <dd><p>always
  148. </p></dd>
  149. <dt><span><samp>libmp3lame</samp></span></dt>
  150. <dd><p>If some MP3 codec like LAME is installed.
  151. </p></dd>
  152. </dl>
  153. <a name="Compilation"></a>
  154. <h2 class="chapter">2 Compilation<span class="pull-right"><a class="anchor hidden-xs" href="#Compilation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Compilation" aria-hidden="true">TOC</a></span></h2>
  155. <a name="error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027"></a>
  156. <h3 class="section">2.1 <code>error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'</code><span class="pull-right"><a class="anchor hidden-xs" href="#error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-error_003a-can_0027t-find-a-register-in-class-_0027GENERAL_005fREGS_0027-while-reloading-_0027asm_0027" aria-hidden="true">TOC</a></span></h3>
  157. <p>This is a bug in gcc. Do not report it to us. Instead, please report it to
  158. the gcc developers. Note that we will not add workarounds for gcc bugs.
  159. </p>
  160. <p>Also note that (some of) the gcc developers believe this is not a bug or
  161. not a bug they should fix:
  162. <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203</a>.
  163. Then again, some of them do not know the difference between an undecidable
  164. problem and an NP-hard problem...
  165. </p>
  166. <a name="I-have-installed-this-library-with-my-distro_0027s-package-manager_002e-Why-does-configure-not-see-it_003f"></a>
  167. <h3 class="section">2.2 I have installed this library with my distro&rsquo;s package manager. Why does <code>configure</code> not see it?<span class="pull-right"><a class="anchor hidden-xs" href="#I-have-installed-this-library-with-my-distro_0027s-package-manager_002e-Why-does-configure-not-see-it_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I-have-installed-this-library-with-my-distro_0027s-package-manager_002e-Why-does-configure-not-see-it_003f" aria-hidden="true">TOC</a></span></h3>
  168. <p>Distributions usually split libraries in several packages. The main package
  169. contains the files necessary to run programs using the library. The
  170. development package contains the files necessary to build programs using the
  171. library. Sometimes, docs and/or data are in a separate package too.
  172. </p>
  173. <p>To build FFmpeg, you need to install the development package. It is usually
  174. called <samp>libfoo-dev</samp> or <samp>libfoo-devel</samp>. You can remove it after the
  175. build is finished, but be sure to keep the main package.
  176. </p>
  177. <a name="How-do-I-make-pkg_002dconfig-find-my-libraries_003f"></a>
  178. <h3 class="section">2.3 How do I make <code>pkg-config</code> find my libraries?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-make-pkg_002dconfig-find-my-libraries_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-make-pkg_002dconfig-find-my-libraries_003f" aria-hidden="true">TOC</a></span></h3>
  179. <p>Somewhere along with your libraries, there is a <samp>.pc</samp> file (or several)
  180. in a <samp>pkgconfig</samp> directory. You need to set environment variables to
  181. point <code>pkg-config</code> to these files.
  182. </p>
  183. <p>If you need to <em>add</em> directories to <code>pkg-config</code>&rsquo;s search list
  184. (typical use case: library installed separately), add it to
  185. <code>$PKG_CONFIG_PATH</code>:
  186. </p>
  187. <div class="example">
  188. <pre class="example">export PKG_CONFIG_PATH=/opt/x264/lib/pkgconfig:/opt/opus/lib/pkgconfig
  189. </pre></div>
  190. <p>If you need to <em>replace</em> <code>pkg-config</code>&rsquo;s search list
  191. (typical use case: cross-compiling), set it in
  192. <code>$PKG_CONFIG_LIBDIR</code>:
  193. </p>
  194. <div class="example">
  195. <pre class="example">export PKG_CONFIG_LIBDIR=/home/me/cross/usr/lib/pkgconfig:/home/me/cross/usr/local/lib/pkgconfig
  196. </pre></div>
  197. <p>If you need to know the library&rsquo;s internal dependencies (typical use: static
  198. linking), add the <code>--static</code> option to <code>pkg-config</code>:
  199. </p>
  200. <div class="example">
  201. <pre class="example">./configure --pkg-config-flags=--static
  202. </pre></div>
  203. <a name="How-do-I-use-pkg_002dconfig-when-cross_002dcompiling_003f"></a>
  204. <h3 class="section">2.4 How do I use <code>pkg-config</code> when cross-compiling?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-use-pkg_002dconfig-when-cross_002dcompiling_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-use-pkg_002dconfig-when-cross_002dcompiling_003f" aria-hidden="true">TOC</a></span></h3>
  205. <p>The best way is to install <code>pkg-config</code> in your cross-compilation
  206. environment. It will automatically use the cross-compilation libraries.
  207. </p>
  208. <p>You can also use <code>pkg-config</code> from the host environment by
  209. specifying explicitly <code>--pkg-config=pkg-config</code> to <code>configure</code>.
  210. In that case, you must point <code>pkg-config</code> to the correct directories
  211. using the <code>PKG_CONFIG_LIBDIR</code>, as explained in the previous entry.
  212. </p>
  213. <p>As an intermediate solution, you can place in your cross-compilation
  214. environment a script that calls the host <code>pkg-config</code> with
  215. <code>PKG_CONFIG_LIBDIR</code> set. That script can look like that:
  216. </p>
  217. <div class="example">
  218. <pre class="example">#!/bin/sh
  219. PKG_CONFIG_LIBDIR=/path/to/cross/lib/pkgconfig
  220. export PKG_CONFIG_LIBDIR
  221. exec /usr/bin/pkg-config &quot;$@&quot;
  222. </pre></div>
  223. <a name="Usage"></a>
  224. <h2 class="chapter">3 Usage<span class="pull-right"><a class="anchor hidden-xs" href="#Usage" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Usage" aria-hidden="true">TOC</a></span></h2>
  225. <a name="ffmpeg-does-not-work_003b-what-is-wrong_003f"></a>
  226. <h3 class="section">3.1 ffmpeg does not work; what is wrong?<span class="pull-right"><a class="anchor hidden-xs" href="#ffmpeg-does-not-work_003b-what-is-wrong_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ffmpeg-does-not-work_003b-what-is-wrong_003f" aria-hidden="true">TOC</a></span></h3>
  227. <p>Try a <code>make distclean</code> in the ffmpeg source directory before the build.
  228. If this does not help see
  229. (<a href="https://ffmpeg.org/bugreports.html">https://ffmpeg.org/bugreports.html</a>).
  230. </p>
  231. <a name="How-do-I-encode-single-pictures-into-movies_003f"></a>
  232. <h3 class="section">3.2 How do I encode single pictures into movies?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-encode-single-pictures-into-movies_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-encode-single-pictures-into-movies_003f" aria-hidden="true">TOC</a></span></h3>
  233. <p>First, rename your pictures to follow a numerical sequence.
  234. For example, img1.jpg, img2.jpg, img3.jpg,...
  235. Then you may run:
  236. </p>
  237. <div class="example">
  238. <pre class="example">ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
  239. </pre></div>
  240. <p>Notice that &lsquo;<samp>%d</samp>&rsquo; is replaced by the image number.
  241. </p>
  242. <p><samp>img%03d.jpg</samp> means the sequence <samp>img001.jpg</samp>, <samp>img002.jpg</samp>, etc.
  243. </p>
  244. <p>Use the <samp>-start_number</samp> option to declare a starting number for
  245. the sequence. This is useful if your sequence does not start with
  246. <samp>img001.jpg</samp> but is still in a numerical order. The following
  247. example will start with <samp>img100.jpg</samp>:
  248. </p>
  249. <div class="example">
  250. <pre class="example">ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg
  251. </pre></div>
  252. <p>If you have large number of pictures to rename, you can use the
  253. following command to ease the burden. The command, using the bourne
  254. shell syntax, symbolically links all files in the current directory
  255. that match <code>*jpg</code> to the <samp>/tmp</samp> directory in the sequence of
  256. <samp>img001.jpg</samp>, <samp>img002.jpg</samp> and so on.
  257. </p>
  258. <div class="example">
  259. <pre class="example">x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s &quot;$i&quot; /tmp/img&quot;$counter&quot;.jpg; x=$(($x+1)); done
  260. </pre></div>
  261. <p>If you want to sequence them by oldest modified first, substitute
  262. <code>$(ls -r -t *jpg)</code> in place of <code>*jpg</code>.
  263. </p>
  264. <p>Then run:
  265. </p>
  266. <div class="example">
  267. <pre class="example">ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
  268. </pre></div>
  269. <p>The same logic is used for any image format that ffmpeg reads.
  270. </p>
  271. <p>You can also use <code>cat</code> to pipe images to ffmpeg:
  272. </p>
  273. <div class="example">
  274. <pre class="example">cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
  275. </pre></div>
  276. <a name="How-do-I-encode-movie-to-single-pictures_003f"></a>
  277. <h3 class="section">3.3 How do I encode movie to single pictures?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-encode-movie-to-single-pictures_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-encode-movie-to-single-pictures_003f" aria-hidden="true">TOC</a></span></h3>
  278. <p>Use:
  279. </p>
  280. <div class="example">
  281. <pre class="example">ffmpeg -i movie.mpg movie%d.jpg
  282. </pre></div>
  283. <p>The <samp>movie.mpg</samp> used as input will be converted to
  284. <samp>movie1.jpg</samp>, <samp>movie2.jpg</samp>, etc...
  285. </p>
  286. <p>Instead of relying on file format self-recognition, you may also use
  287. </p><dl compact="compact">
  288. <dt><span><samp>-c:v ppm</samp></span></dt>
  289. <dt><span><samp>-c:v png</samp></span></dt>
  290. <dt><span><samp>-c:v mjpeg</samp></span></dt>
  291. </dl>
  292. <p>to force the encoding.
  293. </p>
  294. <p>Applying that to the previous example:
  295. </p><div class="example">
  296. <pre class="example">ffmpeg -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg
  297. </pre></div>
  298. <p>Beware that there is no &quot;jpeg&quot; codec. Use &quot;mjpeg&quot; instead.
  299. </p>
  300. <a name="Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f"></a>
  301. <h3 class="section">3.4 Why do I see a slight quality degradation with multithreaded MPEG* encoding?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-do-I-see-a-slight-quality-degradation-with-multithreaded-MPEG_002a-encoding_003f" aria-hidden="true">TOC</a></span></h3>
  302. <p>For multithreaded MPEG* encoding, the encoded slices must be independent,
  303. otherwise thread n would practically have to wait for n-1 to finish, so it&rsquo;s
  304. quite logical that there is a small reduction of quality. This is not a bug.
  305. </p>
  306. <a name="How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f"></a>
  307. <h3 class="section">3.5 How can I read from the standard input or write to the standard output?<span class="pull-right"><a class="anchor hidden-xs" href="#How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-can-I-read-from-the-standard-input-or-write-to-the-standard-output_003f" aria-hidden="true">TOC</a></span></h3>
  308. <p>Use <samp>-</samp> as file name.
  309. </p>
  310. <a name="g_t_002df-jpeg-doesn_0027t-work_002e"></a>
  311. <h3 class="section">3.6 -f jpeg doesn&rsquo;t work.<span class="pull-right"><a class="anchor hidden-xs" href="#_002df-jpeg-doesn_0027t-work_002e" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-_002df-jpeg-doesn_0027t-work_002e" aria-hidden="true">TOC</a></span></h3>
  312. <p>Try &rsquo;-f image2 test%d.jpg&rsquo;.
  313. </p>
  314. <a name="Why-can-I-not-change-the-frame-rate_003f"></a>
  315. <h3 class="section">3.7 Why can I not change the frame rate?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-can-I-not-change-the-frame-rate_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-can-I-not-change-the-frame-rate_003f" aria-hidden="true">TOC</a></span></h3>
  316. <p>Some codecs, like MPEG-1/2, only allow a small number of fixed frame rates.
  317. Choose a different codec with the -c:v command line option.
  318. </p>
  319. <a name="How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f"></a>
  320. <h3 class="section">3.8 How do I encode Xvid or DivX video with ffmpeg?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-encode-Xvid-or-DivX-video-with-ffmpeg_003f" aria-hidden="true">TOC</a></span></h3>
  321. <p>Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4
  322. standard (note that there are many other coding formats that use this
  323. same standard). Thus, use &rsquo;-c:v mpeg4&rsquo; to encode in these formats. The
  324. default fourcc stored in an MPEG-4-coded file will be &rsquo;FMP4&rsquo;. If you want
  325. a different fourcc, use the &rsquo;-vtag&rsquo; option. E.g., &rsquo;-vtag xvid&rsquo; will
  326. force the fourcc &rsquo;xvid&rsquo; to be stored as the video fourcc rather than the
  327. default.
  328. </p>
  329. <a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f"></a>
  330. <h3 class="section">3.9 Which are good parameters for encoding high quality MPEG-4?<span class="pull-right"><a class="anchor hidden-xs" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d4_003f" aria-hidden="true">TOC</a></span></h3>
  331. <p>&rsquo;-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2&rsquo;,
  332. things to try: &rsquo;-bf 2&rsquo;, &rsquo;-mpv_flags qp_rd&rsquo;, &rsquo;-mpv_flags mv0&rsquo;, &rsquo;-mpv_flags skip_rd&rsquo;.
  333. </p>
  334. <a name="Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f"></a>
  335. <h3 class="section">3.10 Which are good parameters for encoding high quality MPEG-1/MPEG-2?<span class="pull-right"><a class="anchor hidden-xs" href="#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f" aria-hidden="true">TOC</a></span></h3>
  336. <p>&rsquo;-mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 100 -pass 1/2&rsquo;
  337. but beware the &rsquo;-g 100&rsquo; might cause problems with some decoders.
  338. Things to try: &rsquo;-bf 2&rsquo;, &rsquo;-mpv_flags qp_rd&rsquo;, &rsquo;-mpv_flags mv0&rsquo;, &rsquo;-mpv_flags skip_rd&rsquo;.
  339. </p>
  340. <a name="Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f"></a>
  341. <h3 class="section">3.11 Interlaced video looks very bad when encoded with ffmpeg, what is wrong?<span class="pull-right"><a class="anchor hidden-xs" href="#Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Interlaced-video-looks-very-bad-when-encoded-with-ffmpeg_002c-what-is-wrong_003f" aria-hidden="true">TOC</a></span></h3>
  342. <p>You should use &rsquo;-flags +ilme+ildct&rsquo; and maybe &rsquo;-flags +alt&rsquo; for interlaced
  343. material, and try &rsquo;-top 0/1&rsquo; if the result looks really messed-up.
  344. </p>
  345. <a name="How-can-I-read-DirectShow-files_003f"></a>
  346. <h3 class="section">3.12 How can I read DirectShow files?<span class="pull-right"><a class="anchor hidden-xs" href="#How-can-I-read-DirectShow-files_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-can-I-read-DirectShow-files_003f" aria-hidden="true">TOC</a></span></h3>
  347. <p>If you have built FFmpeg with <code>./configure --enable-avisynth</code>
  348. (only possible on MinGW/Cygwin platforms),
  349. then you may use any file that DirectShow can read as input.
  350. </p>
  351. <p>Just create an &quot;input.avs&quot; text file with this single line ...
  352. </p><div class="example">
  353. <pre class="example">DirectShowSource(&quot;C:\path to your file\yourfile.asf&quot;)
  354. </pre></div>
  355. <p>... and then feed that text file to ffmpeg:
  356. </p><div class="example">
  357. <pre class="example">ffmpeg -i input.avs
  358. </pre></div>
  359. <p>For ANY other help on AviSynth, please visit the
  360. <a href="http://www.avisynth.org/">AviSynth homepage</a>.
  361. </p>
  362. <a name="How-can-I-join-video-files_003f"></a>
  363. <h3 class="section">3.13 How can I join video files?<span class="pull-right"><a class="anchor hidden-xs" href="#How-can-I-join-video-files_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-can-I-join-video-files_003f" aria-hidden="true">TOC</a></span></h3>
  364. <p>To &quot;join&quot; video files is quite ambiguous. The following list explains the
  365. different kinds of &quot;joining&quot; and points out how those are addressed in
  366. FFmpeg. To join video files may mean:
  367. </p>
  368. <ul>
  369. <li> To put them one after the other: this is called to <em>concatenate</em> them
  370. (in short: concat) and is addressed
  371. <a href="#How-can-I-concatenate-video-files">in this very faq</a>.
  372. </li><li> To put them together in the same file, to let the user choose between the
  373. different versions (example: different audio languages): this is called to
  374. <em>multiplex</em> them together (in short: mux), and is done by simply
  375. invoking ffmpeg with several <samp>-i</samp> options.
  376. </li><li> For audio, to put all channels together in a single stream (example: two
  377. mono streams into one stereo stream): this is sometimes called to
  378. <em>merge</em> them, and can be done using the
  379. <a href="ffmpeg-filters.html#amerge"><code>amerge</code></a> filter.
  380. </li><li> For audio, to play one on top of the other: this is called to <em>mix</em>
  381. them, and can be done by first merging them into a single stream and then
  382. using the <a href="ffmpeg-filters.html#pan"><code>pan</code></a> filter to mix
  383. the channels at will.
  384. </li><li> For video, to display both together, side by side or one on top of a part of
  385. the other; it can be done using the
  386. <a href="ffmpeg-filters.html#overlay"><code>overlay</code></a> video filter.
  387. </li></ul>
  388. <span id="How-can-I-concatenate-video-files"></span><a name="How-can-I-concatenate-video-files_003f"></a>
  389. <h3 class="section">3.14 How can I concatenate video files?<span class="pull-right"><a class="anchor hidden-xs" href="#How-can-I-concatenate-video-files_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-can-I-concatenate-video-files_003f" aria-hidden="true">TOC</a></span></h3>
  390. <p>There are several solutions, depending on the exact circumstances.
  391. </p>
  392. <a name="Concatenating-using-the-concat-filter"></a>
  393. <h4 class="subsection">3.14.1 Concatenating using the concat <em>filter</em><span class="pull-right"><a class="anchor hidden-xs" href="#Concatenating-using-the-concat-filter" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Concatenating-using-the-concat-filter" aria-hidden="true">TOC</a></span></h4>
  394. <p>FFmpeg has a <a href="ffmpeg-filters.html#concat"><code>concat</code></a> filter designed specifically for that, with examples in the
  395. documentation. This operation is recommended if you need to re-encode.
  396. </p>
  397. <a name="Concatenating-using-the-concat-demuxer"></a>
  398. <h4 class="subsection">3.14.2 Concatenating using the concat <em>demuxer</em><span class="pull-right"><a class="anchor hidden-xs" href="#Concatenating-using-the-concat-demuxer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Concatenating-using-the-concat-demuxer" aria-hidden="true">TOC</a></span></h4>
  399. <p>FFmpeg has a <a href="ffmpeg-formats.html#concat"><code>concat</code></a> demuxer which you can use when you want to avoid a re-encode and
  400. your format doesn&rsquo;t support file level concatenation.
  401. </p>
  402. <a name="Concatenating-using-the-concat-protocol-_0028file-level_0029"></a>
  403. <h4 class="subsection">3.14.3 Concatenating using the concat <em>protocol</em> (file level)<span class="pull-right"><a class="anchor hidden-xs" href="#Concatenating-using-the-concat-protocol-_0028file-level_0029" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Concatenating-using-the-concat-protocol-_0028file-level_0029" aria-hidden="true">TOC</a></span></h4>
  404. <p>FFmpeg has a <a href="ffmpeg-protocols.html#concat"><code>concat</code></a> protocol designed specifically for that, with examples in the
  405. documentation.
  406. </p>
  407. <p>A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow one to concatenate
  408. video by merely concatenating the files containing them.
  409. </p>
  410. <p>Hence you may concatenate your multimedia files by first transcoding them to
  411. these privileged formats, then using the humble <code>cat</code> command (or the
  412. equally humble <code>copy</code> under Windows), and finally transcoding back to your
  413. format of choice.
  414. </p>
  415. <div class="example">
  416. <pre class="example">ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg
  417. ffmpeg -i input2.avi -qscale:v 1 intermediate2.mpg
  418. cat intermediate1.mpg intermediate2.mpg &gt; intermediate_all.mpg
  419. ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi
  420. </pre></div>
  421. <p>Additionally, you can use the <code>concat</code> protocol instead of <code>cat</code> or
  422. <code>copy</code> which will avoid creation of a potentially huge intermediate file.
  423. </p>
  424. <div class="example">
  425. <pre class="example">ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg
  426. ffmpeg -i input2.avi -qscale:v 1 intermediate2.mpg
  427. ffmpeg -i concat:&quot;intermediate1.mpg|intermediate2.mpg&quot; -c copy intermediate_all.mpg
  428. ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi
  429. </pre></div>
  430. <p>Note that you may need to escape the character &quot;|&quot; which is special for many
  431. shells.
  432. </p>
  433. <p>Another option is usage of named pipes, should your platform support it:
  434. </p>
  435. <div class="example">
  436. <pre class="example">mkfifo intermediate1.mpg
  437. mkfifo intermediate2.mpg
  438. ffmpeg -i input1.avi -qscale:v 1 -y intermediate1.mpg &lt; /dev/null &amp;
  439. ffmpeg -i input2.avi -qscale:v 1 -y intermediate2.mpg &lt; /dev/null &amp;
  440. cat intermediate1.mpg intermediate2.mpg |\
  441. ffmpeg -f mpeg -i - -c:v mpeg4 -c:a libmp3lame output.avi
  442. </pre></div>
  443. <a name="Concatenating-using-raw-audio-and-video"></a>
  444. <h4 class="subsection">3.14.4 Concatenating using raw audio and video<span class="pull-right"><a class="anchor hidden-xs" href="#Concatenating-using-raw-audio-and-video" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Concatenating-using-raw-audio-and-video" aria-hidden="true">TOC</a></span></h4>
  445. <p>Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
  446. allow concatenation, and the transcoding step is almost lossless.
  447. When using multiple yuv4mpegpipe(s), the first line needs to be discarded
  448. from all but the first stream. This can be accomplished by piping through
  449. <code>tail</code> as seen below. Note that when piping through <code>tail</code> you
  450. must use command grouping, <code>{ ;}</code>, to background properly.
  451. </p>
  452. <p>For example, let&rsquo;s say we want to concatenate two FLV files into an
  453. output.flv file:
  454. </p>
  455. <div class="example">
  456. <pre class="example">mkfifo temp1.a
  457. mkfifo temp1.v
  458. mkfifo temp2.a
  459. mkfifo temp2.v
  460. mkfifo all.a
  461. mkfifo all.v
  462. ffmpeg -i input1.flv -vn -f u16le -c:a pcm_s16le -ac 2 -ar 44100 - &gt; temp1.a &lt; /dev/null &amp;
  463. ffmpeg -i input2.flv -vn -f u16le -c:a pcm_s16le -ac 2 -ar 44100 - &gt; temp2.a &lt; /dev/null &amp;
  464. ffmpeg -i input1.flv -an -f yuv4mpegpipe - &gt; temp1.v &lt; /dev/null &amp;
  465. { ffmpeg -i input2.flv -an -f yuv4mpegpipe - &lt; /dev/null | tail -n +2 &gt; temp2.v ; } &amp;
  466. cat temp1.a temp2.a &gt; all.a &amp;
  467. cat temp1.v temp2.v &gt; all.v &amp;
  468. ffmpeg -f u16le -c:a pcm_s16le -ac 2 -ar 44100 -i all.a \
  469. -f yuv4mpegpipe -i all.v \
  470. -y output.flv
  471. rm temp[12].[av] all.[av]
  472. </pre></div>
  473. <a name="Using-_002df-lavfi_002c-audio-becomes-mono-for-no-apparent-reason_002e"></a>
  474. <h3 class="section">3.15 Using <samp>-f lavfi</samp>, audio becomes mono for no apparent reason.<span class="pull-right"><a class="anchor hidden-xs" href="#Using-_002df-lavfi_002c-audio-becomes-mono-for-no-apparent-reason_002e" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Using-_002df-lavfi_002c-audio-becomes-mono-for-no-apparent-reason_002e" aria-hidden="true">TOC</a></span></h3>
  475. <p>Use <samp>-dumpgraph -</samp> to find out exactly where the channel layout is
  476. lost.
  477. </p>
  478. <p>Most likely, it is through <code>auto-inserted aresample</code>. Try to understand
  479. why the converting filter was needed at that place.
  480. </p>
  481. <p>Just before the output is a likely place, as <samp>-f lavfi</samp> currently
  482. only support packed S16.
  483. </p>
  484. <p>Then insert the correct <code>aformat</code> explicitly in the filtergraph,
  485. specifying the exact format.
  486. </p>
  487. <div class="example">
  488. <pre class="example">aformat=sample_fmts=s16:channel_layouts=stereo
  489. </pre></div>
  490. <a name="Why-does-FFmpeg-not-see-the-subtitles-in-my-VOB-file_003f"></a>
  491. <h3 class="section">3.16 Why does FFmpeg not see the subtitles in my VOB file?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-does-FFmpeg-not-see-the-subtitles-in-my-VOB-file_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-does-FFmpeg-not-see-the-subtitles-in-my-VOB-file_003f" aria-hidden="true">TOC</a></span></h3>
  492. <p>VOB and a few other formats do not have a global header that describes
  493. everything present in the file. Instead, applications are supposed to scan
  494. the file to see what it contains. Since VOB files are frequently large, only
  495. the beginning is scanned. If the subtitles happen only later in the file,
  496. they will not be initially detected.
  497. </p>
  498. <p>Some applications, including the <code>ffmpeg</code> command-line tool, can only
  499. work with streams that were detected during the initial scan; streams that
  500. are detected later are ignored.
  501. </p>
  502. <p>The size of the initial scan is controlled by two options: <code>probesize</code>
  503. (default ~5 Mo) and <code>analyzeduration</code> (default 5,000,000 µs = 5 s). For
  504. the subtitle stream to be detected, both values must be large enough.
  505. </p>
  506. <a name="Why-was-the-ffmpeg-_002dsameq-option-removed_003f-What-to-use-instead_003f"></a>
  507. <h3 class="section">3.17 Why was the <code>ffmpeg</code> <samp>-sameq</samp> option removed? What to use instead?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-was-the-ffmpeg-_002dsameq-option-removed_003f-What-to-use-instead_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-was-the-ffmpeg-_002dsameq-option-removed_003f-What-to-use-instead_003f" aria-hidden="true">TOC</a></span></h3>
  508. <p>The <samp>-sameq</samp> option meant &quot;same quantizer&quot;, and made sense only in a
  509. very limited set of cases. Unfortunately, a lot of people mistook it for
  510. &quot;same quality&quot; and used it in places where it did not make sense: it had
  511. roughly the expected visible effect, but achieved it in a very inefficient
  512. way.
  513. </p>
  514. <p>Each encoder has its own set of options to set the quality-vs-size balance,
  515. use the options for the encoder you are using to set the quality level to a
  516. point acceptable for your tastes. The most common options to do that are
  517. <samp>-qscale</samp> and <samp>-qmax</samp>, but you should peruse the documentation
  518. of the encoder you chose.
  519. </p>
  520. <a name="I-have-a-stretched-video_002c-why-does-scaling-does-not-fix-it_003f"></a>
  521. <h3 class="section">3.18 I have a stretched video, why does scaling does not fix it?<span class="pull-right"><a class="anchor hidden-xs" href="#I-have-a-stretched-video_002c-why-does-scaling-does-not-fix-it_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I-have-a-stretched-video_002c-why-does-scaling-does-not-fix-it_003f" aria-hidden="true">TOC</a></span></h3>
  522. <p>A lot of video codecs and formats can store the <em>aspect ratio</em> of the
  523. video: this is the ratio between the width and the height of either the full
  524. image (DAR, display aspect ratio) or individual pixels (SAR, sample aspect
  525. ratio). For example, EGA screens at resolution 640×350 had 4:3 DAR and 35:48
  526. SAR.
  527. </p>
  528. <p>Most still image processing work with square pixels, i.e. 1:1 SAR, but a lot
  529. of video standards, especially from the analogic-numeric transition era, use
  530. non-square pixels.
  531. </p>
  532. <p>Most processing filters in FFmpeg handle the aspect ratio to avoid
  533. stretching the image: cropping adjusts the DAR to keep the SAR constant,
  534. scaling adjusts the SAR to keep the DAR constant.
  535. </p>
  536. <p>If you want to stretch, or “unstretch”, the image, you need to override the
  537. information with the
  538. <a href="ffmpeg-filters.html#setdar_002c-setsar"><code>setdar or setsar filters</code></a>.
  539. </p>
  540. <p>Do not forget to examine carefully the original video to check whether the
  541. stretching comes from the image or from the aspect ratio information.
  542. </p>
  543. <p>For example, to fix a badly encoded EGA capture, use the following commands,
  544. either the first one to upscale to square pixels or the second one to set
  545. the correct aspect ratio or the third one to avoid transcoding (may not work
  546. depending on the format / codec / player / phase of the moon):
  547. </p>
  548. <div class="example">
  549. <pre class="example">ffmpeg -i ega_screen.nut -vf scale=640:480,setsar=1 ega_screen_scaled.nut
  550. ffmpeg -i ega_screen.nut -vf setdar=4/3 ega_screen_anamorphic.nut
  551. ffmpeg -i ega_screen.nut -aspect 4/3 -c copy ega_screen_overridden.nut
  552. </pre></div>
  553. <span id="background-task"></span><a name="How-do-I-run-ffmpeg-as-a-background-task_003f"></a>
  554. <h3 class="section">3.19 How do I run ffmpeg as a background task?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-run-ffmpeg-as-a-background-task_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-run-ffmpeg-as-a-background-task_003f" aria-hidden="true">TOC</a></span></h3>
  555. <p>ffmpeg normally checks the console input, for entries like &quot;q&quot; to stop
  556. and &quot;?&quot; to give help, while performing operations. ffmpeg does not have a way of
  557. detecting when it is running as a background task.
  558. When it checks the console input, that can cause the process running ffmpeg
  559. in the background to suspend.
  560. </p>
  561. <p>To prevent those input checks, allowing ffmpeg to run as a background task,
  562. use the <a href="ffmpeg.html#stdin-option"><code>-nostdin</code> option</a>
  563. in the ffmpeg invocation. This is effective whether you run ffmpeg in a shell
  564. or invoke ffmpeg in its own process via an operating system API.
  565. </p>
  566. <p>As an alternative, when you are running ffmpeg in a shell, you can redirect
  567. standard input to <code>/dev/null</code> (on Linux and macOS)
  568. or <code>NUL</code> (on Windows). You can do this redirect either
  569. on the ffmpeg invocation, or from a shell script which calls ffmpeg.
  570. </p>
  571. <p>For example:
  572. </p>
  573. <div class="example">
  574. <pre class="example">ffmpeg -nostdin -i INPUT OUTPUT
  575. </pre></div>
  576. <p>or (on Linux, macOS, and other UNIX-like shells):
  577. </p>
  578. <div class="example">
  579. <pre class="example">ffmpeg -i INPUT OUTPUT &lt;/dev/null
  580. </pre></div>
  581. <p>or (on Windows):
  582. </p>
  583. <div class="example">
  584. <pre class="example">ffmpeg -i INPUT OUTPUT &lt;NUL
  585. </pre></div>
  586. <a name="How-do-I-prevent-ffmpeg-from-suspending-with-a-message-like-suspended-_0028tty-output_0029_003f"></a>
  587. <h3 class="section">3.20 How do I prevent ffmpeg from suspending with a message like <em>suspended (tty output)</em>?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-prevent-ffmpeg-from-suspending-with-a-message-like-suspended-_0028tty-output_0029_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-prevent-ffmpeg-from-suspending-with-a-message-like-suspended-_0028tty-output_0029_003f" aria-hidden="true">TOC</a></span></h3>
  588. <p>If you run ffmpeg in the background, you may find that its process suspends.
  589. There may be a message like <em>suspended (tty output)</em>. The question is how
  590. to prevent the process from being suspended.
  591. </p>
  592. <p>For example:
  593. </p>
  594. <div class="example">
  595. <pre class="example">% ffmpeg -i INPUT OUTPUT &amp;&gt; ~/tmp/log.txt &amp;
  596. [1] 93352
  597. %
  598. [1] + suspended (tty output) ffmpeg -i INPUT OUTPUT &amp;&gt;
  599. </pre></div>
  600. <p>The message &quot;tty output&quot; notwithstanding, the problem here is that
  601. ffmpeg normally checks the console input when it runs. The operating system
  602. detects this, and suspends the process until you can bring it to the
  603. foreground and attend to it.
  604. </p>
  605. <p>The solution is to use the right techniques to tell ffmpeg not to consult
  606. console input. You can use the
  607. <a href="ffmpeg.html#stdin-option"><code>-nostdin</code> option</a>,
  608. or redirect standard input with <code>&lt; /dev/null</code>.
  609. See FAQ
  610. <a href="#background-task"><em>How do I run ffmpeg as a background task?</em></a>
  611. for details.
  612. </p>
  613. <a name="Development"></a>
  614. <h2 class="chapter">4 Development<span class="pull-right"><a class="anchor hidden-xs" href="#Development" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Development" aria-hidden="true">TOC</a></span></h2>
  615. <a name="Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f"></a>
  616. <h3 class="section">4.1 Are there examples illustrating how to use the FFmpeg libraries, particularly libavcodec and libavformat?<span class="pull-right"><a class="anchor hidden-xs" href="#Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Are-there-examples-illustrating-how-to-use-the-FFmpeg-libraries_002c-particularly-libavcodec-and-libavformat_003f" aria-hidden="true">TOC</a></span></h3>
  617. <p>Yes. Check the <samp>doc/examples</samp> directory in the source
  618. repository, also available online at:
  619. <a href="https://github.com/FFmpeg/FFmpeg/tree/master/doc/examples">https://github.com/FFmpeg/FFmpeg/tree/master/doc/examples</a>.
  620. </p>
  621. <p>Examples are also installed by default, usually in
  622. <code>$PREFIX/share/ffmpeg/examples</code>.
  623. </p>
  624. <p>Also you may read the Developers Guide of the FFmpeg documentation. Alternatively,
  625. examine the source code for one of the many open source projects that
  626. already incorporate FFmpeg at (<a href="projects.html">projects.html</a>).
  627. </p>
  628. <a name="Can-you-support-my-C-compiler-XXX_003f"></a>
  629. <h3 class="section">4.2 Can you support my C compiler XXX?<span class="pull-right"><a class="anchor hidden-xs" href="#Can-you-support-my-C-compiler-XXX_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Can-you-support-my-C-compiler-XXX_003f" aria-hidden="true">TOC</a></span></h3>
  630. <p>It depends. If your compiler is C99-compliant, then patches to support
  631. it are likely to be welcome if they do not pollute the source code
  632. with <code>#ifdef</code>s related to the compiler.
  633. </p>
  634. <a name="Is-Microsoft-Visual-C_002b_002b-supported_003f"></a>
  635. <h3 class="section">4.3 Is Microsoft Visual C++ supported?<span class="pull-right"><a class="anchor hidden-xs" href="#Is-Microsoft-Visual-C_002b_002b-supported_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Is-Microsoft-Visual-C_002b_002b-supported_003f" aria-hidden="true">TOC</a></span></h3>
  636. <p>Yes. Please see the <a href="platform.html">Microsoft Visual C++</a>
  637. section in the FFmpeg documentation.
  638. </p>
  639. <a name="Can-you-add-automake_002c-libtool-or-autoconf-support_003f"></a>
  640. <h3 class="section">4.4 Can you add automake, libtool or autoconf support?<span class="pull-right"><a class="anchor hidden-xs" href="#Can-you-add-automake_002c-libtool-or-autoconf-support_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Can-you-add-automake_002c-libtool-or-autoconf-support_003f" aria-hidden="true">TOC</a></span></h3>
  641. <p>No. These tools are too bloated and they complicate the build.
  642. </p>
  643. <a name="Why-not-rewrite-FFmpeg-in-object_002doriented-C_002b_002b_003f"></a>
  644. <h3 class="section">4.5 Why not rewrite FFmpeg in object-oriented C++?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-not-rewrite-FFmpeg-in-object_002doriented-C_002b_002b_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-not-rewrite-FFmpeg-in-object_002doriented-C_002b_002b_003f" aria-hidden="true">TOC</a></span></h3>
  645. <p>FFmpeg is already organized in a highly modular manner and does not need to
  646. be rewritten in a formal object language. Further, many of the developers
  647. favor straight C; it works for them. For more arguments on this matter,
  648. read <a href="https://web.archive.org/web/20111004021423/http://kernel.org/pub/linux/docs/lkml/#s15">&quot;Programming Religion&quot;</a>.
  649. </p>
  650. <a name="Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f"></a>
  651. <h3 class="section">4.6 Why are the ffmpeg programs devoid of debugging symbols?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-are-the-ffmpeg-programs-devoid-of-debugging-symbols_003f" aria-hidden="true">TOC</a></span></h3>
  652. <p>The build process creates <code>ffmpeg_g</code>, <code>ffplay_g</code>, etc. which
  653. contain full debug information. Those binaries are stripped to create
  654. <code>ffmpeg</code>, <code>ffplay</code>, etc. If you need the debug information, use
  655. the *_g versions.
  656. </p>
  657. <a name="I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f"></a>
  658. <h3 class="section">4.7 I do not like the LGPL, can I contribute code under the GPL instead?<span class="pull-right"><a class="anchor hidden-xs" href="#I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I-do-not-like-the-LGPL_002c-can-I-contribute-code-under-the-GPL-instead_003f" aria-hidden="true">TOC</a></span></h3>
  659. <p>Yes, as long as the code is optional and can easily and cleanly be placed
  660. under #if CONFIG_GPL without breaking anything. So, for example, a new codec
  661. or filter would be OK under GPL while a bug fix to LGPL code would not.
  662. </p>
  663. <a name="I_0027m-using-FFmpeg-from-within-my-C-application-but-the-linker-complains-about-missing-symbols-from-the-libraries-themselves_002e"></a>
  664. <h3 class="section">4.8 I&rsquo;m using FFmpeg from within my C application but the linker complains about missing symbols from the libraries themselves.<span class="pull-right"><a class="anchor hidden-xs" href="#I_0027m-using-FFmpeg-from-within-my-C-application-but-the-linker-complains-about-missing-symbols-from-the-libraries-themselves_002e" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I_0027m-using-FFmpeg-from-within-my-C-application-but-the-linker-complains-about-missing-symbols-from-the-libraries-themselves_002e" aria-hidden="true">TOC</a></span></h3>
  665. <p>FFmpeg builds static libraries by default. In static libraries, dependencies
  666. are not handled. That has two consequences. First, you must specify the
  667. libraries in dependency order: <code>-lavdevice</code> must come before
  668. <code>-lavformat</code>, <code>-lavutil</code> must come after everything else, etc.
  669. Second, external libraries that are used in FFmpeg have to be specified too.
  670. </p>
  671. <p>An easy way to get the full list of required libraries in dependency order
  672. is to use <code>pkg-config</code>.
  673. </p>
  674. <div class="example">
  675. <pre class="example">c99 -o program program.c $(pkg-config --cflags --libs libavformat libavcodec)
  676. </pre></div>
  677. <p>See <samp>doc/example/Makefile</samp> and <samp>doc/example/pc-uninstalled</samp> for
  678. more details.
  679. </p>
  680. <a name="I_0027m-using-FFmpeg-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e"></a>
  681. <h3 class="section">4.9 I&rsquo;m using FFmpeg from within my C++ application but the linker complains about missing symbols which seem to be available.<span class="pull-right"><a class="anchor hidden-xs" href="#I_0027m-using-FFmpeg-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I_0027m-using-FFmpeg-from-within-my-C_002b_002b-application-but-the-linker-complains-about-missing-symbols-which-seem-to-be-available_002e" aria-hidden="true">TOC</a></span></h3>
  682. <p>FFmpeg is a pure C project, so to use the libraries within your C++ application
  683. you need to explicitly state that you are using a C library. You can do this by
  684. encompassing your FFmpeg includes using <code>extern &quot;C&quot;</code>.
  685. </p>
  686. <p>See <a href="http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3">http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3</a>
  687. </p>
  688. <a name="I_0027m-using-libavutil-from-within-my-C_002b_002b-application-but-the-compiler-complains-about-_0027UINT64_005fC_0027-was-not-declared-in-this-scope"></a>
  689. <h3 class="section">4.10 I&rsquo;m using libavutil from within my C++ application but the compiler complains about &rsquo;UINT64_C&rsquo; was not declared in this scope<span class="pull-right"><a class="anchor hidden-xs" href="#I_0027m-using-libavutil-from-within-my-C_002b_002b-application-but-the-compiler-complains-about-_0027UINT64_005fC_0027-was-not-declared-in-this-scope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I_0027m-using-libavutil-from-within-my-C_002b_002b-application-but-the-compiler-complains-about-_0027UINT64_005fC_0027-was-not-declared-in-this-scope" aria-hidden="true">TOC</a></span></h3>
  690. <p>FFmpeg is a pure C project using C99 math features, in order to enable C++
  691. to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
  692. </p>
  693. <a name="I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f"></a>
  694. <h3 class="section">4.11 I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?<span class="pull-right"><a class="anchor hidden-xs" href="#I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-I-have-a-file-in-memory-_002f-a-API-different-from-_002aopen_002f_002aread_002f-libc-how-do-I-use-it-with-libavformat_003f" aria-hidden="true">TOC</a></span></h3>
  695. <p>You have to create a custom AVIOContext using <code>avio_alloc_context</code>,
  696. see <samp>libavformat/aviobuf.c</samp> in FFmpeg and <samp>libmpdemux/demux_lavf.c</samp> in MPlayer or MPlayer2 sources.
  697. </p>
  698. <a name="Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f"></a>
  699. <h3 class="section">4.12 Where is the documentation about ffv1, msmpeg4, asv1, 4xm?<span class="pull-right"><a class="anchor hidden-xs" href="#Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Where-is-the-documentation-about-ffv1_002c-msmpeg4_002c-asv1_002c-4xm_003f" aria-hidden="true">TOC</a></span></h3>
  700. <p>see <a href="https://www.ffmpeg.org/~michael/">https://www.ffmpeg.org/~michael/</a>
  701. </p>
  702. <a name="How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f"></a>
  703. <h3 class="section">4.13 How do I feed H.263-RTP (and other codecs in RTP) to libavcodec?<span class="pull-right"><a class="anchor hidden-xs" href="#How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-How-do-I-feed-H_002e263_002dRTP-_0028and-other-codecs-in-RTP_0029-to-libavcodec_003f" aria-hidden="true">TOC</a></span></h3>
  704. <p>Even if peculiar since it is network oriented, RTP is a container like any
  705. other. You have to <em>demux</em> RTP before feeding the payload to libavcodec.
  706. In this specific case please look at RFC 4629 to see how it should be done.
  707. </p>
  708. <a name="AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-frame-rate_002e"></a>
  709. <h3 class="section">4.14 AVStream.r_frame_rate is wrong, it is much larger than the frame rate.<span class="pull-right"><a class="anchor hidden-xs" href="#AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-frame-rate_002e" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-frame-rate_002e" aria-hidden="true">TOC</a></span></h3>
  710. <p><code>r_frame_rate</code> is NOT the average frame rate, it is the smallest frame rate
  711. that can accurately represent all timestamps. So no, it is not
  712. wrong if it is larger than the average!
  713. For example, if you have mixed 25 and 30 fps content, then <code>r_frame_rate</code>
  714. will be 150 (it is the least common multiple).
  715. If you are looking for the average frame rate, see <code>AVStream.avg_frame_rate</code>.
  716. </p>
  717. <a name="Why-is-make-fate-not-running-all-tests_003f"></a>
  718. <h3 class="section">4.15 Why is <code>make fate</code> not running all tests?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-is-make-fate-not-running-all-tests_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-is-make-fate-not-running-all-tests_003f" aria-hidden="true">TOC</a></span></h3>
  719. <p>Make sure you have the fate-suite samples and the <code>SAMPLES</code> Make variable
  720. or <code>FATE_SAMPLES</code> environment variable or the <code>--samples</code>
  721. <code>configure</code> option is set to the right path.
  722. </p>
  723. <a name="Why-is-make-fate-not-finding-the-samples_003f"></a>
  724. <h3 class="section">4.16 Why is <code>make fate</code> not finding the samples?<span class="pull-right"><a class="anchor hidden-xs" href="#Why-is-make-fate-not-finding-the-samples_003f" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Why-is-make-fate-not-finding-the-samples_003f" aria-hidden="true">TOC</a></span></h3>
  725. <p>Do you happen to have a <code>~</code> character in the samples path to indicate a
  726. home directory? The value is used in ways where the shell cannot expand it,
  727. causing FATE to not find files. Just replace <code>~</code> by the full path.
  728. </p>
  729. <p style="font-size: small;">
  730. This document was generated using <a href="https://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
  731. </p>
  732. </div>
  733. </body>
  734. </html>