bundle.youtube.media¶
Attributes¶
Classes¶
Functions¶
|
Quick MP4 sanity check: MP4 files contain an ftyp box near the beginning. |
|
Download an MP4 file from video_url to destination. |
|
Extract the MP4 file to an MP3 file. |
|
|
|
|
|
Module Contents¶
- bundle.youtube.media.log¶
- bundle.youtube.media.is_mp4_container(path: pathlib.Path) bool¶
Quick MP4 sanity check: MP4 files contain an ftyp box near the beginning.
- async bundle.youtube.media.download_mp4(youtube_track: bundle.youtube.track.YoutubeTrackData, destination_folder: pathlib.Path) MP4¶
Download an MP4 file from video_url to destination. This wraps your existing DownloaderTQDM logic.
- bundle.youtube.media.audio_target_path(youtube_track: bundle.youtube.track.YoutubeTrackData, destination_folder: pathlib.Path) pathlib.Path¶
- async bundle.youtube.media.download_audio(youtube_track: bundle.youtube.track.YoutubeTrackData, destination_folder: pathlib.Path) pathlib.Path¶
- async bundle.youtube.media.extract_mp3_from_path(source_path: pathlib.Path, track: bundle.youtube.track.TrackData, thumbnail: None | bytes = None) MP3¶
- class bundle.youtube.media.MP3(/, **data: Any)¶
Bases:
bundle.youtube.track.MP3TrackDataBase data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation.
- model_config¶
Default model configuration settings.
- classmethod from_track(path, track: bundle.youtube.track.TrackData)¶
- classmethod load(path: pathlib.Path) MP3 | None¶
- Async:
- class bundle.youtube.media.MP4(/, **data: Any)¶
Bases:
bundle.youtube.track.MP4TrackDataBase data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation.
- model_config¶
Default model configuration settings.
- classmethod from_track(path, track: bundle.youtube.track.TrackData)¶
- classmethod load(path: pathlib.Path) MP4 | None¶
- Async:
- classmethod download(youtube_track: bundle.youtube.track.YoutubeTrackData, destination_folder: pathlib.Path) MP4¶
- Async: