mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-14 05:57:23 +02:00
Refactor/ffmpeg less stream (#1092)
* remove ffmpeg from stream to use opus and vpx, add bunch of todos * fix testing * improve download checkout * fix datachannel download, fix super dirty test clients - setup logic does not belong there * fix testing
This commit is contained in:
+13
-12
@@ -14,16 +14,6 @@ from .assert_helper import get_test_example_file, get_test_examples_directory
|
||||
|
||||
@pytest.fixture(scope = 'module', autouse = True)
|
||||
def before_all() -> None:
|
||||
conditional_download(get_test_examples_directory(),
|
||||
[
|
||||
'https://github.com/facefusion/facefusion-assets/releases/download/examples-3.0.0/source.jpg',
|
||||
'https://github.com/facefusion/facefusion-assets/releases/download/examples-3.0.0/target-240p.mp4'
|
||||
])
|
||||
subprocess.run([ 'ffmpeg', '-i', get_test_example_file('target-240p.mp4'), '-vframes', '1', get_test_example_file('target-240p.jpg') ])
|
||||
|
||||
|
||||
@pytest.fixture(scope = 'module')
|
||||
def test_client() -> Iterator[TestClient]:
|
||||
program = ArgumentParser()
|
||||
capability_store.register_capability_set(
|
||||
[
|
||||
@@ -51,10 +41,15 @@ def test_client() -> Iterator[TestClient]:
|
||||
],
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
|
||||
state_manager.init_item('execution_providers', [ 'cpu' ])
|
||||
|
||||
with TestClient(create_api()) as test_client:
|
||||
yield test_client
|
||||
conditional_download(get_test_examples_directory(),
|
||||
[
|
||||
'https://github.com/facefusion/facefusion-assets/releases/download/examples-3.0.0/source.jpg',
|
||||
'https://github.com/facefusion/facefusion-assets/releases/download/examples-3.0.0/target-240p.mp4'
|
||||
])
|
||||
subprocess.run([ 'ffmpeg', '-i', get_test_example_file('target-240p.mp4'), '-vframes', '1', get_test_example_file('target-240p.jpg') ])
|
||||
|
||||
|
||||
@pytest.fixture(scope = 'function', autouse = True)
|
||||
@@ -63,6 +58,12 @@ def before_each() -> None:
|
||||
asset_store.clear()
|
||||
|
||||
|
||||
@pytest.fixture(scope = 'module')
|
||||
def test_client() -> Iterator[TestClient]:
|
||||
with TestClient(create_api()) as test_client:
|
||||
yield test_client
|
||||
|
||||
|
||||
def test_get_state(test_client : TestClient) -> None:
|
||||
get_state_response = test_client.get('/state')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user