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

Linux segfault while taking snapshot from youtube #229

Open
nagayev opened this issue Oct 30, 2022 · 1 comment
Open

Linux segfault while taking snapshot from youtube #229

nagayev opened this issue Oct 30, 2022 · 1 comment

Comments

@nagayev
Copy link

nagayev commented Oct 30, 2022

try:
    import vlc
except:
    print('Error')
    print('Please install python-vlc')
    exit(1)
import time
import numpy as np
from ctypes import *

 
class MyDisplay(vlc.VideoDisplayCb):
    def __doc__(o,p):
        print("fsdfs")
 
if __name__ == '__main__':
    url = 'https://www.youtube.com/watch?v=T8r_Gc6Pg6o&t=3227s'
    #url = 'https://www.youtube.com/watch?v=K6orZrwys1k'
    i = vlc.Instance('--no-audio', '-q')
    media = i.media_new(url)
    media_list = i.media_list_new([url])
    print(media_list)
    p = i.media_player_new()
    p.set_media(media)
    lp = i.media_list_player_new()
    lp.set_media_player(p)
    lp.set_media_list(media_list)
    p.play()
 
    time.sleep(5)
    r = p.video_take_snapshot(0,'/home/marat/Music/rnd.jpg',0,0) 

Console ouput:

libva info: VA-API version 1.16.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_15 libva info: va_openDriver() returns 0 libva info: VA-API version 1.16.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_15 libva info: va_openDriver() returns 0 libva info: VA-API version 1.16.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_15 libva info: va_openDriver() returns 0 libva info: VA-API version 1.16.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_15 libva info: va_openDriver() returns 0 Segfault (core dumped)
@oaubert
Copy link
Owner

oaubert commented Oct 30, 2022

This is not a python-vlc issue, rather a vaapi/libva issue. If you search for "libva info: va_openDriver() returns 0 Segfault (core dumped) " you will find other software having the same issue, with solutions ranging from uninstalling libva to exporting a variable (in OpenKinect/libfreenect2#1159 ). If you manage to find the appropriate remedy for you, please post it in this issue so that other people can benefit from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants