-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging formats takes a long time #9778
Comments
How does the merge time compare with the time taken to write a 20GB file on the same storage medium, say with |
@dirkf I would use the size of the audio file, which is 136MB, and takes 6.4 seconds at 22 MB/s.
|
the combined filesize of both video and audio formats is what is written to disk during merge, not just the audio |
Is there a way to append the audio to the end of the video. Some kind of fseek with SEEK_END, or opening a file in APPEND mode. |
No, it's not possible with ffmpeg |
When the formats are combined into an MP4 container, the audio and video streams are multiplexed, like doing up a zipper. This means that during playback (when it's important that data is made available in real time) a read operation can get the data for the next frame(s), instead of the I/O subsystem having to maintain two input streams. But as a result the merge has to re-write the whole file. I assume that this applies to MKV as well. |
@bashonly Thanks @dirkf Thanks. It seems MKV might not require multiplexing: "It can add a single or multiple audio tracks to MKV by rewrapping the audio into the .mkv container without re-encoding the video. Thus, it can export the video fast and won’t affect the video quality. By the way, this tool can be used to extract audio as well as remove audio tracks from MKV." -- https://www.videoconverterfactory.com/tips/add-audio-track-to-mkv.html In which case, passing |
multiplex == mux re-encoding != remuxing |
Closing since there's nothing we can do. The optimization would need to be made to ffmpeg |
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Provide a description that is worded well enough to be understood
The "Merging formats" stage takes a long time if the video is large. For example 20GB.
Is there a better, faster way to dump the audio file at the end of the video file into a container format. Perhaps MKV does this better than MP4? I'm not sure, just guessing here.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
version:
2024.04.09
Ubuntu 23.10
The text was updated successfully, but these errors were encountered: