acrcloud / live_stream_client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Live Stream Client Python (version 2.7.X)

Overview

ACRCloud provides services such as Music Recognition, Broadcast Monitoring, Custom Audio Recognition, Copyright Compliance & Data Deduplication, Live Channel Detection, and Offline Recognition etc.

Windows Runtime Library

If you run the SDK on Windows, you must install this library.
X86: download and install Library(windows/vcredist_x86.exe)
x64: download and install Library(windows/vcredist_x64.exe)

Preparations:

  1. Before using this tool, you must register on our platform and log into your dashboard.
  2. Sign up now for a free 14 day trial: http://console.acrcloud.com/signup
  3. Create a “Live Channel” bucket and add the url of your streams into it.
  4. Create a access token in the account settings and input this token to your client.conf file
  5. Input your Live Bucket Name to the client.conf file.
  6. Run the stream.py
  7. Create a “Live Channel Detection” project and attach the bucket which contains your chosen stream urls.
  8. Then you can use our SDK to detect the current stream.

Configure

client.conf

# -*- coding: utf-8 -*-
# You must replace "XXXXXX" with your console access token.
# Note: You can get it from the account setting
console_access_token = "XXXXXX"
bucket_id = YOUR_BUCKET_ID
#stream_ids = [""]
remote = 1
debug = 0

# If you do not set log_file, the log will be echo to console.
log_file = "acrcloud_stream.log"

# If you set restart_interval_seconds, the tool will restart every (restart_interval_seconds) seconds.
restart_interval_seconds = 0

#the tool will check whether the streams have been updated every check_update_interval_minute minutes
check_update_interval_minute = 60

Run The Tool

  1. start
   python stream.py 
   or
   nohup python stream.py &
  1. stop
   ps -ef | grep stream.py | grep -v grep | awk '{print $2}'| xargs kill -9

About


Languages

Language:Python 99.9%Language:Shell 0.1%