PyAV-Org / PyAV

Pythonic bindings for FFmpeg's libraries.
https://pyav.basswood-io.com/
BSD 3-Clause "New" or "Revised" License
2.52k stars 365 forks source link

The av.open does not work with YouTube's m3u8 on Linux and works on macOS #809

Closed MarshalX closed 3 years ago

MarshalX commented 3 years ago

Overview

The av.open does not work with YouTube's m3u8 on Linux and works on macOS

Expected behavior

Don't crash and print input container

Actual behavior

Crashed from cpp part without extra info like traceback. Only one message.

Traceback:

Illegal instruction (core dumped)

Investigation

I can't bypass this problem on Linux

Reproduction

Run this code under Linux

# pip install pafy
# pip install av

import av
import pafy

VIDEO_URL = 'https://www.youtube.com/watch?v=7tNtU5XFwrU'   # its music live stream

video = pafy.new(VIDEO_URL)
video_source = video.getbest().url

print(av.open(video_source))

Versions

Research

I have done the following:

MarshalX commented 3 years ago

I didnt debug it with gdb, but there is temp solution. Dont use bullt wheels.

pip3 uninstall av + pip3 install av --no-binary av

Also you need to install some 3rd party packages into your system: https://pyav.org/docs/stable/overview/installation.html

buddhhu commented 3 years ago

I didnt debug it with gdb, but there is temp solution. Dont use bullt wheels.

pip3 uninstall av + pip3 install av --no-binary av

Ok it works with this and by installing some extra dependencies 👍

MarshalX commented 3 years ago

But the issue still exists with your wheels on pypi