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

youtube playlist with stdout to mplayer/vlc have problem #640

Closed
o3814080 opened this issue Jan 18, 2013 · 1 comment
Closed

youtube playlist with stdout to mplayer/vlc have problem #640

o3814080 opened this issue Jan 18, 2013 · 1 comment

Comments

@o3814080
Copy link

Kindly check if this error ...

youtube-dl -o - http://www.youtube.com/playlist?list=PL5EE8395B07222473 | mplayer - 

MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team

Playing -.
Reading from stdin...
[youtube] PL 5EE8395B07222473: Downloading page #1
[youtube] PL 5EE8395B07222473: Found 40 videos
[youtube] Setting language
[youtube] YR1ujXx2p-I: Downloading video webpage
[youtube] YR1ujXx2p-I: Downloading video info webpage
[youtube] YR1ujXx2p-I: Extracting video information
[download] Destination: -
[download]   0.2% of 8.22M at    4.24M/s ETA 00:01Detected file format: FLV format (libavformat)
[download]   0.7% of 8.22M at    7.35M/s ETA 00:01[flv @ 0x7fa616dcc920]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO:  [H264]  320x240  0bpp  29.970 fps  252.1 kbps (30.8 kbyte/s)
Clip info:
 starttime: 0
 totalduration: 186
 totaldatarate: 369
 bytelength: 8617702
 canseekontime: true
 sourcedata: B768F5805HH1358507497049170
 purl: 
 pmsg: 
Load subtitles in .
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Asking decoder to use 8 threads if supported.
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 118.0 kbit/8.36% (ratio: 14748->176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
A:   0.0 V:   0.0 A-V:  0.000 ct:  0.000   0/  0 ??% ??% ??,?% 0 0 
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [vdpau] 320x240 => 320x240 Planar YV12 
[vdpau] Got display refresh rate 59.960 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption manually.
[download]   1.5% of 8.22M at   69.65k/s ETA 01:59A:   1.7 V:   1.7 A-V:  0.001 [download]   3.0% of 8.22M at   58.96k/s ETA 02:18A:   4.2 V:   4.2 A-V: -0.000 [download]   6.1% of 8.22M at   51.81k/s ETA 02:32A:   9.7 V:   9.7 A-V:  0.000 A:  19.2 V:  19.3 A-V:  0.000 ct: -0.000   0/  0  0%  0%  0.2% 0 0 
...
...
...
[download]  48.7% of 8.22M at   43.25k/s ETA 01:39A:  93.2 V:  93.3 A-V:  0.000 [download]  60.8% of 8.22M at   42.56k/s ETA 01:17A: 118.8 V: 118.9 A-V: -0.000 [download]  85.2% of 8.22M at   44.68k/s ETA 00:27A: 158.9 V: 159.0 A-V:  0.000 [download] 100.0% of 8.22M at   45.43k/s ETA 00:000%  0%  1.1% 8 0 
[youtube] pAkN3nRht7Y: Downloading video webpage
[youtube] pAkN3nRht7Y: Downloading video info webpage 0%  1.1% 8 0 
[youtube] pAkN3nRht7Y: Extracting video information%  0%  1.1% 8 0 
[download] Destination: -.000 ct:  0.000   0/  0  0%  0%  1.1% 8 0 
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 17, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 486, in main

  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 470, in _real_main

  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 501, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 91, in extract
  File "/usr/local/bin/youtube-dl/youtube_dl/InfoExtractors.py", line 1683, in _real_extract
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 519, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 462, in process_info
  File "/usr/local/bin/youtube-dl/youtube_dl/FileDownloader.py", line 706, in _do_download
ValueError: I/O operation on closed file
A: 185.8 V: 185.8 A-V: -0.000 ct: -0.000   0/  0  0%  0%  1.1% 8 0 

Audio output truncated at end.

Thank you very much !

@phihag
Copy link
Contributor

phihag commented Jan 18, 2013

Media players cannot generally open multiple files in a single stream. Quite justly, they go for the simple approach and only read one file from stdin. When they're finished, they're closing the socket - that's why youtube-dl raises ValueError: I/O operation on closed file.

See #628 for an API that would allow playing videos while downloading them. I'm currently working on that and expect it to be finished in a week or so. For now, I'm sorry, but I don't know of any player-independent way to play multiple video files from one stream. Feel free to comment or suggest code though.

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

No branches or pull requests

2 participants