M: In kdenlive, i want to speed up an hour long video to a minute - that is, i just want to grab a single frame out of every 3600 or so, without getting it blurred together (I tried the basic ‘clip speed’ setting and it turned into a massive blur). Is this possible?
G: Yes, in Kdenlive, you can achieve this effect by using the "Extract Frame" method instead of speeding up the clip directly. Here’s how you can do it:
Add Your Clip to the Timeline:
Change the Clip's Playback Speed to Keep Frames Intact:
Right-click on the clip in the timeline and select “Change Speed” or "Clip Speed."
Set the speed to 3600x. This effectively skips every 3600 frames, retaining only one frame for every second of your original video.
In some cases, this method might blur frames. If you notice blurring, proceed to the next step for a manual approach.
Generating Highlight Decision Frames decides counts. AL But since helpful frame division
M: Can you repeat that? You kind of trailed off there. And assume that the number isn’t precise - that the clip is ABOUT an hour, so numbers won’t be clean.
G: To achieve your goal in Kdenlive without blurring frames and accounting for an approximate duration, you can extract single frames at regular intervals. Here's how you can do it step-by-step:
Add Your Video to the Timeline:
Use the "Speed" Setting as a Reference:
G: Apologies for the earlier confusion! Let me provide a clear and complete method that handles an approximate duration without relying on precise numbers:
Add the Video to Your Project:
Calculate the Frame Interval:
108,000 ÷ 1,800 ≈ 60).Use the “Extract Frame” Feature:
Export the Result:
If the above is too cumbersome or you need more precision, use FFmpeg:
ffmpeg -i input.mp4 -vf "select='not(mod(n,60))',setpts=N/FRAME_RATE/TB" -r 30 output.mp4This grabs every 60th frame from the video and creates a new clip.
Would you like clarification on either approach?
M: The ffmpeg version worked for the video - but the audio stayed long. What flag removes audio?
G: To remove the audio entirely
from the output in FFmpeg, you can add the -an flag. Here's
the updated command:
ffmpeg -i input.mp4 -vf "select='not(mod(n,60))',setpts=N/FRAME_RATE/TB" -r 30 -an output.mp4-an: Removes audio from the output file.Let me know if you need further adjustments!
M: I have video A and mp3 B, which is longer than A. What ffmpeg command will merge the two, with the audio shortened to the length of A?
G: To merge a video
(A) and an audio file (B), with the audio
automatically trimmed to match the video's duration, use the following
FFmpeg command:
ffmpeg -i videoA.mp4 -i audioB.mp3 -c:v copy -c:a aac -shortest output.mp4-i videoA.mp4: Specifies the input video file.-i audioB.mp3: Specifies the input audio file.-c:v copy: Copies the video stream without
re-encoding.-c:a aac: Encodes the audio as AAC (a widely compatible
format).-shortest: Ensures the output file ends when the
shorter of the two streams (video or audio) ends.output.mp4: The resulting merged file.This will create a video with the audio trimmed to match the video's length. Let me know if you encounter any issues!