<commit_before># Dedenne

This project is to try `streamio-ffmpeg` out. This will transcode video to be hls format and upload to Amazon S3 bucket.

## Installation

Clone this repository and run

    $ bundle install

You need to export `AWS_S3_ACCESS_KEY_ID` and `AWS_S3_SECRET_ACCESS_KEY` if you need to upload to Amazon S3.

## Usage

You can transcode video from local terminal with this command

    $ bundle exec bin/dedenne <video_id> <chapter_id> <video_version>

You can also call via API url with `http://localhost:4567/transcode/course/:course_id/chapter/:chapter_id?version={:video_version}` if you have already video on S3 bucket.

## Docker stuff

    $ cd redis/
    $ docker build -t foo/redis .
    $ docker run --name redis -p 6379:6379 -d foo/redis
    $ cd ..
    $ docker build -t dedenne .
    $ docker run -d -t -p 4567:4567 -e SKL_HOST=<SKL_NAME> -e AWS_S3_ACCESS_KEY_ID=<AWS_KEY> -e AWS_S3_SECRET_ACCESS_KEY=<AWS_SECRET_KEY> -e AWS_S3_UPLOADS_BUCKET=<AWS_S3_UPLOADS_BUCKET> -e AWS_S3_VIDEO_TRANSCODED_BUCKET=<AWS_S3_VIDEO_TRANSCODED_BUCKET> --name dedenne_local --link redis:redis dedenne

A bit more easier with `docker-compose`
`export` AWS bucket access rights at terminal (`AWS_S3_ACCESS_KEY_ID`, `AWS_S3_SECRET_ACCESS_KEY`)

    $ docker-compose pull
    $ docker-compose build
    $ docker-compose up -d
<commit_msg>Fix README<commit_after># Dedenne

This project is to try `streamio-ffmpeg` out. This will transcode video to be hls format and upload to Amazon S3 bucket.

## Installation

Clone this repository and run

    $ bundle install

You need to export `AWS_S3_ACCESS_KEY_ID` and `AWS_S3_SECRET_ACCESS_KEY` if you need to upload to Amazon S3.

## Usage

You can transcode video from local terminal with this command

    $ bundle exec bin/dedenne <video_id> <chapter_id> <video_version>

You can also call via API url with `http://localhost:4567/transcode/course/:course_id/chapter/:chapter_id?version={:video_version}` if you have already video on S3 bucket.

## Docker stuff

    $ cd redis/
    $ docker build -t foo/redis .
    $ docker run --name redis -p 6379:6379 -d foo/redis
    $ cd ..
    $ docker build -t dedenne .
    $ docker run -d -t -p 4567:4567 -e SKL_HOST=<SKL_NAME> -e AWS_S3_ACCESS_KEY_ID=<AWS_KEY> -e AWS_S3_SECRET_ACCESS_KEY=<AWS_SECRET_KEY> -e AWS_S3_UPLOADS_BUCKET=<AWS_S3_UPLOADS_BUCKET> -e AWS_S3_VIDEO_TRANSCODED_BUCKET=<AWS_S3_VIDEO_TRANSCODED_BUCKET> --name dedenne_local --link redis:redis dedenne

A bit more easier with `docker-compose`

`export` AWS bucket access rights at terminal (`AWS_S3_ACCESS_KEY_ID`, `AWS_S3_SECRET_ACCESS_KEY`)

    $ docker-compose pull
    $ docker-compose build
    $ docker-compose up -d

{'fraction_non_alphanumeric': 0.0861812778603269, 'fraction_numerical': 0.02451708766716196, 'mean_word_length': 4.12952380952381, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2154848', 'n_tokens_mistral': 1038, 'n_tokens_neox': 1003, 'n_words': 289}