Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`--quiet` isn't quiet, it's actually very loud #13183

Closed
jikamens opened this issue May 22, 2017 · 2 comments
Closed

`--quiet` isn't quiet, it's actually very loud #13183

jikamens opened this issue May 22, 2017 · 2 comments

Comments

@jikamens
Copy link

@jikamens jikamens commented May 22, 2017

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.05.18.1. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.05.18.1

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

$ youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.05.18.1
[debug] Python version 2.7.12 - Linux-4.8.0-13-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

Description of your issue, suggested solution and other information

I am using youtube-dl to record the YouTube live stream of A Prairie Home Companion when they do live shows out of St. Paul. Unfortunately, I am unable to provide a link to a specific YouTube video which has the issue I'm about to describe, because these live streams are only accessible on YouTube while the show is actually being broadcast, and I've been unable to find another video on YouTube which manifests the behavior I'm about to describe.

My recording setup has two components: (1) a script which monitors the broadcast schedule and A Prarie Home Companion home page to detect when they're about to go live, find the URL to record, and schedule a cron job and do the recording, and (2) the script called from my crontab to do the recording.

The script called from crontab is quite straightforward:

#!/bin/bash

. /etc/bash_completion.d/virtualenvwrapper
workon youtube-dl

set -e

youtube_id=$1; shift
dir=/tmp/prairie-home.$$

rm -rf $dir
mkdir -p $dir
cd $dir
fn="A Prairie Home Companion.S$(date +%Y).E$(date +%m%d).mp4"
youtube-dl --quiet -f 95 -o "$fn" "https://www.youtube.com/watch?v=$youtube_id"
cp *.mp4 "/mnt/recordings/Kodi/Prairie Home Companion/"
cd
rm -rf $dir

The important line is the youtube-dl --quiet line, which should record the video quietly. It doesn't. Instead, I get an email from cron with a huge amount of output in it, that looks like this:

ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-op
 engl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal
  --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[tls @ 0x1f63a40] The TLS connection was non-properly terminated.
[tls @ 0x1f63a40] The specified session has been invalidated for some reason.
Input #0, hls,applehttp, from 'https://manifest.googlevideo.com/api/manifest/hls_playlist/id/lxubIG80QcQ.1/itag/95/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D136/hls_chunk_host/r3---sn-gjo-cvnl.googlevideo.com/ei/Z7wgWYS8D4zKqAW53KiQBQ/playlist_type/LIVE/gcr/us/mm/32/mn/sn-gjo-cvnl/ms/lv/mv/m/pl/19/dover/6/upn/sIt9j2AF3Ao/mt/1495317548/ip/146.115.42.232/ipbits/0/expire/1495339206/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap,sgovp,hls_chunk_host,ei,playlist_type,gcr,mm,mn,ms,mv,pl/signature/9771206B48DF2371C829B43B20A50167A85F61AC.70C2ACEB9D719E5308113FF604347FE57D0F2841/key/dg_yt0/playlist/index.m3u8':
  Duration: N/A, start: 965.000000, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 127 kb/s
    Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
[mp4 @ 0x2a5d100] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0x2a5d100] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'file:A Prairie Home Companion.S2017.E0520.mp4.part':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 127 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[tls @ 0x2412080] The TLS connection was non-properly terminated.
[tls @ 0x2412080] The specified session has been invalidated for some reason.
frame=  450 fps= 85 q=-1.0 size=     751kB time=00:00:15.02 bitrate= 409.7kbits/s    [tls @ 0x2c08d00] The TLS connection was non-properly terminated.
[tls @ 0x2c08d00] The specified session has been invalidated for some reason.
frame=  750 fps= 69 q=-1.0 size=    1224kB time=00:00:25.02 bitrate= 400.8kbits/s    [tls @ 0x2c08d00] The TLS connection was non-properly terminated.
...many repetitions of lines like the two shown above...
[tls @ 0x2c08d00] The specified session has been invalidated for some reason.
[tls @ 0x2c051c0] The TLS connection was non-properly terminated.
...many repetitions of lines like the two shown above...
[tls @ 0x24390e0] The specified session has been invalidated for some reason.
[https @ 0x240ae80] HTTP error 403 Forbidden
[hls,applehttp @ 0x1f611a0] Failed to reload playlist 0
[https @ 0x240ae80] HTTP error 403 Forbidden
[hls,applehttp @ 0x1f611a0] Failed to reload playlist 0
frame=220200 fps= 10 q=-1.0 size= 1115493kB time=02:02:20.01 bitrate=1245.0kbits/s    frame=220200 fps= 10 q=-1.0 Lsize= 1121684kB time=02:02:20.01 bitrate=1251.9kbits/s    
video:1002943kB audio:112335kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.574402%

It's probably not useful to see the entire output, but I've attached it just in case I'm wrong about that.

I'm not asking for much, I just want youtube-dl to be quiet when I say --quiet. ;-)

Thanks.

@jikamens
Copy link
Author

@jikamens jikamens commented May 22, 2017

P.S. I know that the output above is from ffmpeg, not directly from youtube-dl. I had sort of assumed (incorrectly?) that youtube-dl would tell ffmpeg to be quiet when it is invoked with --quiet?

@dstftw dstftw closed this in a609e61 May 22, 2017
@jikamens
Copy link
Author

@jikamens jikamens commented May 22, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.