Fix ffprobe handling for WebM and format families
This commit is contained in:
parent
0504013c5a
commit
05ac6ce20d
4 changed files with 500 additions and 169 deletions
|
|
@ -71,16 +71,22 @@ def test_rss_spider_rewrites_public_asset_urls_as_relative_paths() -> None:
|
|||
"https://example.com/media/podcast.mp3",
|
||||
) == (
|
||||
"audio/"
|
||||
f"{local_audio_path('https://example.com/media/podcast.mp3')}"
|
||||
"-vbr7-3b2b0f13.mp3"
|
||||
+ published_media_path(
|
||||
FileType.AUDIO,
|
||||
"https://example.com/media/podcast.mp3",
|
||||
repub_settings.REPUBLISHER_AUDIO[0],
|
||||
)
|
||||
)
|
||||
assert spider.rewrite_file_url(
|
||||
FileType.VIDEO,
|
||||
"https://example.com/media/clip.mp4",
|
||||
) == (
|
||||
"video/"
|
||||
f"{local_video_path('https://example.com/media/clip.mp4')}"
|
||||
"-720-457f0928.mp4"
|
||||
+ published_media_path(
|
||||
FileType.VIDEO,
|
||||
"https://example.com/media/clip.mp4",
|
||||
repub_settings.REPUBLISHER_VIDEO[0],
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -90,10 +96,10 @@ def test_published_media_path_changes_when_profile_args_change() -> None:
|
|||
base_profile = repub_settings.REPUBLISHER_VIDEO[0]
|
||||
|
||||
assert published_media_path(FileType.AUDIO, source_url, audio_profile) == (
|
||||
f"{local_audio_path(source_url)}-vbr7-3b2b0f13.mp3"
|
||||
f"{local_audio_path(source_url)}-mp3_vbr7_voice-1cc131cf.mp3"
|
||||
)
|
||||
assert published_media_path(FileType.VIDEO, source_url, base_profile) == (
|
||||
f"{local_video_path(source_url)}-720-457f0928.mp4"
|
||||
f"{local_video_path(source_url)}-main-4fb03ba0.mp4"
|
||||
)
|
||||
|
||||
changed_audio_profile = {**audio_profile, "max_bitrate": 128000}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue