![]() In the loop filter, 1 frame starting at (the last frame) # 349 is looped for 75 frames. Then the first stream is trimmed from start of 2nd to end of 15th second. Here's what is happening in the filtergraph:įirst, the video is split to two identical streams. ![]() Here's the way to do it in one command, assuming the video is 25 FPS. Thank you very much, any kind of help will be appreciated!Īssuming your end goal is I want it to stop in a certain second, freeze the image some seconds (like a pause), and then reproduce again from the same exact frame., the current method, with multiple video generations, is needlessly wasteful. Now, I want to cut the video into 2 parts ("before second 15" and "after second 15"): ffmpeg -y -ss 00:00:01 -i VideoOut.mp4 -t 14 -c copy A.mp4įfmpeg -y -ss 00:00:15 -i VideoOut.mp4 -t 5 -c copy C.mp4Īs mentioned, I expect the end of A.mp4 to "match" with the beginning of C.mp4 (at a frame precision), but the result I obtain is far from being perfect. force_key_frames "expr: gte(t,n_forced * 15)" -t 30 VideoOut.mp4Īs far as I know, the resulting video should have a Keyframe every 15 seconds. ![]() The commands I am using are the following ones: ffmpeg -y -i VideoSequence.mp4 -c:v libx264 -pix_fmt yuv420p \ However, the result I obtain is not the appropriate one, because my video A ends in a frame different from the one in the beginning of C. From other posts and sources, I discovered that FFmpeg trims from those Frames that are Keyframes, which can be forced. The part of generating a video from a static image is not a problem, my main concern is to find the way to trim and concatenate videos accurately. Besides, I also perform an overlay with filter_complex. I could say that I am dealing with three videos: A.mp4 (first part of the video sequence), B.mp4 (frozen image) and C.mp4 (second part of the video sequence). I am pretty stucked with the way that FFmpeg trims videos, so I would be really grateful if someone could help me.īasically, what I am trying to do is: I have a video sequence and I want it to stop in a certain second, freeze the image some seconds (like a pause), and then reproduce again from the same exact frame. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |