Can I stream to a media player *and* download simultaneously? #9786

Closed
opened 2026-02-21 05:13:35 -05:00 by deekerman · 7 comments
Owner

Originally created by @tezJR on GitHub (Feb 2, 2017).

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.02.01. 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.02.01

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


Description of your issue, suggested solution and other information

I want to use youtube-dl to stream to a media player and download simultaneously. I'm on Windows 7. I can do it, but so far only by calling two instances of youtube-dl, doubling the bandwidth and data used.

Originally created by @tezJR on GitHub (Feb 2, 2017). ## 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.02.01*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.01** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) 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) - [x] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- ### Description of your *issue*, suggested solution and other information I want to use youtube-dl to stream to a media player and download simultaneously. I'm on Windows 7. I can do it, but so far only by calling two instances of youtube-dl, doubling the bandwidth and data used.
Author
Owner

@yan12125 commented on GitHub (Feb 2, 2017):

On UNIX (Linux, Mac, etc.), tee can do that. Seems there's a correspondance on Windows

@yan12125 commented on GitHub (Feb 2, 2017): On UNIX (Linux, Mac, etc.), ```tee``` can do that. Seems [there's a correspondance on Windows](http://superuser.com/questions/74127/tee-for-windows)
Author
Owner

@tezJR commented on GitHub (Feb 2, 2017):

I've tried various permutations of
youtube-dl -f Mobile "http://twitch.tv/Brotatoe" | tee -o - "http://twitch.tv/Brotatoe" | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -
in Powershell (I don't know if that's correct), but it just sends me to a >> prompt, which gives another >> prompt no matter what I enter.

@tezJR commented on GitHub (Feb 2, 2017): I've tried various permutations of youtube-dl -f Mobile "http://twitch.tv/Brotatoe" | tee -o - "http://twitch.tv/Brotatoe" | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" - in Powershell (I don't know if that's correct), but it just sends me to a >> prompt, which gives another >> prompt no matter what I enter.
Author
Owner

@yan12125 commented on GitHub (Feb 2, 2017):

FYI, on Linux the syntax is:

youtube-dl -f Mobile "http://twitch.tv/Brotatoe" -o - | tee output.mp4 | vlc -
@yan12125 commented on GitHub (Feb 2, 2017): FYI, on Linux the syntax is: ``` youtube-dl -f Mobile "http://twitch.tv/Brotatoe" -o - | tee output.mp4 | vlc - ```
Author
Owner

@tezJR commented on GitHub (Feb 4, 2017):

From Powershell's suggestion "3,General" and "The term 'vlc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.", I changed that to .\youtube-dl -f Mobile "http://twitch.tv/Brotatoe" -o - | tee output.mp4 | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -
but I still get a >> prompt, but no download or stream that I can see.

(I'm new to both tee and Powershell.)

@tezJR commented on GitHub (Feb 4, 2017): From Powershell's suggestion "3,General" and "The term 'vlc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.", I changed that to .\youtube-dl -f Mobile "http://twitch.tv/Brotatoe" -o - | tee output.mp4 | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" - but I still get a >> prompt, but no download or stream that I can see. (I'm new to both tee and Powershell.)
Author
Owner

@yan12125 commented on GitHub (Feb 4, 2017):

I have little knowledge over PowerShell, either. And I don't use Windows. Maybe someone on IRC can help

@yan12125 commented on GitHub (Feb 4, 2017): I have little knowledge over PowerShell, either. And I don't use Windows. Maybe someone on IRC can help
Author
Owner

@tezJR commented on GitHub (Feb 5, 2017):

PowerShell IRC said PS's pipeline doesn't mix well with binary data, to stick with cmd but something like tee doesn't come stock. They don't know where to go from there though. Powershell's forum hasn't yet replied. I tried Unxutils from your link but it downloads a damaged archive.

I'll try sevenforums. Any other suggestions who I might ask?

@tezJR commented on GitHub (Feb 5, 2017): PowerShell IRC said PS's pipeline doesn't mix well with binary data, to stick with cmd but something like tee doesn't come stock. They don't know where to go from there though. Powershell's forum hasn't yet replied. I tried Unxutils from your link but it downloads a damaged archive. I'll try sevenforums. Any other suggestions who I might ask?
Author
Owner

@yan12125 commented on GitHub (Feb 5, 2017):

Maybe GNUWin32's coreutils is better than unxutils.

If none tee on Windows works, I guess the only option left is downloading the video to a file and open it after the download starts. For live streams, you may need --hls-use-mpegts so that you can watch the video before the download is complete.

Or stay away from Windows. Microsoft constantly ignores important bugs and brings headaches to users. Well just kidding :P

@yan12125 commented on GitHub (Feb 5, 2017): Maybe GNUWin32's coreutils is better than unxutils. If none ```tee``` on Windows works, I guess the only option left is downloading the video to a file and open it after the download starts. For live streams, you may need ```--hls-use-mpegts``` so that you can watch the video before the download is complete. Or stay away from Windows. Microsoft constantly ignores important bugs and brings headaches to users. Well just kidding :P
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#9786
No description provided.