Posts: 144
Threads: 13
Joined: 2019 Nov
Thanks: 93
Given 29 thank(s) in 20 post(s)
Country:
2020-07-29, 12:21 AM
(This post was last modified: 2020-07-29, 12:23 AM by allldu.)
Guys,
So I have two video files, say,1.mp4 and 2.mp4. I want to cut out the beginning of 1.mp4 and then add it to 2.mp4, so that in the end I have 3.mp4 (which is the beginning of 1.mp4 + 2.mp4). Is it possible without re-encoding? Can ffmpeg take care of that? I know with ffmpeg you can cut out certain parts of the video, but not sure if it's not re-encoded after you apply ffmpeg...
Posts: 846
Threads: 202
Joined: 2019 Aug
Thanks: 1222
Given 1143 thank(s) in 382 post(s)
Country:
AVI demux might let you do this with re encoding - are the two files the same i.e. resolution, frame rate, codec etc?
deleted user
Unregistered
Thanks:
Given thank(s) in post(s)
TMPGEnc Smart Renderer does such things very reliably, but it might reencode a few frames around the cut.
Posts: 144
Threads: 13
Joined: 2019 Nov
Thanks: 93
Given 29 thank(s) in 20 post(s)
Country:
So neither ffmpeg nor ace3to can do the job?
deleted user
Unregistered
Thanks:
Given thank(s) in post(s)
I don't know about ffmpeg, but there are also other tools that can do it, Google search can find them. Videoredo I think, also I think tsmuxerGUI, and various GUIs for mp4box I think. But the result might not be 100% clean and stable. It's worth a shot though I guess.
Posts: 1,554
Threads: 60
Joined: 2015 Jan
Thanks: 229
Given 627 thank(s) in 372 post(s)
Country:
It's possible (but tricky) to cut with ffmpeg by using -ss and specifying a timecode (§5.4 in the documentation). Note that the behavior of -ss differs depending on whether it is placed before or after the input file. However, if you don't re-encode, the cutting will not be exact because you are limited to seek-points ("key-frames"). It's better to re-encode or use a smart renderer. If you do use ffmpeg, after you have cut 1.mp4, list it and 2.mp4 in a text file, and then use the -concat option (§20.4 in the documentation) to splice them together and create 3.mp4.