Skip to content

Commit

Permalink
Use new template function
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Jan 11, 2025
1 parent f659cfc commit d527571
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/basics/remux.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Make an output stream using the input as a template. This copies the stream
# setup from one to the other.
in_stream = input_.streams.video[0]
out_stream = output.add_stream(template=in_stream)
out_stream = output.add_stream_from_template(in_stream)

for packet in input_.demux(in_stream):
print(packet)
Expand Down
2 changes: 1 addition & 1 deletion examples/subtitles/remux.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
output = av.open("remuxed.vtt", "w")

in_stream = input_.streams.subtitles[0]
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

0 comments on commit d527571

Please sign in to comment.