Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Frame Extractor

ffmpeg を使って動画からフレーム画像を切り出すための Python ツールです。

使い方

Extractor GUI

python extractor_gui.py

1. ffmpeg をインストールする

PowerShell を開き、次を実行します。

winget install ffmpeg

すでに ffmpeg が入っている場合は、この手順は不要です。

2. 動画ファイルを用意する

切り出したい動画ファイルをこのフォルダに置きます。

3. スクリプトを実行する

次のように実行します。

python extractor.py movie.mov ./output --fps 20

この例では、movie.mov を元にして、1 秒あたり 20 枚の画像を出力します。 出力先は ./output です。

実行例

python extractor.py input.mp4 ./output --fps 15 --start 5 --end 10
  • --fps : 1 秒あたりの出力枚数 (例: 20 = 50ms間隔)
  • --start : 開始秒
  • --end : 終了秒
  • --quality, -q : JPEG 品質(1〜31、デフォルト: 2)
  • --prefix : 出力ファイル名の接頭辞
  • --width, -W : リサイズ後の幅(px)
  • --height, -H : リサイズ後の高さ(px)

実行オプション

-h, --help            ヘルプを表示
--fps FPS             フレームレート (例: 20 = 50ms間隔)
--start START         開始秒
--end END             終了秒
--quality, -q QUALITY JPEG品質 1(最高)~31(最低) [デフォルト: 2]
--prefix PREFIX       ファイル名プレフィックス
--width, -W WIDTH     リサイズ幅 (px)
--height, -H HEIGHT   リサイズ高さ (px)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages