Ubuntu 16.04
/usr/local/bin/youtube-dl --version 2018.05.09
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?
+ /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&source=youtube&key=yt6&mime=audio%2Fmp4&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cusequic%2Cexpire&keepalive=yes&lmt=1518142590597815&dur=231.131&mv=m&mt=1526137933&ms=au%2Conr&signature=18BB34F3716B412AC5757872DD2AF402B6EE20D2.43D2E68B5A5ED2E2D3076DF9264B9BB723484821&ip=71.81.217.251&c=WEB&initcwndbps=1583750&mn=sn-5uaeznkl%2Csn-p5qs7n7l&clen=3671757&gir=yes&id=o-AOxj8Rg2IuZek8KwvgPy-N7_FSGzxQ0Zl2HX1T4gepLf&ipbits=0&fvip=5&ei=EAX3WqbOH8fg4QSlkrGoAg&pl=20&mm=31%2C26&itag=140&usequic=no&requiressl=yes&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
Advertisement
Answer
I installed the latest ffmpeg and use the following:
/usr/local/bin/youtube-dl -q –no-warnings –fixup –prefer-ffmpeg — ffmpeg-location /usr/local/bin -x “$1”
I get audio files consistently now (ogg, opus, m4a, etc). But errors still print on the screen. Good enough for now.