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

feat: Use by default VP9 with mp4 #206

Merged
merged 1 commit into from
Nov 11, 2024
Merged
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
9 changes: 2 additions & 7 deletions streamer/bitrate_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,8 @@ def get_ffmpeg_codec_string(self, hwaccel_api: str) -> str:

def get_output_format(self) -> str:
"""Returns an FFmpeg output format suitable for this codec."""
# TODO: consider VP9 in mp4 by default
# TODO(#31): add support for configurable output format per-codec
if self == VideoCodec.VP9:
return 'webm'
elif self in {VideoCodec.H264, VideoCodec.HEVC}:
return 'mp4'
elif self == VideoCodec.AV1:
# TODO(#31): add support for configurable output format per-codec (mp4 or webm)
if self in {VideoCodec.H264, VideoCodec.VP9, VideoCodec.HEVC, VideoCodec.AV1}:
return 'mp4'
else:
assert False, 'No mapping for output format for codec {}'.format(
Expand Down
26 changes: 0 additions & 26 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,32 +845,6 @@ function codecTests(manifestUrl, format) {
codecList = codecList.map((x) => x.replace('hvc1', 'hev1'));
expect(codecList).toEqual(['hev1.1.6.L60.90']);
});

it('appropriately filters WebM formats ' + format, async () => {
const inputConfigDict = {
'inputs': [
{
'name': TEST_DIR + 'Sintel.2010.720p.Small.mkv',
'media_type': 'video',
// Keep this test short by only encoding 1s of content.
'end_time': '0:01',
},
],
};
const pipelineConfigDict = {
'streaming_mode': 'vod',
'resolutions': ['144p'],
'video_codecs': ['h264', 'vp9'],
};
await startStreamer(inputConfigDict, pipelineConfigDict);

let codecList = await getAudioAndVideoCodecs(manifestUrl);
if (manifestUrl == hlsManifestUrl) {
expect(codecList).not.toContain(jasmine.stringMatching('vp09.*'));
} else if (manifestUrl == dashManifestUrl) {
expect(codecList).toContain(jasmine.stringMatching('vp09.*'));
}
Comment on lines -868 to -872
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we removing this test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it is no longer necessary since we now always use mp4

})
}

function autoDetectionTests(manifestUrl) {
Expand Down
Loading