Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] use "h264" instead of "libx264" for tests (fixes: #951) #962

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions tests/test_codec_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def image_sequence_encode(self, codec_name):
self.assertEqual(frame.format.name, pix_fmt)

def test_encoding_h264(self):
self.video_encoding("libx264", {"crf": "19"})
self.video_encoding("h264", {"crf": "19"})

def test_encoding_mpeg4(self):
self.video_encoding("mpeg4")
Expand Down Expand Up @@ -292,11 +292,7 @@ def video_encoding(self, codec_name, options={}, codec_tag=None):
packet_sizes.append(packet.size)
f.write(packet)

dec_codec_name = codec_name
if codec_name == "libx264":
dec_codec_name = "h264"

ctx = av.Codec(dec_codec_name, "r").create()
ctx = av.Codec(codec_name, "r").create()
ctx.open()

decoded_frame_count = 0
Expand Down
2 changes: 1 addition & 1 deletion tests/test_encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_encoding_with_pts(self):
path = self.sandboxed("video_with_pts.mov")

with av.open(path, "w") as output:
stream = output.add_stream("libx264", 24)
stream = output.add_stream("h264", 24)
self.assertIn(stream, output.streams.video)
stream.width = WIDTH
stream.height = HEIGHT
Expand Down
Loading