LoginSignup
0
0

More than 5 years have passed since last update.

HLSストリームのスクリーンショットを撮る

Last updated at Posted at 2017-01-11

環境

Installation

  • livestreamerをインストール
pip install livestreamer
  • ffmpegをインストール

alpine linuxの場合

apk add --update ffmpeg

How to take a screenshot

LiveとVODのどちらでも可能

  • 1枚だけ撮る
livestreamer -l debug --yes-run-as-root --player "ffmpeg -i" --player-args "{filename} -vframes 1 snapshot.png" hlsvariant://serverIp/app/stream/playlist.m3u8 best
  • -yオプションで上書き
livestreamer -l debug --yes-run-as-root --player "ffmpeg -i" --player-args "{filename} -vframes 1 snapshot.png -y" hlsvariant://serverIp/app/stream/playlist.m3u8 best
  • 連続して撮る(1秒間隔で出力)
livestreamer -l debug --yes-run-as-root --player "ffmpeg -i" --player-args "{filename} -vf fps=1 out%04d.png" hlsvariant://serverIp/app/stream/playlist.m3u8 best
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0