title: youtube-dl sometime hangs with "[ffmpeg] Correcting container"
body: <p>Ubuntu 16.04</p>
  
  <pre><code>/usr/local/bin/youtube-dl --version
  2018.05.09
  </code></pre>
  
  <p>I have a bash script that attemts to download a youtube video. The output is below. The problem is that sometimes it works perfectly (completes quickly).
  But most of the time it hangs on "Correcting container....". Does anyone know why?</p>
  
  <pre><code>+ /usr/local/bin/youtube-dl --verbose -x 'https://www.youtube.com/watch?v=8HVWitAW-Qg'
  
  [debug] System config: []
  
  [debug] User config: []
  
  [debug] Custom config: []
  
  [debug] Command-line args: [u'--verbose', u'-x', u'https://www.youtube.com/watch?v=8HVWitAW-Qg']
  
  [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
  
  [debug] youtube-dl version 2018.05.09
  
  [debug] Python version 2.7.12 (CPython) - Linux-4.4.0-124-generic-x86_64-with-Ubuntu-16.04-xenial
  
  [debug] exe versions: avconv 2.8.14-0ubuntu0.16.04.1, avprobe 2.8.14-0ubuntu0.16.04.1, ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1, rtmpdump 2.4
  
  [debug] Proxy map: {}
  
  [youtube] 8HVWitAW-Qg: Downloading webpage
  
  [youtube] 8HVWitAW-Qg: Downloading video info webpage
  
  [youtube] 8HVWitAW-Qg: Extracting video information
  
  [debug] Invoking downloader on u'https://r5---sn-5uaeznkl.googlevideo.com/videoplayback?expire=1526159728&amp;source=youtube&amp;key=yt6&amp;mime=audio%2Fmp4&amp;sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cusequic%2Cexpire&amp;keepalive=yes&amp;lmt=1518142590597815&amp;dur=231.131&amp;mv=m&amp;mt=1526137933&amp;ms=au%2Conr&amp;signature=18BB34F3716B412AC5757872DD2AF402B6EE20D2.43D2E68B5A5ED2E2D3076DF9264B9BB723484821&amp;ip=71.81.217.251&amp;c=WEB&amp;initcwndbps=1583750&amp;mn=sn-5uaeznkl%2Csn-p5qs7n7l&amp;clen=3671757&amp;gir=yes&amp;id=o-AOxj8Rg2IuZek8KwvgPy-N7_FSGzxQ0Zl2HX1T4gepLf&amp;ipbits=0&amp;fvip=5&amp;ei=EAX3WqbOH8fg4QSlkrGoAg&amp;pl=20&amp;mm=31%2C26&amp;itag=140&amp;usequic=no&amp;requiressl=yes&amp;ratebypass=yes'
  
  [download] Destination: Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a
  
  [download] 100% of 3.50MiB in 00:00
  
  [ffmpeg] Correcting container in "Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a"
  
  [debug] ffmpeg command line: avconv -y -i 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a' -c copy -f mp4 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.temp.m4a'
  
  ^C
  ERROR: Interrupted by user
  </code></pre>