项目作者: surenkid

项目描述 :
用于转换mp4视频文件为hls分片格式的docker镜像
高级语言: HTML
项目地址: git://github.com/surenkid/docker-ffmpeg-hls.git
创建时间: 2017-06-06T12:07:33Z
项目社区:https://github.com/surenkid/docker-ffmpeg-hls

开源协议:MIT License

下载


This docker image is created for converting mp4 video files (.mp4) to HLS format (.ts) files. When running, it will auto convert and generate a playlist file (platflist.m3u8) and a html video player (index.html), so that it can be played online.

The HLS format is CDN-friendly, and can be used to build large video projects for personal use.

Usage

First, go to the folder that the mp4 video is located on, and run docker container to convert the video. When the conversion is complete, docker container will be automatically be deleted.

Running under Linux or Mac:

  1. docker run -it --rm \
  2. -e FTP_SERVER=你的FTP服务器 \
  3. -e FTP_USER=你的FTP用户名 \
  4. -e FTP_PASSWORD=你的FTP密码 \
  5. -e FTP_UPLOAD_DIR=FTP上传目录 \
  6. -e FTP_UPLOAD_PARALLEL=FTP连接线程数 \
  7. -e VIDEO_SEGMENT_TIME=视频分片时间长度 \
  8. -v $(pwd):/root/input surenkid/ffmpeg-hls

Running under Windows

  1. docker run -it --rm ^
  2. -e FTP_SERVER=你的FTP服务器 ^
  3. -e FTP_USER=你的FTP用户名 ^
  4. -e FTP_PASSWORD=你的FTP密码 ^
  5. -e FTP_UPLOAD_DIR=FTP上传目录 ^
  6. -e FTP_UPLOAD_PARALLEL=FTP连接线程数 ^
  7. -e VIDEO_SEGMENT_TIME=视频分片时间长度 ^
  8. -v %cd%:/root/input surenkid/ffmpeg-hls