| Crates.io | bilibili-merge |
| lib.rs | bilibili-merge |
| version | 0.3.0 |
| created_at | 2024-09-30 02:57:33.45926+00 |
| updated_at | 2026-01-03 19:13:06.629247+00 |
| description | Merge bilibili downloaded videos. |
| homepage | https://blog.licsber.site |
| repository | https://git.licsber.site/rust/bilibili-merge |
| max_upload_size | |
| id | 1391257 |
| size | 25,407 |
Merge bilibili downloaded videos with audio files.
cargo install bilibili-merge
bilibili-merge [OPTIONS] [PATH]
PATH - Path to the directory containing video and audio files (default: current directory)-n, --dry-run - Dry run mode: show what would be done without actually doing it-f, --force - Force overwrite existing files-h, --help - Print help informationVideo File Selection: The tool automatically finds the largest file (by file size) in the specified directory and uses it as the video file. This means:
Audio File Matching: The tool looks for an audio file with the same base name as the video file, but with .m4a extension. For example:
video.mp4 → Audio: video.m4aepisode_01.flv → Audio: episode_01.m4aProcessing Steps:
original.<extension> as a backup<original_name>.mp4 (always MP4 format, regardless of input format)# Merge video and audio in current directory
bilibili-merge
# Merge video and audio in a specific directory
bilibili-merge /path/to/video/directory
# Dry run to see what would be done
bilibili-merge -n
# Force overwrite existing files
bilibili-merge -f
# Combine options
bilibili-merge -n -f /path/to/directory
ffmpeg to be installed and available in your PATH-f to force)original.<extension>