Skip to content

sogaani/Amumu

Repository files navigation

Amumu

Chinachu と連携してエンコードの管理を行います。

GitHub issues Code Climate MIT License

DEMO

Contributing

質問やバグ報告は issue または twitter

Features

AmumuはChinachuにエンコードしたファイルの管理機能を追加するProxyServerと、エンコードを実行するEncoderで構成されます。 ProxyServerとEncoderでエンコードの結果を共有するためにMongooDBを利用します。

  • RecordedCommandやweb uiからのエンコード指示
  • エンコードしながらの再生
  • エンコードしたファイルのダウンロードと再生
  • ハードウェアエンコード

Requirements

ProxyServer

  • Node.js 8.1.x~
  • mongodb
  • ffmpeg 3.3~

Encoder

  • Node.js 8.1.x~
  • mongodb
  • ffmpeg 3.3~

Install

Download

git clone https://github.com/sogaani/Amumu.git

MongoDB(Linux)

Cloneしたディレクトリで下記のコマンドを実行してください。

  • MongoDB
./amumu installer
#mongodb: localディレクトリにmongodbをインストールします。
  • 実行
./amumu setup db #mongoをport10782で起動

Client

cd path/to/Chinachu
vim config.json
  • "recordedCommand"にAmumu直下にあるrecordedCommandのパスを設定してください。

Setup以外の方法でMongoDBを起動する場合はMongoDBのアドレスを設定してください。

cp client_config.sample.json client_config.json
vim client_config.json
  • "mongodbPath"に起動しているMongoDBのアドレスを設定してください。

ProxyServer(Linux)

Cloneしたディレクトリで下記のコマンドを実行してください。

  • Nodejs
./amumu installer
#Node.js Environment and Modules: localディレクトリにnodeをインストールします。

Note: Automongodb でインストールされるmongodbは64bitLinux用です。ARMの場合はこちらからインストールしてください。

./amumu setup db #mongoをport10782で起動
./amumu service proxy execute #ProxyServerの起動
./amumu service proxy initscript > amumu-proxy #initスクリプトの生成

ProxyServer(Windows)

npm run proxy

Configuration

cp proxy/proxy_config.sample.json proxy_config.json
vim proxy_config.json
  • proxy_config.json
name Type Default Required Description
amumuPath string yes
mongodbPath string yes
encoders array yes amumu encoderを起動しているホストのipアドレス
recording directory yes chinachuで録画中のファイルが置かれるフォルダ
encoded directory yes エンコード済みのファイルが置かれているパス
port number yes ProxyServerのポート

EncodeServer(Linux)

  • Nodejs

    git clone https://github.com/sogaani/Amumu.git
    cd Amumu
    ./amumu installer
    #Node.js Environment and Modules: localディレクトリにnodeをインストールします。
    

    Note: Proxyと同じPCで動作させる場合はこのステップを飛ばしてください。

  • ffmpeg

  • 実行

./amumu setup db #mongoをport10782で起動
./amumu service encoder execute #encoderの起動
./amumu service encoder initscript > amumu-encoder #initスクリプトの生成

EncodeServer(Windows)

npm run encoder

Configuration

cp encoder/encoder_config.sample.json encoder_config.json
vim encoder_config.json
  • encoder_config.json
name Type Default Required Description
chinachuPath string yes AmumuのProxyServerを立てていればProxyServerへのパスを設定
mongodbPath string yes
encoder encoder yes エンコードの設定
encoded directory yes エンコード済みのファイルを置くフォルダ
deleteEncodedFile boolean false no エンコード後にm2tsを削除
limit number 1 no 同時にエンコードできる数

  • directory

エンコードしたファイルを置くフォルダを設定します。

name Type Default Required Description
type string file no フォルダへのアクセス方法 smb(windows only),file
path string yes フォルダへのフルパス
authUser string no smbのユーザ(windows only)
authPass string no smbのパスワード(windows only)

  • encoder

エンコードのオプションが設定できます。

name Type Default Required Description
format string mp4 no エンコードしたファイルのフォーマット 現状はmp4のみ
hardware string no ハードウェアエンコード qsv,vaapi,nvenc
quality string yes エンコードの画質 high,medium,low
size number asis no エンコード後の動画サイズ。高さで指定
deinterlace boolean false no エンコード時にデインタレース

License

The MIT License (c) @sogaani

About

chinachuと連携してffmpegによるエンコードをおこなうサーバ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published