awslabs / aws-streamer

Video Processing for AWS
Apache License 2.0
44 stars 9 forks source link

Exception on get_python_plugins_list #12

Closed piertoni closed 2 years ago

piertoni commented 2 years ago

On a linux machine with greengrass installed, I am trying to stream a local playlist.m3u8 to aws cloud.

The equivalent with gst-launch would be: gst-launch-1.0 souphttpsrc location=http://localhost:5000/playlist.m3u8 ! hlsdemux ! tsdemux ! video/x-h264 ! h264parse ! kvssink stream-name="kvs_test_camera" storage-size=128

I have an exception trying to launch the pipeline:

client.start(
    {
        "pipeline": {
            "source": "souphttpsrc",
            "hlsdemux": "hlsdemux",
            "tsdemux": "tsdemux",
            "video": "video/x-h264",
            "h264parse": "h264parse",
            "sink": "kvssink",
        },
        "source": {
            "location": f"http://localhost:5000/playlist.m3u8",
        },
        "hlsdemux": {},
        "tsdemux": {},
        "video": {},
        "h264parse": {},
        "sink": {
            "stream-name": "TestStream",
            "storage_size": 128,
        },
    }
)

The exception is the following:

Traceback (most recent call last):
  File "stream_aws.py", line 39, in <module>
    client.start(
  File "/home/ggc_user/.local/lib/python3.8/site-packages/awstreamer-0.1.0-py3.8-linux-x86_64.egg/awstreamer/gst_pipeline/stream_client.py", line 196, in start
    pipeline = self.add(config_or_filename)
  File "/home/ggc_user/.local/lib/python3.8/site-packages/awstreamer-0.1.0-py3.8-linux-x86_64.egg/awstreamer/gst_pipeline/stream_client.py", line 161, in add
    pipeline = PipelineFactory.createPipeline(pipeline_config)
  File "/home/ggc_user/.local/lib/python3.8/site-packages/awstreamer-0.1.0-py3.8-linux-x86_64.egg/awstreamer/gst_pipeline/pipeline_factory.py", line 47, in createPipeline
    return class_(config) or None
  File "/home/ggc_user/.local/lib/python3.8/site-packages/awstreamer-0.1.0-py3.8-linux-x86_64.egg/awstreamer/gst_pipeline/stream_pipeline.py", line 49, in __init__
    self.build(self.config)
  File "/home/ggc_user/.local/lib/python3.8/site-packages/awstreamer-0.1.0-py3.8-linux-x86_64.egg/awstreamer/gst_pipeline/stream_pipeline.py", line 67, in build
    plugins_requiring_parse_launch = get_python_plugins_list()
  File "/home/ggc_user/.local/lib/python3.8/site-packages/awstreamer-0.1.0-py3.8-linux-x86_64.egg/awstreamer/utils/plugin.py", line 15, in get_python_plugins_list
    for f in os.listdir(python_plugins_dir):
NotADirectoryError: [Errno 20] Not a directory: '/home/ggc_user/.local/lib/python3.8/site-packages/awstreamer-0.1.0-py3.8-linux-x86_64.egg/awstreamer/gst_plugins/python'
bpawlik commented 2 years ago

It seems that package build and/or installation failed on your system. Did you see any errors during build or installation?

piertoni commented 2 years ago

fixed reinstalling with a virtualenv and doing the following:

python3 -m venv myenv
source myenv/bin/activate
git clone https://github.com/awslabs/aws-streamer.git
cd aws-streamer
pip install --upgrade wheel pip setuptools
pip install --upgrade --requirement requirements.txt
./build.sh -DBUILD_KVS=ON
pip install -v .