Can I use Pitivi to trim a video, without re-encoding it?

I would like to take a video I have and remove some parts of it, that is, produce a new video that is basically the same as the original but removing some parts.

Avidemux seems to let you do this easily: just open the video, select a start and end frame, and hit save. This doesn't seem to be the case with Pitivi, though: "save" doesn't save a video, but a project; to save the video I have to hit "render project", and then I'm seemingly forced to re-encode the video because Pitivi just won't save the video "as it was".

Is this indeed the way Pitivi works, or am I missing something here?


Solution 1:

PiTiVi is a Non-Linear video editor first and foremost, and so it doesn't have a "copy" mode.

You have probably noticed that Avidemux has several "modes" of work. Cutting/splitting videos without re-encoding can only be done in "Copy" mode. It also means that no video filters can be applied.

The "Copy" mode works by copying the raw compressed video from the original file (container) into the new file (container). That's why you can't use video filters in this mode. You might have noticed that this cutting doesn't actually work always with exact precision. Effectively, "Copy" mode can only split on keyframes, and that means that unless you chose a keyframe to split on, your resulting video will have a few more frames than what you intended. Usually too few to notice, but they are there anyway. However, with some specific codecs, Avidemux can do "Smartcopy" as explained here on the website

If your file uses MSMPEG-4 (DivX ;-) 3) or MPEG-4 video, you can use smart copy mode. Smart copy will leave most frames unchanged, but re-encode the part that lost its reference images with a fixed quantizer. So in our example, frames ab and nop would remain unchanged, while frames jkl would be re-encoded to use a different reference frame. Smart copy will ask you for a value for the quantizer to use – 4 or 5 is generally OK.

So you still get some video re-encoding, though minimal.

PiTiVi is a Non-Linear video editor first and foremost, and so it doesn't have a "copy" mode, which would prevent any track-mixing and any video effects. Which I think is good, because people would turn it on, and you would get complaints that the video effects don't work :)

Solution 2:

You're right that this is the way PiTiVi works (alongside most other video editors).

I agree this is frustrating, but with most video file formats (due to the compression methods used) it's not just as simple as slicing out specified parts of the file and saving those parts.

Solution 3:

There's just no way to edit a video without re-encoding it - at least not with any sort of coded you would use today. (There are probably some specialised editors (that is, for one codec only, maybe bundled or for use in vertical markets) to do this, but nothing you'll find useful)

Still, if you, or anybody else, are interested in a nice video editor that makes this task quite easy, i'll mention Openshot Install Openshot for completeness' sake

Just drag the file from your video CD into OpenShot; It should convert everything automatically. I don't have a Video CD to test it, but since the Video CD standard mandates it use MPEG-1, I'm quite confident it'll work just fine.

You'll use the Razor tool (3) to split your video into multiple clips, delete the unwanted ones and move them around as you like.