Does anyone know of a software that could be installed/compiled for linux that is able to cut video by the frame? Thanks.
Here is Solutions:
We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.
ffmpeg can do it. If the video codec is inter-coded and you want precise frame accuracy, you’ll have to re-encode the video. If you need to not re-encode the video, then ffmpeg will cut from the nearest GOP boundary before the specified cut point.
Cut and stream-copy:
ffmpeg -i input -ss T -t D -c copy -fflags +genpts output
T specifies the starting point expressed as timecode in the format of
D specifies the duration in the same format.
This won’t be frame accurate if the start point isn’t at a GOP boundary.
Cut and re-encode:
ffmpeg -i input -ss T -t D -fflags +genpts output
Same as above, but this will be frame-accurate.
If you need to specify in and out points by frame numbers:
ffmpeg -i input -vf trim=start_frame=n:end_frame=m -af atrim=start=s:end=t -fflags +genpts output
m are the frame numbers of the video in and out points.
t are the timecodes for the corresponding audio.
The codecs chosen for the re-encoded videos will be according to whichever defaults ffmpeg has set for the output container e.g. H.264 and AAC for MP4.
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂