Giter VIP home page Giter VIP logo

Comments (10)

np1 avatar np1 commented on September 3, 2024

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.

 avatar commented on September 3, 2024

I will add that sometimes selecting an item causes this error to occur. Despite the error, the stream does sometimes play.

from yewtube.

 avatar commented on September 3, 2024

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.

np1 avatar np1 commented on September 3, 2024

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.

 avatar commented on September 3, 2024

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.

np1 avatar np1 commented on September 3, 2024

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.

np1 avatar np1 commented on September 3, 2024

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.

 avatar commented on September 3, 2024

hm, I'm still getting the same error message/crash. Is there something else I should be doing?

from yewtube.

np1 avatar np1 commented on September 3, 2024

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.

 avatar commented on September 3, 2024

Yep, I had just manually copied pmsyt to /usr/local/bin. Thanks, it works splendidly.

from yewtube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.