MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / test_cli_save_otio_no_audio

Function test_cli_save_otio_no_audio

tests/test_cli.py:1199–1326  ·  view source on GitHub ↗

Test `save-otio` command without audio.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

1197
1198
1199def test_cli_save_otio_no_audio(tmp_path: Path):
1200 """Test `save-otio` command without audio."""
1201 exit_code, _ = invoke_cli(
1202 [
1203 "-i",
1204 DEFAULT_VIDEO_PATH,
1205 "-o",
1206 str(tmp_path),
1207 "time",
1208 "-s",
1209 "2s",
1210 "-d",
1211 "4s",
1212 "detect-content",
1213 "save-otio",
1214 "--no-audio",
1215 ]
1216 )
1217 assert exit_code == 0
1218 output_path = tmp_path.joinpath(f"{DEFAULT_VIDEO_NAME}.otio")
1219 assert os.path.exists(output_path)
1220 EXPECTED_OTIO_OUTPUT = """{
1221 "OTIO_SCHEMA": "Timeline.1",
1222 "name": "goldeneye (PySceneDetect)",
1223 "global_start_time": {
1224 "OTIO_SCHEMA": "RationalTime.1",
1225 "rate": 23.976023976023978,
1226 "value": 0.0
1227 },
1228 "tracks": {
1229 "OTIO_SCHEMA": "Stack.1",
1230 "enabled": true,
1231 "children": [
1232 {
1233 "OTIO_SCHEMA": "Track.1",
1234 "name": "Video 1",
1235 "enabled": true,
1236 "children": [
1237 {
1238 "OTIO_SCHEMA": "Clip.2",
1239 "name": "goldeneye.mp4",
1240 "source_range": {
1241 "OTIO_SCHEMA": "TimeRange.1",
1242 "duration": {
1243 "OTIO_SCHEMA": "RationalTime.1",
1244 "rate": 23.976023976023978,
1245 "value": 42.0
1246 },
1247 "start_time": {
1248 "OTIO_SCHEMA": "RationalTime.1",
1249 "rate": 23.976023976023978,
1250 "value": 48.0
1251 }
1252 },
1253 "enabled": true,
1254 "media_references": {
1255 "DEFAULT_MEDIA": {
1256 "OTIO_SCHEMA": "ExternalReference.1",

Callers

nothing calls this directly

Calls 1

invoke_cliFunction · 0.90

Tested by

no test coverage detected