Giter VIP home page Giter VIP logo

shouty's People

Contributors

edne avatar friendlyai avatar ondrejvicar avatar rstemmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

shouty's Issues

Playlist, connection, metadata, CPU usage.

Hello,

I'm wondering if I can handle my use case w/ this lib (w/ some glue code of course).

I'm looking for a lighter replacement for liquidsoap as it does too much and I only need to play a playlist + idv3 tags on each file holding metadata.

Questions:

  1. code tells me that a connection is meant to work w/ one single file
    a. open 1 connection per file when you have 100 files is still ok? (well, they get closed by ctx manager indeed, still... :))
    b. should I open only one connection and attach metadata on the fly on current connection?

  2. CPU usage. Judging from your experience (I know the lib is not that old): are they any issue I might encounter w/ one of the above options?

Thanks in advance!

Login fails when Flask app connects to IceCast server on the same VPS

I set up a VPS to host a Flask app with a web player streaming music from an IceCast stream. In the Flask app I connect to the IceCast server with:

import shouty

params = {
    'host': 'x.x.x.x',
    'port': 8000,
    'user': 'source',
    'password': 'hackme',
    'format': shouty.Format.MP3,
    'mount': '/stream'
}

def streamRadio():
    with shouty.connect(**params) as connection:
        with open('music.mp3', 'rb') as f:
            while True:
                chunk = f.read(4096)
                if not chunk:
                    break

                connection.send(chunk)
                connection.sync()

For host I use the IP address of the VPS and I have the IP for hostname in icecast.xml. For testing, I launch the Flask Dev Server and got to the VPS address x.x.x.x:5000. When the page loads with the web player, it tries to connect to the IceCast server using the streamRadio() function. This returns the error Error description: Login failed. I have tested running the Flask app on my computer and connecting to IceCast on the VPS and it worked. Is there something wrong with how I set up the parameter in the Flask app for the VPS?

Logging

Implement a logging system

Problem when using shouty in VPS

I was using shouty in local dev without any problems. When I move the flask app to a VPS, I am now getting the error RuntimeError: Library shout not found when I execute:

def streamRadio():
    with shouty.connect(**params) as connection:
        print(connection)
        with open('music.mp3', 'rb') as f:
            while True:
                chunk = f.read(4096)
                print(chunk)
                if not chunk:
                    break

                connection.send(chunk)
                connection.sync()

I'm confused whether this is a bug or a problem with my flask app.

Wrong format

Notify the user when he tries to stream a file with the wrong format

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.