Pre-transcode vs. post-transcode

Anything that does not fit into the other categories.
Post Reply
Posts: 1
Joined: Tue Oct 04, 2016 10:07 pm

Pre-transcode vs. post-transcode

Post by bpphillips5 » Tue Oct 04, 2016 10:46 pm

Long-time video dabbler, until recently always with some kind of GUI. Experimenting with ffmpeg CLI now.

I have an MPEG2 recording from a DVR, complete with commercials. I would like to remove the commercials, and re-encode the video into something smaller (e.g. mp4). I have already worked out how to do both of these tasks, but I'd like to verify that my thinking on the subject is correct and that I'm doing it the "best" (or, at least, better) way.

Originally, I was clipping out the sections I wanted (-ss & -to) and saving them without re-encoding (e.g. -c:v copy), then, when I had all my sections, I would use the concat demuxer to combine them into a final, transcoded (mp4), video.

Since then, it has occurred to me that, as what I'm doing is a frame-level cut, there probably isn't an I-frame where I need it to be, and my frame-level cut is going to cause a problem when transitioning between the end of that segment and the beginning of the next one. So my revised workflow is to clip-and-transcode each clip (thinking that the transcoding will force the beginning/end frames to be nicely formatted), and then use the concat demuxer to simply combine the clips into a final video.

Is my thinking about frame-level cuts and I-frames correct? Is my revised workflow a good way to go about it?

Thanks in advance for your help!


Post Reply