I have a .mp4 video file, I need to trim it, however no matter how I do it, trimmed video is being encoded again which results in noisy video.
What I've tried:
Open video with Matlab, read frames and write only the frames that I want to have in trimmed video, I use 'MPEG-4'
option.
Trim video using Windows Movie Maker.
In first 2 scenarios original mp4 movie is encoded again after trimming it. I couldn't get mp4 files open in VirtualDub.
So what would be the easiest way to trim a video without re-encdong it?
You can do the split and re-encode in one command.
Create a text file, list.txt
,
like this
file 'in.mp4'
inpoint 48.101
outpoint 67.459
file 'in.mp4'
inpoint 76.178
outpoint 86.399
file 'in.mp4'
inpoint 112.140
outpoint 125.031
then run,
ffmpeg -f concat -i list.txt -an -crf 18 out_merged.mp4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With