MCPcopy Create free account

hub / github.com/boul2gom/yt-dlp / functions

Functions2,260 in github.com/boul2gom/yt-dlp

↓ 218 callersMethodlen
(&self)
tests/common/media_seek.rs:17
↓ 184 callersMethodpath
Returns a reference to the temporary file path.
src/utils/fs.rs:533
↓ 166 callersMethodclone
(&self)
src/events/delivery/hooks.rs:246
↓ 137 callersMethodclone
(&self)
src/lib.rs:920
↓ 84 callersFunctionparse
Parses the container index for a stream and returns a [`ContainerIndex`]. Detects the container format from the magic bytes in `probe`, then dispatch
crates/media-seek/src/lib.rs:87
↓ 81 callersMethodbuild
Build the Downloader instance. This method is async because it may need to create cache directories and initialize the download manager. # Returns
src/client/builder.rs:317
↓ 78 callersMethodas_ref
(&self)
src/utils/fs.rs:544
↓ 73 callersFunctionbuild_e2e_downloader
Builds a test Downloader with fake binary paths, having its output directed to `output_dir`. The binary paths are non-existent placeholders — operati
tests/e2e/helpers.rs:14
↓ 73 callersFunctiontemp_test_dir
Creates a temporary directory for test output files.
tests/common/fixtures.rs:117
↓ 70 callersFunctionsetup_e2e_server
Sets up a fully-stocked mock server that serves media at /media/<name>, thumbnails, storyboards, and HLS playlists. Returns the `MockServer` instance
tests/e2e/helpers.rs:22
↓ 57 callersFunctionload_media_bytes
Loads the raw bytes of a media fixture.
tests/common/fixtures.rs:112
↓ 52 callersMethodget
Retrieves a video from the cache by its URL. # Arguments `url` - The URL of the video to retrieve. # Returns `Some(Video)` if found and not expire
src/cache/stores/video.rs:260
↓ 48 callersMethodis_empty
Checks if the heatmap is empty. # Returns True if the heatmap is empty, false otherwise
src/model/types/heatmap.rs:88
↓ 46 callersMethodput
Puts a video in the cache (both layers). # Arguments `url` - The URL of the video. `video` - The video metadata to cache. # Errors Returns an erro
src/cache/stores/video.rs:295
↓ 45 callersFunctionmake_test_video
(formats: Vec<Format>)
tests/unit/selection.rs:130
↓ 43 callersMethodfind_byte_range
Finds the content byte range that covers `[start_secs, end_secs]`. For segmented formats the range is expanded to the nearest segment boundaries so t
crates/media-seek/src/index.rs:90
↓ 42 callersMethodfilter
Returns the filter. # Returns A reference to the configured event filter.
src/events/delivery/webhooks.rs:237
↓ 41 callersMethodas_str
Returns the lowercase file extension string for this variant. Unknown/None variants return `"bin"` as a safe fallback. # Returns A static string sli
src/model/format.rs:479
↓ 35 callersMethodenqueue
Add a download to the queue # Arguments `url` - The URL to download `destination` - The destination path `priority` - The download priority (optiona
src/download/manager.rs:196
↓ 32 callersMethodand_then
Adds a custom predicate to the filter # Arguments `predicate` - A function that returns true if the event should be accepted # Returns Self for me
src/events/filters.rs:126
↓ 32 callersMethodwait_for_download
Wait for a download to complete. # Arguments `download_id` - The ID of the download to wait for. # Returns The final download status, or None if t
src/download/api.rs:218
↓ 31 callersMethoddownload_manager
Returns a reference to the download manager. # Returns A reference to the [`DownloadManager`].
src/lib.rs:573
↓ 31 callersFunctionload_video_fixture
Loads a Video from the video.json fixture.
tests/common/fixtures.rs:38
↓ 28 callersFunctionload_playlist_fixture
Loads a Playlist from the playlist.json fixture.
tests/common/fixtures.rs:81
↓ 28 callersFunctionload_video_fixture
()
tests/integration/metadata.rs:4
↓ 27 callersMethodexecute
Starts a live recording and writes it to a file. # Errors Returns an error if the video is not a live stream, no HLS format is available, or the rec
src/live/mod.rs:222
↓ 27 callersFunctionload_e2e_video
Loads the standard `video.json` fixture with `{{MOCK_SERVER}}` replaced by `base_url`.
tests/e2e/helpers.rs:27
↓ 22 callersMethodbuild_base_args
(&self)
src/extractor/youtube.rs:393
↓ 22 callersFunctionis_expired
Checks if a timestamp is expired given a TTL. # Arguments `cached_at` - The timestamp when the item was cached (Unix timestamp in seconds) `ttl` - T
src/utils/mod.rs:137
↓ 20 callersMethodemit
Emits an event to all subscribers Accepts either a bare `DownloadEvent` (wrapped in `Arc` internally) or an existing `Arc<DownloadEvent>` to avoid a
src/events/bus.rs:59
↓ 20 callersMethodsubscribe
Creates a new subscriber that will receive all future events. # Lag behaviour The underlying channel has a fixed capacity (set at construction time,
src/events/bus.rs:118
↓ 18 callersFunctionassert_file_exists
Assert a file exists at the given path.
tests/common/assertions.rs:47
↓ 17 callersFunctioncurrent_timestamp
Returns the current timestamp in seconds since UNIX epoch. # Returns Unix timestamp in seconds as i64.
src/utils/mod.rs:120
↓ 17 callersFunctionfake_libraries
()
tests/integration/builder.rs:8
↓ 17 callersMethodinput
Adds an input file (`-i <path>`). # Arguments `path` - Path to the input file # Returns Self for method chaining.
src/executor/ffmpeg.rs:57
↓ 17 callersFunctionload_chapters_fixture
Loads chapters from the chapters.json fixture.
tests/common/fixtures.rs:87
↓ 16 callersMethodselect_audio_format
Selects an audio format based on quality preference and codec preference.
src/client/streams/selection.rs:354
↓ 16 callersFunctionvideo
()
tests/common/cache.rs:12
↓ 15 callersMethodfinish
(&self)
src/client/download_builder.rs:1165
↓ 15 callersMethodselect_video_format
Selects a video format based on quality preference and codec preference.
src/client/streams/selection.rs:300
↓ 14 callersMethoddownload
Creates a new download builder for downloading a video with custom quality and codec preferences. This provides a fluent API for configuring and exec
src/lib.rs:300
↓ 14 callersMethodremove
Remove a file from the cache (both layers). # Arguments `id` - The unique identifier of the cached file. # Errors Returns an error if the removal
src/cache/stores/files.rs:479
↓ 13 callersMethodcommit
(&mut self)
src/download/engine/fetcher.rs:94
↓ 13 callersMethodfetch_video_infos
Fetch the video information from the given URL. # Arguments `url` - The URL of the video. # Returns A `Video` struct containing metadata about the
src/client/streams/pipeline/fetch.rs:123
↓ 13 callersMethodformat_type
Gets the type of the format. It can be audio, video, both of them, a manifest, or a storyboard. # Returns The [`FormatType`] determined from the cod
src/model/format.rs:101
↓ 13 callersMethodoutput
Sets the output path (always placed last). # Arguments `path` - Path to the output file # Returns Self for method chaining.
src/executor/ffmpeg.rs:93
↓ 13 callersMethodregister
Registers a new hook # Arguments `hook` - The hook to register
src/events/delivery/hooks.rs:107
↓ 12 callersMethodbest_video_format
Returns the best video format available. Formats sorting : "quality", "video resolution", "fps", "video bitrate"
src/client/streams/selection.rs:159
↓ 12 callersMethodconn
(&self)
src/cache/backend/redis.rs:76
↓ 12 callersFunctionparse
Parses an MPEG audio stream (Layer I, II, or III) and returns a [`ContainerIndex`]. Skips any ID3v2 header(s), locates the first MPEG sync frame, the
crates/media-seek/src/audio/mp3.rs:156
↓ 12 callersFunctionsanitize_filename
Sanitizes a filename by removing or replacing unsafe characters. # Arguments `filename` - The filename to sanitize # Returns Returns a sanitized f
src/utils/validation.rs:184
↓ 11 callersMethodbest_audio_format
Returns the best audio format available. Formats sorting : "quality", "audio bitrate", "sample rate", "audio channels"
src/client/streams/selection.rs:174
↓ 11 callersFunctionload_json_string
Loads the raw JSON string for a fixture file.
tests/common/fixtures.rs:33
↓ 10 callersMethodargs
Returns the arguments. # Returns Slice of command arguments
src/executor/mod.rs:114
↓ 10 callersFunctioncreate_parent_dir
Creates the parent directory of the given destination. If the parent directory already exists, nothing is done. # Arguments `destination` - The path
src/utils/fs.rs:268
↓ 10 callersMethodemit_event
Emits a `DownloadEvent` through all registered sinks in order: hooks (with 30 s timeout), webhooks (non-blocking channel send), then the broadcast bus
src/client/streams/pipeline/fetch.rs:80
↓ 10 callersFunctionfile
()
tests/common/cache.rs:28
↓ 10 callersFunctionplaylist
()
tests/common/cache.rs:20
↓ 10 callersMethodurl
Returns the proxy URL. # Returns The proxy URL as a string slice.
src/client/proxy.rs:132
↓ 9 callersFunctionbuild_http_client
Creates a new HTTP client with optimal pooling configuration. # Arguments `config` - Client configuration (proxy, timeout, headers, etc.) # Returns
src/utils/http.rs:60
↓ 9 callersMethodcancel
Cancel a download # Arguments `id` - The ID of the download to cancel # Returns true if the download was canceled, false if it doesn't exist or is
src/download/manager.rs:457
↓ 9 callersMethodcodec_copy
Adds global codec copy (`-c copy`). # Returns Self for method chaining.
src/executor/ffmpeg.rs:68
↓ 9 callersMethodfetch
(&self, start: u64, end: u64)
tests/common/media_seek.rs:25
↓ 9 callersMethodstream
Creates a stream of events for async iteration # Example ```ignore let mut stream = event_bus.stream(); while let Some(Ok(event)) = stream.next().awa
src/events/bus.rs:147
↓ 9 callersMethodsubscribe_events
Subscribes to download events. Returns a broadcast receiver that can be used to receive events. # Returns A broadcast receiver for download events
src/client/pipeline.rs:413
↓ 8 callersMethodclean
Clean expired entries across all caches. # Errors Returns an error if cleanup fails for any sub-cache.
src/cache/layer.rs:62
↓ 8 callersMethodcmp
(&self, other: &Self)
src/download/types.rs:125
↓ 8 callersFunctioncreate_temp_file
Creates a unique temporary file path wrapped in a [`TempFileGuard`]. The file path is placed in the system temporary directory (`std::env::temp_dir()
src/utils/fs.rs:568
↓ 8 callersMethodget
(&self, url: &str)
src/cache/backend/redis.rs:82
↓ 8 callersFunctionmake_temp_file
()
tests/unit/download/segment.rs:7
↓ 8 callersFunctionmedia_fixture
Returns the path to a media fixture file.
tests/common/fixtures.rs:18
↓ 8 callersMethodoverwrite
Adds the overwrite flag (`-y`). # Returns Self for method chaining.
src/executor/ffmpeg.rs:79
↓ 8 callersMethodplaylist
Deserialize the cached playlist JSON into a Playlist struct. # Returns The deserialized `Playlist` instance. # Errors Returns an error if JSON des
src/cache/stores/playlist.rs:43
↓ 8 callersMethodto_header_map
Converts these headers into a `reqwest::header::HeaderMap`. # Returns A `HeaderMap` with User-Agent, Accept, Accept-Language, Sec-Fetch-Mode, and an
src/model/format.rs:399
↓ 8 callersFunctionvalidate_subtitle
Validate a subtitle file. # Arguments `subtitle_path` - Path to the subtitle file to validate # Errors Returns an error if the file cannot be read
src/utils/subtitle/subtitle_validator.rs:119
↓ 8 callersMethodvideo
Deserializes the cached video JSON into a Video struct. # Returns The deserialized `Video` object. # Errors Returns an error if JSON deserializati
src/cache/stores/video.rs:69
↓ 8 callersMethodwait_for_completion
Wait for a download to complete using event-driven notifications (no polling). # Arguments `id` - The ID of the download to wait for # Returns The
src/download/manager.rs:513
↓ 7 callersMethodall
Creates a new filter that accepts all events # Returns An EventFilter that matches all events
src/events/filters.rs:22
↓ 7 callersFunctioncollect_events
Collects events from a broadcast receiver until `timeout` elapses after the last event.
tests/e2e/helpers.rs:71
↓ 7 callersFunctioncreate_temp_path
Creates a temporary output path for file processing. # Arguments `file_path` - Original file path `file_format` - File extension for the temporary f
src/utils/fs.rs:67
↓ 7 callersFunctiondetect
Detects the container format from the leading bytes of a stream. Formats are tested in order of decreasing likelihood for yt-dlp downloads: ISOBMFF/M
crates/media-seek/src/detect.rs:87
↓ 7 callersFunctiondetect_subtitle_format
Detect the format of a subtitle file based on its content. # Arguments `content` - The subtitle file content # Errors Returns an error if the form
src/utils/subtitle/mod.rs:16
↓ 7 callersMethodfetch_asset
Downloads the asset at the given URL and writes it to the given destination. This optimized method uses parallel downloads and download resumption. #
src/download/engine/fetcher.rs:348
↓ 7 callersMethodget_by_id
Retrieves a video from the cache by its ID. # Arguments `id` - The video ID to search for. # Returns The cached video metadata. # Errors Returns
src/cache/stores/video.rs:358
↓ 7 callersMethodmax_attempts
Get the maximum number of attempts. # Returns The maximum number of retry attempts.
src/utils/network/retry.rs:151
↓ 7 callersFunctionparse_media
Fetches and parses an HLS media playlist. # Arguments `client` - The HTTP client to use for fetching. `url` - The URL of the media playlist. # Erro
src/live/hls.rs:163
↓ 7 callersFunctionprefixed_id_key
(prefix: &str, id: &str)
src/cache/backend/redis.rs:40
↓ 7 callersFunctionread_elem_id
Reads an EBML element ID (up to 4 bytes) from `data[pos..]`. Returns `(id, bytes_consumed)` or `None` if the data is too short.
crates/media-seek/src/video/webm.rs:81
↓ 7 callersFunctionread_vint
Reads a variable-length EBML integer (VINT) from `data[pos..]`. Returns `(value, bytes_consumed)` or `None` if the data is too short. The caller can
crates/media-seek/src/video/webm.rs:61
↓ 7 callersFunctionremove_temp_file
Removes a temporary file and logs any errors. Does not propagate errors to avoid interrupting the execution flow. # Arguments `file_path` - The path
src/utils/fs.rs:507
↓ 7 callersFunctionselect_variant
Selects the best variant from a list based on target bandwidth. If `target_bandwidth` is `None`, selects the highest bandwidth variant. Otherwise, se
src/live/hls.rs:230
↓ 7 callersFunctionsetup_hls_server
Sets up a minimal wiremock server serving HLS master + media playlists and segments. Mounts three routes: - `GET /hls/master.m3u8` — HLS master playl
tests/common/server.rs:12
↓ 7 callersMethodsnapshot
Returns a point-in-time snapshot of all collected statistics. Acquires a read lock on the internal state, computes derived metrics (averages, rates),
src/stats/tracker.rs:98
↓ 7 callersMethodto_time_range
Converts a chapter range to a time range using chapter metadata. # Arguments `chapters` - List of chapters with start_time and end_time # Returns
src/download/engine/partial.rs:169
↓ 7 callersMethodwith_auth
Adds authentication credentials to the proxy. # Arguments `username` - The proxy username `password` - The proxy password # Returns Self for metho
src/client/proxy.rs:85
↓ 7 callersMethodwith_format_preset
Set format preset for video quality. # Arguments `preset` - The format preset to use # Returns Self for method chaining
src/extractor/youtube.rs:176
↓ 6 callersMethodclear
Clears all registered hooks
src/events/delivery/hooks.rs:228
↓ 6 callersFunctioncopy_to_cache
(cache_dir: &Path, relative_path: &str, source_path: &Path)
src/cache/backend/mod.rs:61
↓ 6 callersMethodemit_if_subscribed
Emits an event only if there are active subscribers This is more efficient than `emit()` if you want to avoid creating the event when no one is liste
src/events/bus.rs:96
↓ 6 callersMethodenqueue_internal
(&self, url: String, destination: PathBuf, options: EnqueueOptions)
src/download/manager.rs:650
next →1–100 of 2,260, ranked by callers