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

Add support for youtube live streams #391

Open
gornostal opened this issue Nov 24, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@gornostal
Copy link

commented Nov 24, 2017

This is a great project and I was going to use it for listening live stream music from youtube.
However I get error "Video not found" when entering live stream url (see below).
Is this expected?

$ tizonia --youtube-audio-stream "https://www.youtube.com/watch?v=461zegf_Gv4"
tizonia 0.10.0. Copyright (C) 2017 Juan A. Rubio
This software is part of the Tizonia project <http://tizonia.org>

[YouTube] (ValueError) : Video not found : https://www.youtube.com/watch?v=461zegf_Gv4
@gornostal

This comment has been minimized.

Copy link
Author

commented Nov 24, 2017

I looked further, turns out that video doesn't have WebM audio stream

>>> video.getbestaudio()
audio:m4a@128k

That's the only stream available I suppose. I wonder if it can be played...

@gornostal

This comment has been minimized.

Copy link
Author

commented Nov 24, 2017

Nope.

pacat@b453c5b39043:~$ tizonia --youtube-audio-stream "https://www.youtube.com/watch?v=461zegf_Gv4"                                                                                                                   
tizonia 0.10.0. Copyright (C) 2017 Juan A. Rubio
This software is part of the Tizonia project <http://tizonia.org>

[YouTube] [Stream] 'Summer Chill & Lounge Radio  24/7 Chillout Music Live Stream | Deep & Lounge House Music Mix' [m4a].
[YouTube] [Stream] 'Summer Chill & Lounge Radio  24/7 Chillout Music Live Stream | Deep & Lounge House Music Mix'.
[YouTube] [Streams in queue] '1'.
[YouTube] (KeyError) : 'content-length'
Segmentation fault (core dumped)

Any idea how to play m4a?

@gornostal

This comment has been minimized.

Copy link
Author

commented Nov 24, 2017

I think that keyerror is coming from pafy

@juanrubio

This comment has been minimized.

Copy link
Collaborator

commented Nov 24, 2017

Hi!,

Thanks for digging into this. Yes, if pafy supports live streams, then Tizonia will be able to support them as well.

The issue right now is that for YouTube, Tizonia currently only supports WebM audio streams. There is no mp4 demuxing implemented in the underlying OMX framework.

I've created an issue for that #392.

Once the mp4 demuxer is in place, YouTube m4a streams will be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.