Skip to content

Commit

Permalink
Use PyAV rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Nov 19, 2024
1 parent 1e75da8 commit a196399
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions auto_editor/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ def make_media(tl: v3, output_path: str) -> None:
for i, sub_path in enumerate(sub_paths):
subtitle_input = av.open(sub_path)
subtitle_inputs.append(subtitle_input)
subtitle_stream = output.add_stream(
template=subtitle_input.streams.subtitles[0]
subtitle_stream = output.add_stream_from_template(
subtitle_input.streams.subtitles[0]
)
if i < len(src.subtitles) and src.subtitles[i].lang is not None:
subtitle_stream.metadata["language"] = src.subtitles[i].lang # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion auto_editor/render/subtitle.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _ensure(input_: Input, format: str, stream: int) -> str:
output = av.open(output_bytes, "w", format=format)

in_stream = input_.streams.subtitles[stream]
out_stream = output.add_stream(template=in_stream)
out_stream = output.add_stream_from_template(in_stream)

for packet in input_.demux(in_stream):
if packet.dts is None:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ license = { text = "Unlicense" }
authors = [{ name = "WyattBlue", email = "[email protected]" }]
requires-python = ">=3.10,<3.14"
dependencies = [
"numpy>=1.23.0,<3.0",
"pyav==13.1.*",
"numpy>=1.24,<3.0",
"pyav==14.0.0rc2",
]
keywords = [
"video", "audio", "media", "editor", "editing",
Expand Down

0 comments on commit a196399

Please sign in to comment.