ACRCloud provides services such as Music Recognition, Broadcast Monitoring, Custom Audio Recognition, Copyright Compliance & Data Deduplication, Live Channel Detection, and Offline Recognition etc.
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)
- Before using this tool, you must register on our platform and log into your dashboard.
- Sign up now for a free 14 day trial: http://console.acrcloud.com/signup
- Create a “Live Channel” bucket and add the url of your streams into it.
- Create a access token in the account settings and input this token to your client.conf file
- Input your Live Bucket Name to the client.conf file.
- Run the stream.py
- Create a “Live Channel Detection” project and attach the bucket which contains your chosen stream urls.
- Then you can use our SDK to detect the current stream.
# -*- 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
- start
python stream.py
or
nohup python stream.py &
- stop
ps -ef | grep stream.py | grep -v grep | awk '{print $2}'| xargs kill -9