MCPcopy Create free account

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

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

↓ 1 callersFunctionsrt_to_vtt
Convert SRT (SubRip) format to VTT (WebVTT) format. # Arguments `srt_content` - The SRT subtitle content # Errors Returns an error if the conversi
src/utils/subtitle/subtitle_converter.rs:219
↓ 1 callersMethodstoryboard_formats
Returns all storyboard formats for this video, ordered from best to worst quality. Best quality = highest fragment count × largest resolution (width
src/client/streams/selection.rs:409
↓ 1 callersMethodstream
Starts streaming fragments from the live stream. # Errors Returns an error if the initial playlist cannot be fetched. # Returns A [`LiveFragmentSt
src/live/streaming.rs:66
↓ 1 callersFunctionstream_response_chunks
Sends `request`, streams the response body into `context.file`, and tracks byte counts. Writes are batched in [`WRITE_BATCH_SIZE`] chunks to minimise
src/download/engine/parallel.rs:91
↓ 1 callersFunctionstsc_run_info
Computes [`StscRunInfo`] for entry `i` given the total `chunk_count`.
crates/media-seek/src/video/mp4.rs:826
↓ 1 callersMethodthumbnail_for_size
Returns the smallest thumbnail that meets the given minimum dimensions. Useful when you need at least a certain resolution without over-fetching. #
src/model/video.rs:313
↓ 1 callersMethodtime_range
Helper method to set a time range for partial download. # Arguments `start` - Start time in seconds (must be non-negative) `end` - End time in secon
src/client/download_builder.rs:340
↓ 1 callersMethodtitle_contains
Checks if the chapter title contains the given string (case-insensitive). # Arguments `query` - The string to search for in the title # Returns Re
src/model/types/chapter.rs:82
↓ 1 callersMethodtitle_matches
Checks if the chapter title matches the given string exactly (case-insensitive). # Arguments `query` - The string to match against the title # Retu
src/model/types/chapter.rs:97
↓ 1 callersMethodtitle_starts_with
Checks if the chapter title starts with the given string (case-insensitive). # Arguments `prefix` - The prefix to check for # Returns Returns `tru
src/model/types/chapter.rs:112
↓ 1 callersMethodto_ffmpeg_name
Converts to FFmpeg codec name # Returns The FFmpeg codec name string
src/download/config/postprocess.rs:30
↓ 1 callersMethodto_ffmpeg_string
Converts filter to FFmpeg filter string # Returns The FFmpeg filter string
src/download/config/postprocess.rs:302
↓ 1 callersMethodto_format_selector
(&self)
src/extractor/youtube.rs:71
↓ 1 callersFunctionto_owned
Converts a vector of string slices to a vector of owned strings. # Arguments `vec` - The vector of string references to convert # Returns A vector
src/utils/mod.rs:37
↓ 1 callersMethodto_reqwest_proxy
Converts to reqwest proxy format. # Returns Result containing the reqwest Proxy instance # Errors Returns error if the proxy URL is invalid
src/client/proxy.rs:199
↓ 1 callersMethodto_ytdlp_arg
Converts to yt-dlp proxy argument format. # Returns The proxy URL in the format expected by yt-dlp's `--proxy` argument. Includes authentication cre
src/client/proxy.rs:224
↓ 1 callersFunctiontotal_samples_from_stts
Returns the total number of samples encoded in `stts`.
crates/media-seek/src/video/mp4.rs:812
↓ 1 callersFunctiontry_extension
Gets the file extension from a path, lowercased. # Arguments `path` - The path to extract the extension from # Returns Lowercase file extension st
src/utils/fs.rs:46
↓ 1 callersMethodtry_index_lookup
Looks up a video by URL using the O(1) URL→ID index file. Returns `Ok(Some(video))` on a valid, non-expired cache hit, `Ok(None)` on a miss or expiry
src/cache/backend/json.rs:98
↓ 1 callersFunctiontry_match_subtitle_entry
Attempts to load and validate a subtitle cache entry at `path`. Returns `Some((cached, file_path))` when the entry matches the requested `video_id` /
src/cache/backend/json.rs:762
↓ 1 callersFunctiontry_parse_odml_index
Attempts to parse an OpenDML `indx` super-index from the probe. `total_size` is used as the last-segment byte boundary; falls back to the end of the
crates/media-seek/src/video/avi.rs:100
↓ 1 callersFunctiontry_parse_script_tag
Attempts to parse a Script tag at `[start..end]` in `probe` and returns the resulting index. Returns `None` when the tag cannot be parsed as a valid
crates/media-seek/src/video/flv.rs:168
↓ 1 callersFunctiontry_parse_vbr_header
Checks for Xing/Info or VBRI VBR headers in a Layer III frame and parses them if found. Returns `Ok(Some(index))` when a VBR header is found and pars
crates/media-seek/src/audio/mp3.rs:614
↓ 1 callersFunctiontry_partial_clip
Attempts a media-seek partial clip for both streams and combines the result. Performs a binary-search-based byte-range clip for the given time window
src/client/download_builder.rs:982
↓ 1 callersFunctiontry_path_str
Converts a path to a UTF-8 string reference. # Arguments `path` - The path to convert # Returns The path as a UTF-8 string slice # Errors Return
src/utils/fs.rs:28
↓ 1 callersFunctiontry_sidx_beyond_probe
Attempts to fetch a window just beyond `probe` and parse any SIDX boxes found there. Returns `Some(result)` when SIDX boxes are found in the fetched
crates/media-seek/src/video/mp4.rs:129
↓ 1 callersFunctionu24_be
Reads a 3-byte big-endian unsigned integer.
crates/media-seek/src/video/flv.rs:132
↓ 1 callersMethoduser_agent
Returns the current user agent, if set. # Returns The optional user agent string.
src/lib.rs:536
↓ 1 callersFunctionvalidate_aifc_codec
Validates that an AIFC `compressionType` is one of the supported uncompressed codecs. # Arguments `codec` - The 4-byte compression type field from a
crates/media-seek/src/audio/pcm.rs:304
↓ 1 callersFunctionvalidate_ass
Validate ASS/SSA subtitle content.
src/utils/subtitle/subtitle_validator.rs:344
↓ 1 callersFunctionvalidate_entry_timestamps
Helper to validate entry timestamps
src/utils/subtitle/subtitle_validator.rs:215
↓ 1 callersFunctionvalidate_srt
Validate SRT subtitle content.
src/utils/subtitle/subtitle_validator.rs:301
↓ 1 callersFunctionvalidate_vtt
Validate VTT subtitle content.
src/utils/subtitle/subtitle_validator.rs:283
↓ 1 callersFunctionvalidate_youtube_url
Validates a YouTube URL. # Arguments `url` - The URL to validate # Returns Returns `Ok(())` if the URL is a valid YouTube URL, otherwise an error.
src/utils/validation.rs:40
↓ 1 callersMethodvideo_codec
Sets the preferred video codec. # Arguments `codec` - The preferred video codec # Returns The modified `DownloadBuilder` instance.
src/client/download_builder.rs:161
↓ 1 callersFunctionvtt_to_srt
Convert VTT (WebVTT) format to SRT (SubRip) format. # Arguments `vtt_content` - The VTT subtitle content # Errors Returns an error if the conversi
src/utils/subtitle/subtitle_converter.rs:87
↓ 1 callersFunctionwalk_segment_elements
Walks top-level elements inside a Segment body until SeekHead+Info are found. `duration_scaled` is tracked internally for the early-exit heuristic bu
crates/media-seek/src/video/webm.rs:141
↓ 1 callersFunctionwalk_stbl_boxes
Traverses the children of an `stbl` box and returns raw payload slices for each seek-relevant box type (`stts`, `stco`, `co64`, `stsc`, `stss`, `stsz`
crates/media-seek/src/video/mp4.rs:520
↓ 1 callersMethodwith_cache_config
(mut self, config: CacheConfig)
src/client/builder.rs:204
↓ 1 callersMethodwith_cancellation_token
Sets a custom cancellation token. If not set, the downloader's cancellation token is used. # Arguments `token` - The cancellation token to control
src/live/mod.rs:207
↓ 1 callersMethodwith_credentials
Use credentials for sites requiring login. Security note:** Credentials are passed via `--username` and `--password` CLI arguments, which may be visi
src/extractor/generic.rs:130
↓ 1 callersMethodwith_extractor_args
Add extractor-specific arguments. # Arguments `extractor` - Name of the extractor `args` - Arguments to pass to the extractor # Returns Self for m
src/extractor/generic.rs:97
↓ 1 callersMethodwith_filter
Sets the event filter. # Arguments `filter` - The event filter to apply # Returns Self for method chaining.
src/events/delivery/webhooks.rs:171
↓ 1 callersMethodwith_framerate
Sets the target framerate
src/download/config/postprocess.rs:435
↓ 1 callersMethodwith_full_data
Sets whether to include full event data. # Arguments `include` - Whether to include full event data or just a summary # Returns Self for method ch
src/events/delivery/webhooks.rs:218
↓ 1 callersMethodwith_header
Adds a custom header. # Arguments `key` - Header name `value` - Header value # Returns Self for method chaining.
src/events/delivery/webhooks.rs:143
↓ 1 callersMethodwith_headers
Sets multiple headers at once. # Arguments `headers` - Map of header names to values # Returns Self for method chaining.
src/events/delivery/webhooks.rs:157
↓ 1 callersMethodwith_max_concurrent_downloads
Set the maximum number of concurrent downloads. # Arguments `max_concurrent` - Maximum number of concurrent downloads
src/client/builder.rs:229
↓ 1 callersMethodwith_mock_server
Sets the mock server URL used to rewrite format URLs in fixtures.
tests/common/test_extractor.rs:46
↓ 1 callersMethodwith_preset
Sets the encoding preset
src/download/config/postprocess.rs:441
↓ 1 callersMethodwith_progress
Sets a progress callback function. The callback receives a value between 0.0 and 1.0 representing download progress.
src/client/download_builder.rs:268
↓ 1 callersMethodwith_progress_callback
Configure a callback for tracking download progress. # Arguments `callback` - A function that will be called with the downloaded size and total size
src/download/engine/fetcher.rs:242
↓ 1 callersMethodwith_proxy
Set proxy configuration for HTTP requests and yt-dlp. # Arguments `proxy` - The proxy configuration
src/client/builder.rs:134
↓ 1 callersMethodwith_resolution
Sets the target resolution
src/download/config/postprocess.rs:429
↓ 1 callersMethodwith_speed_profile
Sets the speed profile and updates related settings.
src/download/types.rs:194
↓ 1 callersMethodwith_video_bitrate
Sets the video bitrate
src/download/config/postprocess.rs:417
↓ 1 callersMethodworst_thumbnail
Returns the worst thumbnail by resolution (width × height), breaking ties by preference. Falls back to the lowest-preference thumbnail if none have r
src/model/video.rs:293
↓ 1 callersFunctionwrite_batch_to_file
Writes `batch` to `file` at the given `offset` using positional I/O inside `spawn_blocking`. Uses `write_all_at` on Unix and a `seek_write` loop on W
src/download/engine/parallel.rs:46
↓ 1 callersFunctionwrite_lofty_tags
Write metadata tags to a file using lofty (runs on a blocking thread).
src/metadata/writers/lofty.rs:190
↓ 1 callersMethodwrite_segments
Downloads and appends a slice of HLS segments to `writer`. Iterates over `segments` in order. Stops early (without error) if the cancellation token i
src/live/recording/native.rs:280
↓ 1 callersFunctionxing_header_offset
Returns the offset of the Xing header within a Layer III frame (after side information).
crates/media-seek/src/audio/mp3.rs:463
Methodactive_count
Returns the number of downloads currently in progress. # Returns The count of downloads that have been started but have not yet reached a terminal s
src/stats/tracker.rs:109
Methodadd_arg
Add a single argument to pass to yt-dlp. # Arguments `arg` - The argument to add
src/client/builder.rs:109
Methodadd_metadata_if_some
Add metadata to a vector if the value exists. # Arguments `metadata` - Vector to add the metadata to `key` - Metadata key `value` - Optional value t
src/metadata/base.rs:132
Functionadd_metadata_if_some_float
()
tests/unit/metadata.rs:131
Functionadd_metadata_if_some_none
()
tests/unit/metadata.rs:117
Functionadd_metadata_if_some_numeric
()
tests/unit/metadata.rs:124
Functionadd_metadata_if_some_with_value
()
tests/unit/metadata.rs:108
Functionadd_metadata_to_flac_succeeds
()
tests/integration/metadata.rs:115
Methodadd_metadata_to_m4a
Add metadata to an M4A/MP4 file using mp4ameta. M4A/MP4 metadata includes: Title, artist, album, genre (from tags), release year For MP4 files with v
src/metadata/writers/mp4.rs:32
Functionadd_metadata_to_m4a_succeeds
()
tests/integration/metadata.rs:98
Methodadd_metadata_to_mp3
Add metadata to an MP3 file using ID3 tags. MP3 metadata includes: Title, artist, album, genre (from tags), release year # Arguments `file_path` -
src/metadata/writers/mp3.rs:31
Functionadd_metadata_to_mp3_succeeds
()
tests/integration/metadata.rs:81
Functionadd_metadata_to_wav_succeeds
()
tests/integration/metadata.rs:136
Methodadd_metadata_with_chapters
Add both regular metadata and chapters to a video file. This is a convenience method that combines `add_metadata_with_format` and `add_chapters_metad
src/metadata/chapters.rs:36
Methodadd_metadata_with_lofty
Add metadata to a file supported by lofty (FLAC, OGG, WAV, AAC, AIFF). # Arguments `file_path` - Path to the audio file `video` - Video metadata to
src/metadata/writers/lofty.rs:64
Methodadd_thumbnail_to_m4a
Add thumbnail to an M4A/MP4 file. # Arguments `file_path` - Path to the M4A/MP4 file `thumbnail_path` - Path to the thumbnail image # Errors Retur
src/metadata/writers/mp4.rs:127
Methodadd_thumbnail_to_mp3
Add thumbnail to an MP3 file using ID3 picture frame. # Arguments `file_path` - Path to the MP3 file `thumbnail_path` - Path to the thumbnail image
src/metadata/writers/mp3.rs:97
Functionadd_thumbnail_to_mp3_succeeds
()
tests/integration/metadata.rs:153
Methodadd_thumbnail_with_lofty
Add a thumbnail to a file supported by lofty (FLAC, OGG, WAV, AAC, AIFF). # Arguments `file_path` - Path to the audio file `thumbnail_path` - Path t
src/metadata/writers/lofty.rs:120
Functionadd_warning_to_validation_result_sets_warnings
()
tests/unit/utils/subtitle.rs:67
Functionadd_warnings_to_chapter_validation_sets_all_warnings
()
tests/unit/model/types.rs:935
Functionadd_warnings_to_validation_result_sets_all_warnings
()
tests/unit/utils/subtitle.rs:75
Functionadts_find_byte_range_is_non_empty
()
tests/integration/media-seek/adts.rs:22
Functionadts_full_vs_partial_byte_range
()
tests/integration/media-seek/seeking.rs:145
Functionadts_init_end_byte_is_zero
()
tests/integration/media-seek/adts.rs:48
Functionadts_linear_index_byte_range_monotone
()
tests/integration/media-seek/adts.rs:34
Functionaiff_find_byte_range_partial
()
tests/integration/media-seek/seeking.rs:51
Functionaiff_linear_index_find_range
()
tests/unit/media-seek/index.rs:34
Methodambiguous_cache_backend
(count: usize)
src/error.rs:789
Methodany_of
Creates a filter that accepts events matching any of the given event types
src/events/filters.rs:168
Methodappend_args
Sets the arguments to pass to yt-dlp. # Arguments `args` - The arguments to pass to yt-dlp. # Examples ```rust, no_run # use yt_dlp::Downloader; #
src/lib.rs:627
Functionarchive_error_corrupted_display
()
tests/unit/error.rs:514
Functionarchive_error_debug
()
tests/unit/error.rs:520
Functionarchive_error_invalid_format_display
()
tests/unit/error.rs:508
Methodargs
Adds arbitrary arguments. # Arguments `args` - Iterator of arguments to append # Returns Self for method chaining.
src/executor/ffmpeg.rs:107
Methodas_arg
(&self)
src/extractor/youtube.rs:35
Functionassert_event_received
Assert an event was received on a broadcast channel within a timeout. Returns the received event for further inspection.
tests/common/assertions.rs:73
Functionassert_format_count
Assert a video has the expected number of formats.
tests/common/assertions.rs:7
Functionassert_has_audio_format
Assert a video has at least one audio format.
tests/common/assertions.rs:18
← previousnext →701–800 of 2,260, ranked by callers