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

Improving support for piping to stdout #13257

Closed
Jiriss opened this issue Jun 1, 2017 · 2 comments
Closed

Improving support for piping to stdout #13257

Jiriss opened this issue Jun 1, 2017 · 2 comments
Labels

Comments

@Jiriss
Copy link

@Jiriss Jiriss commented Jun 1, 2017

youtube-dl pipes the live stream to an external video player correctly using parameter "o"

$ youtube-dl -v http://cls.elitehd-audiovisuales.com/luztv/livestream/index.m3u8 -o - | vlc -

A problem is when user close an external video player but youtube-dl still continues downloading stream. Does youtube-dl include some parameter that could help in this problem or can you improve support for piping to stdout? Now the downloading of the stream is stopped only when terminal window is closed or using Ctrl+C keys.

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.05.29. 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.29

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


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:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v http://cls.elitehd-audiovisuales.com/luztv/livestream/index.m3u8 -o - | vlc -
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'http://cls.elitehd-audiovisuales.com/luztv/livestream/index.m3u8', u'-o', u'-']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2017.05.29
[debug] Python version 2.7.6 - Linux-3.13.0-117-generic-x86_64
[debug] exe versions: avconv 9.20-6, avprobe 9.20-6, rtmpdump 2.4
[debug] Proxy map: {}
[generic] index: Requesting header
[generic] index: Downloading m3u8 information
[debug] Invoking downloader on u'http://cls.elitehd-audiovisuales.com/luztv/livestream/chunklist.m3u8'
[download] Destination: -
[debug] avconv command line: avconv -y -loglevel verbose -headers 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
' -i http://cls.elitehd-audiovisuales.com/luztv/livestream/chunklist.m3u8 -c copy -f mpegts -
avconv version 9.20-6:9.20-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Dec  7 2016 21:22:31 with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --arch=amd64 --enable-pthreads --enable-runtime-cpudetect --extra-version='6:9.20-0ubuntu0.14.04.1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-swscale --enable-libcdio --enable-x11grab --enable-libx264 --enable-libxvid --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
  libavutil     52.  3. 0 / 52.  3. 0
  libavcodec    54. 35. 1 / 54. 35. 1
  libavformat   54. 20. 4 / 54. 20. 4
  libavdevice   53.  2. 0 / 53.  2. 0
  libavfilter    3.  3. 0 /  3.  3. 0
  libavresample  1.  0. 1 /  1.  0. 1
  libswscale     2.  1. 1 /  2.  1. 1
[hls,applehttp @ 0xd263e0] max_analyze_duration reached
[hls,applehttp @ 0xd263e0] Estimating duration from bitrate, this may be inaccurate
Input #0, hls,applehttp, from 'http://cls.elitehd-audiovisuales.com/luztv/livestream/chunklist.m3u8':
  Duration: N/A, start: 4900.739000, bitrate: N/A
    Stream #0.0: Data: [21][0][0][0] / 0x0015
    Stream #0.1: Video: h264 (High), yuv420p, 576x480 [PAR 40:27 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 100 tbc
    Stream #0.2: Audio: aac, 48000 Hz, stereo, fltp
[mpegts @ 0xd65a80] muxrate VBR, pcr every 9000 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'pipe:':
  Metadata:
    encoder         : Lavf54.20.4
    Stream #0.0: Video: libx264, yuv420p, 576x480 [PAR 40:27 DAR 16:9], q=2-31, 90k tbn, 90k tbc
    Stream #0.1: Audio: aac, 48000 Hz, stereo
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
Press ctrl-c to stop encoding
...
<end of log>
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 1, 2017

avconv issue. Use ffmpeg.

@dstftw dstftw closed this Jun 1, 2017
@dstftw dstftw added external-bugs and removed cant-reproduce labels Jun 1, 2017
@Jiriss
Copy link
Author

@Jiriss Jiriss commented Jun 1, 2017

Thanks for tip but unfortunately the result is exactly same with parameters both --hls-prefer-ffmpeg and --prefer-ffmpeg or if I use them at same time.

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
2 participants
You can’t perform that action at this time.