Files
Media-Coding-Web/README.md
2026-04-04 13:02:50 +08:00

1.6 KiB

Media Coding Web - Configuration & Run Guide

To properly test and run this project, you will need to prepare your environment:

  1. Install Node.js & FFmpeg:

    • Ensure Node.js (v18+) is installed.
    • Install FFmpeg on your system and make sure it is available in your PATH environment variable. The Node.js library fluent-ffmpeg requires it.
    • Note: The platform supports Intel QSV, Nvidia NVENC, and VAAPI hardware encoders. Ensure your FFmpeg build includes support for h264_qsv / hevc_qsv / h264_nvenc / hevc_nvenc / h264_vaapi / hevc_vaapi if you wish to use them.
    • The service always uses Jellyfin FFmpeg by default: /usr/lib/jellyfin-ffmpeg/ffmpeg and /usr/lib/jellyfin-ffmpeg/ffprobe. You can override them with JELLYFIN_FFMPEG_PATH and JELLYFIN_FFPROBE_PATH.
  2. AWS S3 / MinIO Configuration:

    • Modify the .env file (copy from .env.example).
    • Add your AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, and S3_BUCKET_NAME.
    • If using MinIO, ensure you set the S3_ENDPOINT (e.g., http://127.0.0.1:9000) and set S3_FORCE_PATH_STYLE=true.
    • Ensure your bucket has .mp4 video files.
  3. Install Dependencies & Start:

    npm install
    npm start
    
  4. Test Delivery:

    • Open your browser to http://localhost:3000.
    • The application should display available .mp4 items from your S3 bucket.
    • Click one video, and the Node server will begin to read the S3 stream and pipe it to FFmpeg, transcoding it into HLS segments inside the /public/hls/ directory.
    • The frontend polls via /api/status, and once the index playlist is available, HLS playback starts!