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

Continuous stream from ampache to stdout #10514

Closed
robsdedude opened this issue Aug 31, 2016 · 7 comments
Closed

Continuous stream from ampache to stdout #10514

robsdedude opened this issue Aug 31, 2016 · 7 comments
Labels

Comments

@robsdedude
Copy link

@robsdedude robsdedude commented Aug 31, 2016

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

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

My problem

I'm trying to open a stream (they call it channels) from my ampache server. If you do

curl https://music.example.org/channel/2/stream.mp3 | vlc -

This works great. But if I try to do it with youtube-dl like this

youtube-dl -v -o - "https://music.example.org/channel/2/stream.mp3" | vlc -

VLC opens but doesn't play the stream. The generic stream handler seems not to be able to open a simple stream. You can find the Output of -v below. Nothing else comes after that output. youtube-dl just gets stuck.

Now the most simple solution would be just to use curl. But it would be great if I could just use one program for all kind of input.


Output of -v

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 -o - "https://music.example.org/channel/2/stream.mp3"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'-o', u'-', u'https://music.example.org/channel/2/stream.mp3']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.08.31
[debug] Python version 2.7.6 - Linux-3.13.0-37-generic-x86_64-with-LinuxMint-17.1-rebecca
[debug] exe versions: ffmpeg N-79299-g15fa017, ffprobe N-79299-g15fa017
[debug] Proxy map: {}
[generic] stream: Requesting header
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 31, 2016

Both does not work for me:

HTTP request sent, awaiting response... 502 Bad Gateway

@robsdedude
Copy link
Author

@robsdedude robsdedude commented Aug 31, 2016

Yeah... That's because I had turned off the channel. And I replaced my domain with example.org (just forgot one instance) so it wasn't to expect that the stream works. I did this because I do not have permissions to stream that music in public. Here is a test stream, that streams one song (under cc license) in a loop:

https://music.xia.de/channel/3/stream.mp3

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 3, 2016

That is because your webserver simply does not respond to HEAD requests. Fix your server or use smaller timeout with --socket-timeout.

@robsdedude
Copy link
Author

@robsdedude robsdedude commented Oct 8, 2016

I thought about it again. Why isn't socket timeout a default value? I mean why would you want your program to get stuck just because a server isn't reacting properly?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 9, 2016

@roba91 FYI: There's an option --socket-timeout, whose default is 600 seconds.

@robsdedude
Copy link
Author

@robsdedude robsdedude commented Oct 9, 2016

I knew about that option. However, I didn't know it has a default value. But is waiting for 10 minutes a reasonable default? I mean if the server can't make it to send back a response within the first , I don't know, about 10 seconds or so it will probably it will most probably don't send back a response at all.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 9, 2016

The value was changed from 20 seconds to 10 minutes as the original value was too short for some people (#1862). And in my experience some Chinese websites give no response within a minute, thanks to the Great FireWall. If you're sure your network is quite stable, you can put your favorite value in configuration files.

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