Hello guest, if you like this forum, why don't you register? https://forum.fanres.com/member.php?action=register (December 14, 2021) x


[Help] 

Cut out a part of a video file and add it to another video file

7 Replies, 1386 Views

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...
(This post was last modified: 2020-07-29, 12:23 AM by allldu.)
AVI demux might let you do this with re encoding - are the two files the same i.e. resolution, frame rate, codec etc?
TMPGEnc Smart Renderer does such things very reliably, but it might reencode a few frames around the cut.
(2020-07-29, 08:55 AM)alleycat Wrote: AVI demux might let you do this with re encoding - are the two files the same i.e. resolution, frame rate, codec etc?
Should be the same, yes.
(2020-07-29, 12:28 PM)allldu Wrote:
(2020-07-29, 08:55 AM)alleycat Wrote: AVI demux might let you do this with re encoding - are the two files the same i.e. resolution, frame rate, codec etc?
Should be the same, yes.

Ok maybe try AVI demux or TMPG Smart Renderer as TomArrow suggested
So neither ffmpeg nor ace3to can do the job?
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.
(This post was last modified: 2020-07-29, 08:52 PM by TomArrow.)
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.

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Help] Fixing color timing on 4K video plisskin 4 591 2022-09-26, 09:28 PM
Last Post: spoRv
  Full length file & timeline lenght do not match Stamper 2 328 2021-07-25, 02:53 PM
Last Post: Stamper
  Splitting a video file into multiple parts alexpeden2000 1 587 2021-06-11, 07:38 AM
Last Post: schorman
  Should audio last (almost) as long as video? pipefan413 13 2,937 2021-04-07, 12:57 PM
Last Post: pipefan413
  [Help] Tools for syncing subtitles to video NeonBible 6 889 2021-03-27, 10:48 AM
Last Post: BusterD
  Odd Aspect Ratio - stretch video? alleycat 14 1,531 2020-12-09, 12:27 PM
Last Post: spoRv
  Any way to test an audio file for resampling/bit-depth conversion? BusterD 5 1,067 2020-12-04, 09:46 PM
Last Post: BusterD
  [Help] Split m2ts file allldu 10 1,970 2020-10-20, 04:52 PM
Last Post: allldu
  Divinci Resolve video output Kreeep 2 826 2020-08-27, 11:17 AM
Last Post: Kreeep
  Audio Restoration - Odd Looking File alleycat 2 1,586 2019-12-04, 09:54 AM
Last Post: alleycat



Users browsing this thread: 1 Guest(s)