Saturday, April 24, 2010

Simple video edit using PiTiVi

I am not a professional video editor and my needs are really quite basic.

I have a few short videos in avi format that came from a Canon point and click. What I would like to do, is take the important segment, and bin the rest.

There are command line tools I am sure to do this, but it seemed a good opportunity to try out a new tool that appears in Ubuntu Lucid - the PiTiVi video editor.

Sound and Video -> PiTiVi video editor


Video is 1 minute long and takes about 75 megabytes but we shall soon shrink it down by cutting off the excess using Timeline -> Split


Now I cut it into three pieces and keep the middle portion (40:00 to 54:00)

The top left are is labelled 'Clip Library' and from there you should drag your clip downward into the 'Timeline' area (You will know it is done when the audio and video bottom sections are non empty)


Now there is something wrong in the picture above. When I dragged my clip I did not drag it to the zero line.
It will make things easier for me to drag to zero, as I am looking to retain a segment which runs 40:00 to 54:00, and so starting off-zero makes things more difficult.

drag to zero then split at 40...


Now splitting at 54:00 and hovering over the middle bit shows grey markers at each split:


Now shove the timeline vertical line into each of the segments you wish to lose, and use the menu to Timeline -> Delete

What I am left with is the portion I wish to keep...


...which I now drag to the left so that it lines up with zero, before I then 'Render' the project






Now the .ogv file has been output and in the file browser shows that size has come down to 20 megabytes. File -> Properties shows some information about the framerate.



Note: PiTiVi is version 0.13.4 on my system. This is an early release, so is usable, but not necessarily perfect or bug free.
File/Properties (and vlc) says 60 fps whereas the PiTiVi output dialogue indicated 25 fps.

What you should see is Video codec: Theora         Audio codec: Vorbis

( If your output file does not show Video codec and Audio codec as expected, then check Project -> Project Settings really does show theoraenc and vorbisenc before you ask PiTiVi to 'Render' )


I look forward to version 1.0 of PiTiVi later this year.

There is a quick start manual for PiTiVi in .odt format for further reading.

Note: In this early release of PiTiVi there is a known bug that can be overcome by seeking forward in your clip. If you selected 'Render' and nothing happens then this is a known bug and the workaround is to seek forward in your clip before you render. Not ideal but then version 0.13.4 still has plenty of development left before version 1.0 (production ready)

I never witnessed this error myself, I preview before rendering, as it is part of my work style. However if you are just using PiTiVi for conversion rather than 'editing' then you might well hit 'Render' and nothing happens (bug 603102)

Checking Frames per Second using VLC:

Clicking 'Tools -> Codec Information' from within vlc player whilst playing your clip will give you a dialog that provides information about the video and audio codec:


I chose to use VLC to report on Frame rate, rather than use Totem Movie Player or other tools that, I felt, were more likely to share underlying playback libraries with Nautilus.

Notes about unnecessary packages theoraenc or ogmtools:

Although 'Project -> Project Settings' shows theoraenc and vorbisenc, this does not mean that you need to install ogmtools package or ogmrip package.
PiTiVi is, I think, using libraries rather than /usr/bin/theoraenc to do it's encoding.

Output of dpkg (below) just to clarify that my system rendered .ogv theora/vorbis, and has libtheora0 installed, but did not require packages ogmtools or ogmrip from *universe/multiverse:


*This makes sense really, as PiTiVi is now available as part of official Ubuntu, and so should not have dependencies other than packages maintained by Canonical.

2 comments:

Jean-François said...

Actually you haven't experienced that particular render hang bug because you're using pitivi 0.13.4. The user manual you were looking at is the 0.13.3 one :)

Gary said...

As @Jean-François suggested, it really helps if you are looking at the latest manual, and they are found here I think:
PiTiVi manuals

Great to see .odt and .pdf versions :)

Should you have any issues, then jump straight onto IRC, as suggested on the PiTiVi contact page, or if your already in twitter then you can maybe look around

I think PiTiVi will be a big hit this year, great work Jean-François and the team.