iperov / DeepFaceLab

DeepFaceLab is the leading software for creating deepfakes.
GNU General Public License v3.0
16.34k stars 25 forks source link

add batch video frame extract option #5690

Open mightbesimon opened 1 year ago

mightbesimon commented 1 year ago

Instead of frame extracting from one data_src.mp4, this PR adds a batch frame extract option that essentially treats every video in a batch_src folder as the data_src video.

Addtionally, users can add this bat script to the DFL_ROOT directory

@echo off
call _internal\setenv.bat

mkdir "%WORKSPACE%\data_src" 2>nul

"%PYTHON_EXECUTABLE%" "%DFL_ROOT%\main.py" videoed batch-extract-video ^
    --input-dir "%WORKSPACE%\batch_src" ^
    --output-dir "%WORKSPACE%\data_src"

pause

I'm not sure if this change is too much. I hope you like my idea. I think it'll help celeb faceset makers when they have a bunch of separate videos of a celebrity or politician.

phinix345 commented 1 year ago

main.py run: error: argument {DeepFaceLive}: invalid choice: 'deepfacelive' (choose from 'DeepFaceLive') please help

marshalleq commented 1 year ago

Totally love this idea. I have been trying to improve old family photos and using DFL as one item in my workflow. I often have a mix of different videos and pictures and it get's quite laboursome and confusing. This would solve that.