Site updated at 2017-10-02 12:26:10 UTC

This commit is contained in:
Travis CI 2017-10-02 12:26:11 +00:00
parent c0f6082634
commit c4dfa10e02
27 changed files with 91 additions and 80 deletions

View file

@ -8,7 +8,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>FFmpeg - Home Assistant</title>
<meta name="author" content="Home Assistant">
<meta name="description" content="Instructions for how to integrate FFmpeg within Home Assistant.">
<meta name="description" content="Instructions on how to integrate FFmpeg within Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/components/ffmpeg/">
<meta property="fb:app_id" content="338291289691179">
@ -16,12 +16,12 @@
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/ffmpeg/">
<meta property="og:type" content="article">
<meta property="og:description" content="Instructions for how to integrate FFmpeg within Home Assistant.">
<meta property="og:description" content="Instructions on how to integrate FFmpeg within Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="FFmpeg">
<meta name="twitter:description" content="Instructions for how to integrate FFmpeg within Home Assistant.">
<meta name="twitter:description" content="Instructions on how to integrate FFmpeg within Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
@ -74,7 +74,7 @@
</h1>
</header>
<hr class="divider">
<p>The <code class="highlighter-rouge">ffmpeg</code> component allows other Home Assistant components to process video and audio streams. This component supports all FFmpeg versions since 3.0.0; if you have a older version, please update.</p>
<p>The <code class="highlighter-rouge">ffmpeg</code> component allows other Home Assistant components to process video and audio streams. This component supports all FFmpeg versions since 3.0.0; if you have an older version, please update.</p>
<p class="note">
You need the <code class="highlighter-rouge">ffmpeg</code> binary in your system path. On Debian 8 or Raspbian (Jessie) you can install it from <a href="https://backports.debian.org/Instructions/">debian-backports</a>. If you want <a href="https://trac.ffmpeg.org/wiki/HWAccelIntro">hardware acceleration</a> support on a Raspberry Pi, you will need to build from source by yourself. Windows binaries are available on the <a href="http://www.ffmpeg.org/">FFmpeg</a> website.
</p>
@ -104,23 +104,23 @@ If you are using <a href="/hassio/">Hass.io</a> then just move forward to the co
</div>
<h3><a class="title-link" name="troubleshooting" href="#troubleshooting"></a> Troubleshooting</h3>
<p>In most cases, <code class="highlighter-rouge">ffmpeg</code> automatically detects all needed options to read a video or audio stream or file. But it is possible in rare cases that you will need to set options to help <code class="highlighter-rouge">ffmpeg</code> out.</p>
<p>First check that your stream is playable by <code class="highlighter-rouge">ffmpeg</code> outside of Home Assistant with (use option <code class="highlighter-rouge">-an</code> or <code class="highlighter-rouge">-vn</code> to disable video or audio stream):</p>
<p>First, check that your stream is playable by <code class="highlighter-rouge">ffmpeg</code> outside of Home Assistant with (use option <code class="highlighter-rouge">-an</code> or <code class="highlighter-rouge">-vn</code> to disable video or audio stream):</p>
<div class="highlighter-rouge"><pre class="highlight"><code>$ ffmpeg -i INPUT -an -f null -
</code></pre>
</div>
<p>Now you should be able to see what is going wrong. The following list contains some common problems and solutions:</p>
<ul>
<li><code class="highlighter-rouge">[rtsp @ ...] UDP timeout, retrying with TCP</code>: You need to set an RTSP transport in the configuration with: <code class="highlighter-rouge">input: -rtsp_transport tcp -i INPUT</code></li>
<li><code class="highlighter-rouge">[rtsp @ ...] Could not find codec parameters for stream 0 (Video: ..., none): unspecified size</code>: FFmpeg needs more data or time for autodetection (the default is 5 seconds). You can set the <code class="highlighter-rouge">analyzeduration</code> and/or <code class="highlighter-rouge">probesize</code> options to experiment with giving FFmpeg more leeway. If you find the needed value, you can set it with: <code class="highlighter-rouge">input: -analyzeduration xy -probesize xy -i INPUT</code>. More information about this can be found <a href="https://www.ffmpeg.org/ffmpeg-formats.html#Description">here</a>.</li>
<li><code class="highlighter-rouge">[rtsp @ ...] Could not find codec parameters for stream 0 (Video: ..., none): unspecified size</code>: FFmpeg needs more data or time for autodetection (the default is 5 seconds). You can set the <code class="highlighter-rouge">analyzeduration</code> and/or <code class="highlighter-rouge">probesize</code> options to experiment with giving FFmpeg more leeway. If you find the needed value, you can set it with: <code class="highlighter-rouge">input: -analyzeduration xy -probesize xy -i INPUT</code>. More information about this can be found <a href="https://www.ffmpeg.org/ffmpeg-formats.html#Description">here</a>.</li>
</ul>
<h4><a class="title-link" name="usb-cameras" href="#usb-cameras"></a> USB cameras</h4>
<p>For <code class="highlighter-rouge">INPUT</code> a valid source is needed. USB camera are an easy way to test your video setup. To get all available USB cameras connected to the system, eg. use the v4l2 tools on a Linux machine.</p>
<p>For <code class="highlighter-rouge">INPUT</code> a valid source is needed. A USB camera is an easy way to test your video setup. To get all available USB cameras connected to the system, e.g., use the v4l2 tools on a Linux machine.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>v4l2-ctl --list-devices
UVC Camera <span class="o">(</span>046d:0825<span class="o">)</span> <span class="o">(</span>usb-0000:00:14.0-1<span class="o">)</span>:
/dev/video1
/dev/video1
Integrated Camera <span class="o">(</span>usb-0000:00:14.0-10<span class="o">)</span>:
/dev/video0
/dev/video0
</code></pre>
</div>
<p>Record a test video with your USB device <code class="highlighter-rouge">/dev/video1</code>:</p>