I want to mix video from video.mp4
(1 minute duration) and audio from audio.mp3
(10 minute duration) into one output file with a duration of 1 minute. The audio from audio.mp3
should be from the 4 min - 5 min position. How can I do this with ffmpeg
?
相关问题
- Improving accuracy of Google Cloud Speech API
- MP4 codec support in Chromium
- Streaming video (C# using FFmpeg AutoGen) sends mu
- How do I decode opus file to pcm file using libavc
- ffmpeg for Android: neon build has text relocation
相关文章
- Handling ffmpeg library interface change when upgr
- How to use a framework build of Python with Anacon
- c++ mp3 library [closed]
- Passing a native fd int to FFMPEG from openable UR
- FFmpeg - What does non monotonically increasing dt
- ffmpeg run from shell runs properly, but does not
- Issues in executing FFmpeg command in Java code in
- Terminal text becomes invisible after terminating
If
video.mp4
has no audioYou can use this command:
The audio will be from the 4 minute position (
-ss 00:04:00
) as requested in the question.This example will stream copy (re-mux) the video and audio–no re-encoding will happen.
If
video.mp4
has audioYou will have to add the
-map
option as described here: FFmpeg mux video and audio (from another video) - mapping issue.If the audio is shorter than the video
Add the apad filter to add silent padding:
Note that filtering requires re-encoding, so the audio will be re-encoded in this example.