Comments (10)
Hi, I am not able to reproduce this error. When I search for brian eno short
I get a set of results as normal. I have tried with both set search_music true
and set search_music false
.
It looks like the error is due to an audio stream not being available for a particular item. I will update the program to cater for this.
from yewtube.
I will add that sometimes selecting an item causes this error to occur. Despite the error, the stream does sometimes play.
from yewtube.
I no longer experience this with searching for 'brian eno' and using recent builds.
However, if one were to search for 'https://youtube.com/watch?v=DCpnKA7L8t8' and play the result perhaps it would trigger the bug. (forgive the terrible quality of the result, I tried to find a different one but haven't been successful.)
Looking at the formats of that video, there are many quality options available - a pretty standard video. So why it would return as an empty list is indeed odd.
from yewtube.
Some videos on youtube don't have audio streams available for download. That is one of them. I need to update the getbestaudio() function of the pafy.Stream class to handle this case, or catch the exception in pmsyt (or both).
$ ytdl DCpnKA7L8t8
Stream Type Format Quality Size
------ ---- ------ ------- ----
1 normal webm [640x360] 1 MB
2 normal mp4 [640x360] 1 MB
3 normal flv [320x240] 1 MB
4 normal 3gp [320x240] 0 MB
5 normal 3gp [176x144] 0 MB
youtube-dl --list-formats DCpnKA7L8t8
[youtube] Setting language
[youtube] DCpnKA7L8t8: Downloading webpage
[youtube] DCpnKA7L8t8: Downloading video info webpage
[youtube] DCpnKA7L8t8: Extracting video information
[info] Available formats for DCpnKA7L8t8:
format code extension resolution note
17 3gp 176x144 (worst)
36 3gp 320x240
5 flv 400x240
43 webm 640x360
18 mp4 640x360 (best)
from yewtube.
oh, right! duh, it has lots of video options.
Would it be in the scope of the project to use video's audio stream if there exists no audio stream? In this case, it would use the webm/mp4 stream and just play it without video.
from yewtube.
Yes that would be a good way to handle it, using the mplayer -novideo flag (and its mpv equivalent). I will write a fix to do that.
from yewtube.
This is working for me now, tested with the video linked above. It falls back to using the audio in the video stream, suppressing video output when no audio is available.
from yewtube.
hm, I'm still getting the same error message/crash. Is there something else I should be doing?
from yewtube.
I should have said the changes I made were also in pafy so if you didn't do a pip upgrade, you'll need to make sure you have pafy 0.3.34
from yewtube.
Yep, I had just manually copied pmsyt to /usr/local/bin. Thanks, it works splendidly.
from yewtube.
Related Issues (20)
- howto download an audio without the menu ? HOT 1
- regression with the latest version ? ( or issue on the method to update? ) HOT 1
- videos not showing up when using `-w` flag
- Your input can't be opened HOT 1
- Support py3.12 HOT 1
- 'NoneType' object has no attribute 'add_cmd'
- Yewtube v2.10.4 suggests upgrading to v2.9.2 HOT 3
- A way to queue/shuffle the entire playlist rather than just the visible entries HOT 1
- Feature Request: Spotify Playlist
- yt command doesn't work HOT 3
- Is it possible to use ffmpeg instead for video playback? HOT 3
- Issue with loading mpv config files HOT 2
- Error when starting the script HOT 2
- [Feature Request] Display current chapter
- how to JUST PLAY AUDIO please guide without missing any step :-)) HOT 3
- Truncation makes columns unreadable HOT 1
- `Invalid continuation byte` error when try to start with `yt` command
- Corrupted cache data HOT 1
- I didn't understand how to use it set download_command aria2c --dir=%d --out=%f %u
- "FIleExistsError: [Errno 17] File exists" when installing through homebrew HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yewtube.